Monday, June 4, 2012

Compile QE using parallel make

It takes too long to compile espresso for the first time. Especially if you are dealing with several versions at the same time, on different machines and trying out different MPI or scalapack options etc, forget about doing any actual physics that day, all goes to espresso installation and compilation.

I like to use parallel gnu make to get things quite faster

> make -j 15 pw

But the Makefile of espresso is buggy, in the sense that the dependencies are not listed properly, at the moment thanks to the generate_vdW_kernel_table.f90 Normally I would just list it on the dependencies and be done with it, but this is Quantum Espresso, you don't know whose hands are gonna be in the code in a month and it will be broken the same.. (I know coz I have done similar stuff when I started developing with it:)

So I now do the dirty way around
>make -j 15 -k pw; make -j 15 pw

-j or --jobs to run parallel, default is 1, -k for "keep going" even if you have encountered errors in some commands. 15 is the number of jobs I have asked for. There is a dynamic load determining option, -l . If you need more from your gnu make, well, google is your friend  :) 

hope this helps.

No comments:

Post a Comment