Monday 25 June 2012

compiling cp2k in parallel with compiled fftw3 blacs scalapack lapack and blas!

Welcome to heartbeat. COZ we got life.
I recently managed to get cp2k compiled with my own blas and lapack, and here is how i did it.
First i got myself a copy of BLAS, from netlib

So we decompress the file and get it complied: So i changed the make.inc to reflect my preference for compilers (ifort is available on the cluster i was on) and on the terminal: you should get a file named blas_Linux.a in the build directory Now we can compile fftw3: You should have under the directory 'myname' the header files and the libraries When that is done lets get the next library compiled: LAPACK Now you need to edit make.inc to point to the blas library you just compiled or edit make.inc to point to it Here are some of the values that i changed so now type and when its done got to the TESTING directory and find out if any of the *out files show obvious failures. In the build directory you should now have a file named: Now we need to get MPIBLACS compiled: Now we need to find out the options that are to be set in the Bmake.inc, so you need to know the path to the BLACS source directory that your in. xsyserrors compilation needs the mpilib directory and the libmpi.so file, so make sure you know where it is on your computer. Next we run the programs to get the information we need: Take note of the outputs and adjust in the commands later to what YOU ACTUALLY GET. And we can do some sanity checks, before moving to the next step With this information we go back to the main build directory, and on the same line run: Then: Remember to set the TRANSCOMM option above to -DUseMpi2
Now change directory to TESTING, and on the same line do: Now feel free to run the tests and see what you get. In the main build directory you should have a LIB folder with the libs you just created.
For scalapack: you need to know the path to all the libs you just created above, so lets get the source, I edited the SLmake.inc to reflect my preferences: These are the only things i changed. Then: and there you go, you have the libs you need for cp2k. So now for cp2k I edited one of the make instruction files under the arch directory to suit my needs and i called it myname_mine.popt with the following content: and now cd to the makefiles directory and make: Cool, now all things held constant you should get an executable in the home directory, test it! And i'l go have some tea.

1 comment:

  1. I think your comments on CP2K installation is quite clear and helpful, even better than the official one! I like it very much!

    ReplyDelete