Closed moravveji closed 4 years ago
Hi, The modules were not properly written in « Makefile.ifort » that you were using in your script but this has been corrected now. Hopefully it will fix your issue.
Cheers, Louis
Thanks @louislagardere for the fix. Two remarks below:
mpiifort -O3 -xHost -fopenmp -no-ipo -no-prec-div -assume cc_omp -inline -heap-arrays -c fft_mpi.f90 -I/MyApps/2DECOMP-FFT/1.5.847-intel-2018a/include -L/MyApps/2DECOMP-FFT/1.5.847-intel-2018a/lib -l2decomp_fft fft_mpi.f90(36): error #6633: The type of the actual argument differs from the type of the dummy argument. [COMM_LOC] call decomp_2d_init(nx,ny,nz,p_row,p_col,comm_loc) -----------------------------------------^ compilation aborted for fft_mpi.f90 (code 1) make: *** [fft_mpi.o] Error 1
Hi, I'm pretty sure you're using the gnu interface of the Intel compiler. -fopenmp is the correct option for mpif90 with gfortran.
So, you should make clean in 2decomp_fft/src directory, remove the files in 2decomp_fft/include and 2decomp_fft/lib, make clean in source directory, and retry compiling everything, being sure that you use mpiifort in the 2decomp_fft/src Makefile AND in the source/Makefile
The Release 1.2 will feature a configure script, so that you should not have this kind of probles anymore
@lhjolly: thanks for your remarks. I modified the openmp flag to -qopenmp
, and I get the exact same error as before
mpiifort -O3 -xHost -qopenmp -no-ipo -no-prec-div -assume cc_omp -inline -heap-arrays -c fft_mpi.f90 -I/myApps/software/2DECOMP-FFT/1.5.847-intel-2018a/include -L/myApps/software/2DECOMP-FFT/1.5.847-intel-2018a/lib -l2decomp_fft fft_mpi.f90(36): error #6633: The type of the actual argument differs from the type of the dummy argument. [COMM_LOC] call decomp_2d_init(nx,ny,nz,p_row,p_col,comm_loc) -----------------------------------------^ compilation aborted for fft_mpi.f90 (code 1) make: *** [fft_mpi.o] Error 1
To ensure you that the 2DECOMP_FFT and Tinker-HP are both compiled with mpiifort
, I have attached the redirected stdout/stderr of building both packages.
2dcomp-and-tiner-logs.zip
Hi, Thanks for sending me the logs. It appears that you don't use the 2decomp_fft library distributed with Tinker-HP, but the last version downloaded on http://www.2decomp.org/download.html. As we said in the readme.pdf, we have slightly modified the 2decomp_fft library.
In particular, the decomp2d.f90 file in 2decomp_fft/src distributed with Tinker-HP defines the decomp_2d_init subroutine as :
subroutine decomp_2d_init(nx,ny,nz,p_row,p_col,comm_loc,periodic_bc)
while the same file in the version available on the web defines the decomp_2d_init subroutine as :
subroutine decomp_2d_init(nx,ny,nz,p_row,p_col,periodic_bc)
without the comm_loc parameter. This causes the error you got.
Please, compile the 2decomp_fft library distributed with Tinker-HP, and everything should be fine.
Excellent feedback! So, I went through the docs again, and I managed to modify my script to build 2decomp_fft, and then Tinker-HP. I have to mention that there are still few tiny caveats in the installation instructions, which I have figured out in the script. E.g.
-DOCC
?make
, one better do
DESTDIR=</install/path/to/2decomp_ffte> make install
The good news is that I get past installing 2decomp_fft, and I can proceed to some extent building Tinker-HP; however, I still get the following error:
a - prime.o a - prmkey.o ar: promo.o: No such file or directory make: *** [libtinker] Error 1
Hi
The build dependencies are those of the original 2decom_fft library. We don't need them for Tinker-HP You should only use -DDOUBLE_PREC. We did not investigate the other options. But I'll do. Better not to use it for now I've committed a(nother) correction in Makefile.ifort and Makefile.gfortran. We forgot to add the promo.o object file in the list. I've tested and compiled v1.1 with what is on the github now. So, this should be OK now. Sorry for the inconveniences.
Hey,
The good news is that I get past the promo.o
build; the not-so-good news is that there are still compilation issues. Have you tried yourself using Intel 2018a toolchain?
(new error logs attached)
Tinker-HP.zip
The error is not related to intel18a. Indeed, in the source directory, you should find analyze.x.
The problem is that the bin directory has not been created. So, do a mkdir -p bin in the main directory (where lives the directory source).
Thanks @lhjolly for the last tip. That certainly resolved the build issue.
For future record, I copy-paste my final script which addresses all issues above, and close this thread.
`#!/usr/bin/env bash
umask 0002 set -e
module purge module load intel/2018a module load imkl/2018.1.163-iimpi-2018a module load FFTW/3.3.8-intel-2018a
module load git/2.16.1-GCCcore-6.4.0
cwd=$(pwd) arch=$VSC_ARCH_LOCAL version='1.1' dir_src="$cwd/Tinker-HP/v$version" dir_bin="$dir_src/bin" makefile="$dir_src/source/Makefile" backup="$dir_src/source/Makefile.bak"
dir_2de_top="$dir_src/2decomp_fft" dir_2de_src="$dir_2de_top/src" makefile_2de="$dir_2de_src/Makefile.inc" backup_2de="${makefile_2de}.bak"
dir_prefix=$VSC_DATA dir_inst="$dir_prefix/Tinker-HP/${version}-intel-2018a" dir_2de_inst="$dir_inst/2DECOMP-FFT"
test -d $dir_src || git clone https://github.com/TinkerTools/Tinker-HP.git test -d $dir_inst || rm -rf $dir_inst mkdir -p $dir_inst test -f $backup || cp $makefile $backup # backup test -d $dir_bin && rm -rf $dir_bin mkdir -p $dir_bin
test -f $makefile_2de || (echo "Error: failed to locate $makefile_2de"; exit 1) test -f $backup_2de || cp $makefile_2de $backup_2de # backup test -f $backup_2de && cp $backup_2de $makefile_2de # restore test -d $dir_2de_top/include || mkdir -p $dir_2de_top/include test -d $dir_2de_inst || mkdir -p $dir_2de_inst
cd $dir_2de_top
decomp_options="OPTIONS=-DDOUBLE_PREC #" decomp_fftw="FFTW_PATH=$EBROOTFFTW#" decomp_f90="F90=mpiifort # " decomp_cray="CRAYPTR= # " decomp_cc="CC=mpiicc # " decomp_acml="LIB_ACML= #" decomp_fftpack5_home="FFTPACK5_PATH= #" decomp_fftpack5_lib="LIB_FFTPACK5= #" decomp_mkl_path="MKL_LIB_PATH=${EBROOTIMKL}/compilers_and_libraries_2018.1.163/linux/mkl/lib/ia32_lin#" decomp_ffte_path="FFTE_PATH= # " decomp_ffte_lib="LIB_FFTE = # " sed -i "s|OPTIONS=-DDOUBLE_PREC|$decomp_options|g" $makefile_2de sed -i "s|FFTW_PATH=|$decomp_fftw|g" $makefile_2de sed -i "s|F90=mpif90|$decomp_f90|g" $makefile_2de sed -i "s|CRAYPTR=|$decomp_cray|g" $makefile_2de sed -i "s|CC=mpicc|$decomp_cc|g" $makefile_2de sed -i "s|LIB_ACML=|$decomp_acml|g" $makefile_2de sed -i "s|FFTPACK5_PATH=|$decomp_ffte_path|g" $makefile_2de sed -i "s|LIB_FFTPACK5=|$decomp_fftpack5_lib|g" $makefile_2de sed -i "s|MKL_LIB_PATH=|$decomp_mkl_path|g" $makefile_2de sed -i "s|FFTE_PATH=|$decomp_ffte_path|g" $makefile_2de sed -i "s|LIB_FFTE=|$decomp_ffte_lib|g" $makefile_2de
make clean DESTDIR=$dir_2de_inst make install test $? -eq 0 || (echo "Error: make for 2decomp-fft failed"; exit 1)
cd $dir_src cp "$dir_src/source/Makefile.ifort" $makefile # hence, use intel makefile sed -i "s|RunF77 =|RunF77=mpiifort#|g" $makefile sed -i "s|MKLDIR =|MKLDIR=$MKLROOT#|g" $makefile sed -i "s|FFTDECOMPDIR =|FFTDECOMPDIR=$dir_2de_inst#|g" $makefile sed -i "s|-openmp|-qopenmp|g" $makefile
cd source make clean
make test $? -eq 0 || (echo "Error: make failed"; exit 1)
cp -rv $dir_bin $dir_inst/
ls $dir_inst
echo "Installation succeeded at: $dir_inst" `
Hi,
Thanks for this script. It'll be useful. For the 1.2 Release, we'll ship a configure script.
Hi.
I am trying to install Tinker-HP for one of our cluster users, on SkyLake machines using Intel/2018a toolchain. The 2DECOMP-FFT module is already installed.
I have tried to put a script together which (hopefully) follows the installation instructions. However, when building the code, I get an error from make (title above)
I have attached the build script. May I kindly ask you to go through this short script, and let me know if I am making any mistake in setting the environments before building?
Kind regards, Ehsan tinker-hp.zip