Linked Questions

79 votes
5 answers

How much better are Fortran compilers really?

This question is an extension of two discussions that came up recently in the replies to "C++ vs Fortran for HPC". And it is a bit more of a challenge than a question... One of the most often-heard ...
Pedro's user avatar
  • 9,543
32 votes
4 answers

What tools or approaches are available to speed up code written in Python?

Background: I think I might want to port some code that calculates matrix exponential-vector products using a Krylov subspace method from MATLAB to Python. (Specifically, Jitse Niesen's expmvp ...
Geoff Oxberry's user avatar
17 votes
4 answers

Profiling CFD code with Callgrind

I'm using Valgrind + Callgrind to profile a solver I have written. As the Valgrind user manual states, I've compiled my code with the debugging options for the compiler: "Without debugging info, ...
tmaric's user avatar
  • 1,916
17 votes
2 answers

(how to) write simulations that run faster?

I have started using python as the programming language for doing all my assignments in CFD. I have a very little experience in programming. I am from mechanical engineering background and am pursuing ...
Subodh's user avatar
  • 1,480
13 votes
3 answers

Is there any benefit to compiling LAPACK from source versus installing the prebuilt package from Ubuntu?

I know that ATLAS is able to optimize itself for the machine it is compiled on and thus maximum benefits are found by compiling from source. Is there any benefit to compiling LAPACK from source? It ...
OSE's user avatar
  • 397
6 votes
4 answers

Beating typical BLAS libraries matrix multiplication performance

A dull matrix multiplication algorithm where we use the formula $$C_{ij}=\sum_{k}A_{ik}B_{kj}$$ By literally following this in 3 loops we'll get a very slow program, because we don't utilize ...
The Quantum Physicist's user avatar
6 votes
5 answers

What other method can be used to solve differential equations except ode functions in Matlab?

Recently I am taking advantage of the ode45, as well as ode23s, ode15s solvers in ...
SunnySky's user avatar
  • 163
10 votes
4 answers

Are DAXPY, DCOPY, DSCAL overkills?

I have implemented CG in FORTRAN by linking it to Intel MKL. When there are statements like: (Refer Wikipedia) p=r; x=x+alpha*p r=r-alpha*Ap; or similar ...
Inquest's user avatar
  • 3,344
11 votes
2 answers

What is the underlying structure of scientific code performance?

Consider two computers with different hardware and software configurations. When running the exact same serial Navier-Stokes code on each platform it takes x and y time to execute one iteration for ...
Isopycnal Oscillation's user avatar
2 votes
2 answers

Lua and Fortran (or Python) I/O

I am writing a global climate simulation software system. My idea is the following : At the top of everything, I interface to the OS using D, a very powerful language for compile time code generation....
Sean's user avatar
  • 121
3 votes
3 answers

How do I get reliable timing data for time spent in function calls in my code?

This question is a follow-up to Fortran: Best way to time sections of your code?. If I want to time functions in my code, I know I could use gprof or kcachegrind. I also know that the results from ...
Geoff Oxberry's user avatar
2 votes
1 answer

Profiling optimized C code using gprof

I have a simple C code with many function calls, which I profiled using gprof. ...
user avatar
4 votes
1 answer

Increasing thread number degrades performance

I have a problem with parallelization and the brownian dynamics (molecular dynamics) code that I am using. We have our own home-grown framework at the university, and recently we've made the change ...
NuclearAlchemist's user avatar
3 votes
2 answers

Efficiently changing basis on many diagonal matrices

I have to perform a [complex] basis transformation on a large number of [real] diagonal matrices: $$ \langle b_i | A | b_j \rangle = \sum_k \langle b_i | \bar{b}_k\rangle \langle\bar{b}_k | A | \bar{b}...
Max Hutchinson's user avatar
1 vote
1 answer

What are some tips on developing a problem-specific ODE solver?

I have a small system of stiff ODEs describing a chemical reaction. The right-hand side is quite complicated, as well as the Jacobian. This equation will be solved many times with different initial ...
faleichik's user avatar
  • 1,842