<div dir="ltr">Good morning!<br><br>Compiling cp2k on the supercomputer I've formed the best arch-file that I was able to do:<br><br><span style="background-color: rgb(204, 204, 204);">MKL_ROOT  = /opt/intel/composer_xe_2013.2.146/mkl<br>MKL_LIB = $(MKL_ROOT)/lib/intel64<br>MKL_INCLUDE = $(MKL_ROOT)/include/fftw<br>XC_LIB = $(HOME)/local/libxc-202i/lib<br>XC_INC = $(HOME)/local/libxc-202i/include<br>LI_LIB = $(HOME)/local/libint-114i/lib<br>LI_INC = $(HOME)/local/libint-114i/include<br>CU_LIB = /opt/cuda-5.0/lib64<br>NVCC     = /opt/cuda-5.0/bin/nvcc<br>CC       = mpiicc -mt_mpi -static_mpi -openmp<br>CPP      = <br>FC       = mpiifort -mt_mpi -FR <br>LD       = mpiifort -mt_mpi -i-static -static_mpi -openmp<br>AR       = xiar -r<br>DFLAGS   = -D__INTEL -D__FFTSG -D__FFTW3 -D__FFTMKL -D__LIBXC2 -D__parallel -D__PW_CUDA -D__DBCSR_CUDA -D__HAS_NO_CUDA_SM30 -D__BLACS -D__SCALAPACK<br>NVFLAGS  = $(DFLAGS) -arch=sm_20<br>CPPFLAGS = -C -traditional $(DFLAGS) -I$(MKL_INCLUDE)<br>FCFLAGS  = $(DFLAGS) -I$(MKL_INCLUDE) -O3 -xHost -heap-arrays 64 -funroll-loops -fpp -free -openmp<br>FCFLAGS2 = $(DFLAGS) -O1 -xHost -heap-arrays 64 -fpp -free -openmp<br>LDFLAGS  = $(FCFLAGS) -L$(CU_LIB) -L$(LI_LIB) -L$(XC_LIB)<br>LIBS     = -Wl,--start-group \<br>$(MKL_LIB)/libmkl_scalapack_lp64.a \<br>$(MKL_LIB)/libmkl_blacs_intelmpi_lp64.a \<br>$(MKL_LIB)/libmkl_intel_lp64.a \<br>$(MKL_LIB)/libfftw3xf_intel.a \<br>$(MKL_LIB)/libmkl_sequential.a \<br>$(MKL_LIB)/libmkl_core.a \<br>-Wl,--end-group \<br>$(XC_LIB)/libxc.a \<br>$(LI_LIB)/libint.a \<br>$(LI_LIB)/libderiv.a \<br>$(CU_LIB)/libcudart.so \<br>$(CU_LIB)/libcufft.so \<br>$(CU_LIB)/libcublas.so \<br>-lrt -lpthread <br>OBJECTS_ARCHITECTURE = machine_intel.o<br>graphcon.o: graphcon.F<br>    $(FC) -c $(FCFLAGS2) $<</span><br><br><br>But when I start the test calculation with <br><br><span style="background-color: rgb(204, 204, 204);">export I_MPI_PIN_DOMAIN=omp<br>export OMP_NUM_THREADS=4<br>export MKL_SERIAL=yes</span><br><br>and   'PREFERRED_FFT_LIBRARY FFTSG' set in the input file ... than I always obtain SEGFAULT with glibc found 'double memory free or corruption'. For instance:<br><br><span style="background-color: rgb(204, 204, 204);">*** glibc detected *** /mnt/data/users/dm4/vol12/irinairbis_251473/_scratch/bin/cp2k-240.impi410.cuda.fftw.mt: double free or corruption (fasttop): 0x0000000004ffdc20 ***<br>*** glibc detected *** /mnt/data/users/dm4/vol12/irinairbis_251473/_scratch/bin/cp2k-240.impi410.cuda.fftw.mt: double free or corruption (fasttop): 0x0000000004ff8750 ***</span><br><br> And this mistake is only in OPENMP mode, when compiled with flag -mt_mpi. When compiled without -mt_mpi, than all is OK, but OMP_NUM_THREADS doesn't work. When I recompile it with fftw (instead of mkl fftw wrapper) the mistake doesn't disapear....<br><br>In the another machine I've built cp2k with openmpi+openmp+mkl+fftw+cuda and everything was allright. But thereis no openmpi supporting openmp on the machine and so I had to solve intel-mkl problems..  <br><br>Does anybody have any ideas about it? <br><br></div>