# Tag Info

Accepted

### Is it possible for user written algorithms to outperform libraries' built-in optimized functions?

Although LAPACK has some incredibly optimized code, it can still be worth it to write your own version in a few cases. The most important reason (and the reason they make you do it in your course). ...
• 1,254
Accepted

### Arbitrary Precision Optimization Libraries?

Optim.jl from Julia will work with the number types that you give it, so if you make it use BigFloats then it'll do that. Local derivative based, derivative-free, global, and integrates with automatic ...

### Fast, lightweight C++ tensor library for dimension-agnostic code

FTensor is a lightweight, header only, fully templated library that includes ergonomic summation notation. It has been tested extensively in 2, 3, and 4 dimensions, but should work fine for any ...

### How to properly calculate CPU and GPU FLOPS performance?

You can calculate GFLOP rates this way, but the numbers are pretty meaningless on today's hardware: Floating point operations require a variable number of clock cycles. An addition is generally ...
• 52.2k

### Is it possible for user written algorithms to outperform libraries' built-in optimized functions?

@ThiysSteel covers a lot, here is another perspective I find important: Even if you have available excellent implementations of any algorithm you might need, you still need to understand some of the ...
• 181
Accepted

### Using computational libraries on a machine without root access

Almost everything you can build and install in your own space. With GNU autotools, you can do something like ./configure --prefix=/path/to/your/work/space ... and ...
• 10.8k

### Performance differences between ATLAS and MKL?

Prior answers to this question have covered most of the salient points, but I want to add one comment with respect to this: does MKL have the upper hand for some tasks? The MKL team is in a unique ...
• 2,096

### Arbitrary Precision Optimization Libraries?

Chris code doesn't work on my machine, so here is my solution. ...
• 71
Accepted

### Getting to know about various BLAS implementations

I'm the primary author of many Julia libraries geared toward "architecture-specific optimizations", including LoopVectorization.jl and Octavian.jl. For BLAS-like operations, one of the most ...
• 186

### Is it possible for user written algorithms to outperform libraries' built-in optimized functions?

To clarify @ThiysSteel's good answer: The point is not to attempt to surpass the optimization of code written by very experienced people, who'd wrangled with it for decades. The point is to acquaint ...
• 171

### Is it possible for user written algorithms to outperform libraries' built-in optimized functions?

I used to try to optimize code via using assembly language (as opposed to C). I had some clear success, where a real-time microphone array worked with assembly language, but it would not work at all ...
• 171

### Fast, lightweight C++ tensor library for dimension-agnostic code

XTensor is a modern approach and is getting more and more popular. https://github.com/QuantStack/xtensor
• 161

### Fast, lightweight C++ tensor library for dimension-agnostic code

I think this new taco lib is really good too. The Tensor Algebra Compiler (taco) is a C++ library that computes tensor algebra expressions on sparse and dense ...
Accepted

### Using GSL for basic operations

Of course it makes sense to use the GSL (or another library for that matter) for several reasons: Don't reinvent the wheel. The work has been done, you can spend your time on more useful things. If ...
• 6,099

### I've developed a derivative-free optimization method, looking for comments

I would like to hear comments from users that have some practical models (e.g. black-box hyperparameter optimization) which are still needed to be solved acceptably - whether this method works or not ...
• 2,136

### Is it possible for user written algorithms to outperform libraries' built-in optimized functions?

This might be tangent but i feel it worth adding. A common way for user code to beat libraries is to exploit structure the libraries are not aware of. Block diagonal matrices are easier to work in ...

### Solve a large-scale linear system of equations with millions of unknowns

You're going to need a large cluster or a supercomputer to solve this. Memory usage is like arc_lupus commented, a double-precision float takes 8 bytes and there will be 1e-6^2 entries. We store just ...

### Finite element library in fortran

I would recommend writing your own code using PETSc. The most complex part of a parallel FE code is parallel assembly and solve and PETSc takes care of both. The latest version of PETSc also has ...
• 1,779

### Looking for Runge-Kutta 8th order in C/C++

summarizing some points: If it's a long-term integration of a non-dissapative model, a symplectic integrator is what you're looking for. Otherwise, since it's an equation of motion, Runge-Kutta ...
Accepted

### FEM libraries with weak forms

You may not be able to express the weak form in deal.II as a mathematical formula, but you come pretty close. For elasticity, the bilinear form reads  a({\mathbf \varphi}_i, {\mathbf \varphi}_j) = ...
• 52.2k
Accepted

### Does the IEEE-754 standard mandate that exp2 is rounded correctly?

According to [1]: "However, the IEEE-754 standard specifies nothing for elementary functions" and "Indeed, the mathematical libraries (libm) provided by operating systems do not guarantee correct ...
• 2,890

### Profiling scientific computing codes on MacOS

One way to approach this would be to record the performance information on your machine (compile with -pg (gprof) compiler option), run your program like you normally would, and write that data to a ...
• 2,346
Accepted

### How do I make sparse solvers to accept custom matvec function insted of matrix?

PETSc does this. See the documentation for MatShell and Section 3.3 in the manual.
Accepted

### Templated Numerical Linear Algebra in Parallel

Elemental available at libelemental.org may have what you ask. From the documentation for release 0.84: Though Elemental does not yet fully support computation over arbitrary fields, the vast ...
Accepted

### New releases of libraries

Lets assume typical versioning semantic as a.b.c, in that case: a - MAJOR version, where incompatibilities and API changes can occur, b - MINOR version, where new functionality can be added but in a ...
Accepted

### C or fortran library to solve linear 2D/3D elliptic PDE

Most of the widely used finite element libraries are written in C++. If all you really care for -- and if all you will ever care for -- is solving an elliptic PDE on a rectangle, then it's probably ...
• 52.2k

### Is it possible for user written algorithms to outperform libraries' built-in optimized functions?

The point of learning how to write "the QR iteration algorithm" is not because eig will be slower. It is because "the QR iteration algorithm" ...

### FEM libraries with weak forms

I myself have not had much experience with computational science. Stil relativity new. However, with the experience that I have had, I will try to answer with the best of my ability. I would have to ...
• 489