Problem with MPI and CP2k

M. Brehm brehmin... at googlemail.com
Wed Feb 19 14:35:07 UTC 2014


Hello,

currently, I am trying to get a parallel CP2k to run on the cluster of my 
new institution. I have some experience in compiling MPI-parallelized CP2k. 
On some other clusters before (and on my local machine) it always worked 
fine. But now I am facing a problem, and am out of ideas how to solve it. 
Your suggestions are appreciated.

The compilation itself works fine (GCC 4.7.1, OpenMPI, OpenBLAS, Scalapack, 
Libint, LibXC, FFTW3). Executing a single process via "mpirun cp2k.popt" 
also works fine. All regtests are passed.

But if I specify "mpirun -np 2 cp2k.popt" (or more than 2), it seems that 
mpirun spawns independent CP2k processes, which do not see or know each 
other. All output is written multiple times to stdout, and CP2k says: 
"GLOBAL| Total number of message passing processes    1", which is wrong, 
because there are several processes. Then, of course, it crashes, because 
of this inconsistency. (The crash is "err=-300 sum of local cols not equal 
global colscp_fm_struct.F")

I tried many things to fix this. Our cluster has the module system, so I 
loaded all different MPI distributions which were available (OpenMPI in 
several versions, MPICH2 in several versions, Intel MPI). The MPI versions 
match the compiler I am using (all compiled with GCC 4.7.1). The result is 
always exactly the same like described above. I also tried to compile an 
own version of OpenMPI, but still the result is the same.

I wrote a small MPI test program, which just prints the number of total MPI 
processes on the screen. This works fine! Other MPI-parallelized programs 
are working as well. The Scalapack library has some test executables - 
those also run fine in parallel, and show a nice scaling behavior. This 
error only occurs in conjunction with CP2k.

Do you have any hints on the cause for this error? Any help is appreciated.

Best regards,
Martin

P.S.: The makefile I used:

CC         = mpicc
CPP        =
FC         = mpif90
LD         = mpif90
AR         = ar -r
CPPFLAGS =
DFLAGS   = -D__GFORTRAN -D__FFTSG -D__LIBINT -D__FFTW3 -D__LIBXC2 
-D__PARALLEL -D__BLACS -D__SCALAPACK
FCFLAGS  = -O3 -march=native -ffast-math -funroll-loops -g -ffree-form 
-I/home/brehmm/CP2k/fftw_3.3.3/include $(DFLAGS)
LDFLAGS  = $(FCFLAGS)  -static-libgfortran
LIBS     = libderiv.a libint.a -lstdc++ libfftw3.a libscalapack.a 
libopenblas.a libxc.a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20140219/2f6cc971/attachment.htm>


More information about the CP2K-user mailing list