GFORTRAN Parallel executables not running in parallel

Christopher O'Brien cjobr... at gmail.com
Sat Feb 21 18:48:09 UTC 2015


I am attempting to build CP2K 2.6.0 using GCC 4.9.2, FFTW3, OPENMPI 1.6, 
and Intel MKL 12.1. I use a module system to set the environment variables 
included in the arch file. The code builds without incident, but when 
attempting to run the parallel code, I simply get n copies of the output 
before it fails due to (what I think is) an out of memory error when 
attempting to perform the SCF wave function optimization. I am building 
with a slightly modified Linux-x86_64-mkl_empa arch file.
CC       = cc
FC       = mpif90
LD       = mpif90
AR       = ar -r
CPPFLAGS = 
DFLAGS   = -D__parallel -D__GFORTRAN -D__SCALAPACK -D__BLACS -D__FFTSG -D__LIBINT 
-D__FFTW3 -D__ELPA -D__LIBCX2
FCFLAGS  = -O3 -ffast-math -funroll-loops -ftree-vectorize -march=native -
ffree-form $(DFLAGS)  -g  -I$(MKL_INCLUDE) -I$(FFTW_INCLUDE) \
           -I$(HOME)/build/cp2klibs/include -I$(HOME)/build/cp2klibs/include
/elpa/modules
LDFLAGS  = $(FCFLAGS) -L$(HOME)/build/cp2klibs/lib -L$(GNU_LIBS) -L$(MKL_LIB
) -L$(FFTW_LIB) -L$(MPIHOME)/lib
LIBS     =  -lmkl_scalapack_lp64 -lmkl_blacs_openmpi_lp64 -lmkl_gf_lp64  -lmkl_sequential 
-lmkl_core \
  -lderiv -lint -lfftw3 -lxc -lelpa
 


It does appear the the executable, which compiles without error is properly 
linked. The output for ldd is shown:
 linux-vdso.so.1 =>  (0x00007ffff7fde000)

 libmkl_scalapack_lp64.so => /opt/intel-12.1/mkl/lib/intel64/
libmkl_scalapack_lp64.so (0x00007ffff77c5000) 

 libmkl_gf_lp64.so => /opt/intel-12.1/mkl/lib/intel64/libmkl_gf_lp64.so (
0x00007ffff6fde000) 

 libmkl_sequential.so => /opt/intel-12.1/mkl/lib/intel64/libmkl_sequential.so 
(0x00007ffff6900000) 

 libmkl_core.so => /opt/intel-12.1/mkl/lib/intel64/libmkl_core.so (
0x00007ffff5895000) 

 libfftw3.so.3 => /opt/fftw-3.2/usr/lib64/libfftw3.so.3 (0x00007ffff5596000) 

 libmpi_f90.so.1 => /opt/openmpi-1.6-gnu/lib/libmpi_f90.so.1 (
0x00007ffff5393000) 

 libmpi_f77.so.1 => /opt/openmpi-1.6-gnu/lib/libmpi_f77.so.1 (
0x00007ffff5160000) 

 libmpi.so.1 => /opt/openmpi-1.6-gnu/lib/libmpi.so.1 (0x00007ffff4dbb000) 

 libdl.so.2 => /lib64/libdl.so.2 (0x00007ffff4b82000) 

 libgfortran.so.3 => /usr/lib64/libgfortran.so.3 (0x00007ffff4890000) 

 libm.so.6 => /lib64/libm.so.6 (0x00007ffff460b000) 

 libnuma.so.1 => /usr/lib64/libnuma.so.1 (0x00007ffff4402000) 

 librt.so.1 => /lib64/librt.so.1 (0x00007ffff41fa000) 

 libnsl.so.1 => /lib64/libnsl.so.1 (0x00007ffff3fe0000) 

 libutil.so.1 => /lib64/libutil.so.1 (0x00007ffff3ddd000) 

 libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007ffff3bc7000) 

 libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ffff39a9000) 

 libc.so.6 => /lib64/libc.so.6 (0x00007ffff3615000) 

 /lib64/ld-linux-x86-64.so.2 (0x00007ffff7fdf000)



On a related note, I have noticed in other arch files the 
suggestion to include 

#Better with mkl (intel lapack/blas) only 

#DFLAGS   = -D__INTEL -D__FFTSG -D__parallel

Does this preclude the use of -D__SCALAPCK and -D__BLACS? 

P.S. Has anyone had any luck (and it seems that successfully building CP2K 
with intel compilers is entirely due to luck) with building CP2K with intel 
compilers? I have attempted to use versions >=12.1 with out success using 
modified arch files. It appears that the icc compiler is not processing *.F 
files at all, and builds empty (*.a) libraries. 

Thanks,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20150221/47e313f9/attachment.htm>


More information about the CP2K-user mailing list