GFORTRAN Parallel executables not running in parallel

Christopher O'Brien cjobr... at
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
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
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: =>  (0x00007ffff7fde000) => /opt/intel-12.1/mkl/lib/intel64/ (0x00007ffff77c5000) => /opt/intel-12.1/mkl/lib/intel64/ (
0x00007ffff6fde000) => /opt/intel-12.1/mkl/lib/intel64/ 
(0x00007ffff6900000) => /opt/intel-12.1/mkl/lib/intel64/ (
0x00007ffff5895000) => /opt/fftw-3.2/usr/lib64/ (0x00007ffff5596000) => /opt/openmpi-1.6-gnu/lib/ (
0x00007ffff5393000) => /opt/openmpi-1.6-gnu/lib/ (
0x00007ffff5160000) => /opt/openmpi-1.6-gnu/lib/ (0x00007ffff4dbb000) => /lib64/ (0x00007ffff4b82000) => /usr/lib64/ (0x00007ffff4890000) => /lib64/ (0x00007ffff460b000) => /usr/lib64/ (0x00007ffff4402000) => /lib64/ (0x00007ffff41fa000) => /lib64/ (0x00007ffff3fe0000) => /lib64/ (0x00007ffff3ddd000) => /lib64/ (0x00007ffff3bc7000) => /lib64/ (0x00007ffff39a9000) => /lib64/ (0x00007ffff3615000) 

 /lib64/ (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. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the CP2K-user mailing list