Monday, July 02, 2018

Compile MOLCAS 8.2 at ccuf1 with OpenMPI 3.0.0 and libhdf5-1.10.2

Note that libhdf5 installed at ccuf1 supports OpenMPI, not MPICH2
apt-get install libhdf5-openmpi-dev

Use the new libhdf5-1.10.2 compiled at ccuf1 and installed under
/pkg1/local/lib 
(libhdf5 configured with
./configure --prefix=/pkg1/local --enable-parallel --enable-fortran --enable-direct-vfd  and compiled by Intel Fortran)

Enter bash
. /pkg1/intel/compilers_and_libraries_2018.1.163/linux/bin/compilervars.sh intel64
export PATH="/pkg1/local/openmpi-3.0.0-i18/bin:$PATH"
export LD_LIBRARY_PATH="/pkg1/local/openmpi-3.0.0-i18/lib:$LD_LIBRARY_PATH"

mkdir /temp/molcas82.hdf5
cd /temp/molcas82.hdf5
tar zxf /f01/source/chem/molcas/molcas82.tar.gz
cd molcas82
cp /f01/source/chem/molcas/license.dat.gz .
gzip -d license.dat.gz 
vi cfg/intel.comp
   and add -prec-sqrt to  OPT='-O3 -no-prec-div -static -xHost' if set -speed fast

(Use ./setup first to determine configure parameters beforehand, the following is concluded: )
./configure -64 -parallel -compiler intel -mpiroot /pkg1/local/openmpi-3.0.0-i18 -mpirun /pkg1/local/openmpi-3.0.0-i18/bin -blas MKL -blas_lib BEGINLIST -Wl,--no-as-needed -L/pkg1/intel/compilers_and_libraries_2018.1.163/linux/mkl/lib/intel64 -lmkl_intel_ilp64 -lmkl_core -lmkl_sequential -lpthread -lm ENDLIST -hdf5_lib /pkg1/local/lib -hdf5_inc /pkg1/local/include

make -j 8 >& make.log &

If this fails, type make >& make.log2 & again without -j parallellism. After successful build,
copy the whole directory to /pkg1/chem/molcas/molcas82.i18.ompi3.hdf5

Put the following line
/pkg1/chem/molcas/molcas82.i18.ompi3.hdf5
under your $HOME/.Molcas/molcas 
and run with the script
/usr/local/bin/molcas82.i18.ompi3.hdf5

Also include /pkg1/local/lib within $LD_LIBRARY_PATH at run time if libhdf5.so.101 is not found.
In addition, pay attention to the warning of ld at the linking stage:
ld: warning: libmpi.so.12, needed by /pkg1/local/lib/libhdf5.so, may conflict with libmpi.so.40 

************ NECI test compile with MOLCAS 8.4  ************
Test 1:
cmake -DENABLE_HDF5=ON -DFFTW=ON -DMPI=ON -DSHARED_MEMORY=ON \ -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx \ -DCMAKE_Fortran_COMPILER=mpif77 ../../neci/



Test 2: