sharc-md / sharc

The SHARC molecular dynamics (MD) program suite is an ab initio MD software package developed to study the excited-state dynamics of molecules.
https://www.sharc-md.org
GNU General Public License v3.0
66 stars 36 forks source link

wfoverlap compilation with columbus/openmolcas #34

Closed ghost closed 2 years ago

ghost commented 2 years ago

Dear SHARC developers,

I am trying to compile the wfoverlap module as required to work with Columbus/molcas, but getting following errors:

ifort -O3 -ipo -qopenmp -fpp -i8 -DEXTBLAS -c sysparam.f90 ifort -O3 -ipo -qopenmp -fpp -i8 -DEXTBLAS -c memlog.f90 ifort -O3 -ipo -qopenmp -fpp -i8 -DEXTBLAS -c my_alloc.f90 ifort -O3 -ipo -qopenmp -fpp -i8 -DEXTBLAS -c global_storage.f90 ifort -O3 -ipo -qopenmp -fpp -i8 -DEXTBLAS -c read_columbus.f90 ifort -O3 -ipo -qopenmp -fpp -i8 -DEXTBLAS -c read_lumorb.f90 ifort -O3 -ipo -qopenmp -fpp -i8 -DEXTBLAS -c read_turbomole.f90 read_turbomole.f90(136): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'. READ(moflio,'(E20.14)',IOSTAT=iost,ADVANCE='no') coeffs(imo,iao) -----------------------^ ifort -O3 -ipo -qopenmp -fpp -i8 -DEXTBLAS -c dgetrf.f ifort -O3 -ipo -qopenmp -fpp -i8 -DEXTBLAS -c lowdin.f90 ifort -O3 -ipo -qopenmp -fpp -i8 -DEXTBLAS -c sortblockmod.f90 ifort -O3 -ipo -qopenmp -fpp -i8 -DEXTBLAS -c calcmod.f90 ifort -O3 -ipo -qopenmp -fpp -i8 -DEXTBLAS -c inputmod.f90 ifort -O3 -ipo -qopenmp -fpp -i8 -DEXTBLAS -c outputmod.f90 ifort -O3 -ipo -qopenmp -fpp -i8 -DEXTBLAS -c read_dalton.f90 ifort -O3 -ipo -qopenmp -fpp -i8 -DEXTBLAS -c read_molcas.f90 ifort -O3 -ipo -qopenmp -fpp -i8 -DEXTBLAS -c iomod.f90 ifort -O3 -ipo -qopenmp -fpp -i8 -DEXTBLAS main.f90 sysparam.o memlog.o my_alloc.o global_storage.o read_columbus.o read_lumorb.o read_turbomole.o dgetrf.o lowdin.o sortblockmod.o calcmod.o inputmod.o outputmod.o read_dalton.o read_molcas.o iomod.o -o wfoverlap.x /columbus/Columbus/libmolcas_col.a /columbus/Columbus/colib.a /columbus/Columbus/blaswrapper.a -Wl,--start-group /software/intel/parallel_studio_xe_2020_update1/mkl/lib/intel64/libmkl_intel_ilp64.a /software/intel/parallel_studio_xe_2020_update1/mkl/lib/intel64/libmkl_sequential.a /software/intel/parallel_studio_xe_2020_update1/mkl/lib/intel64/libmkl_core.a -Wl,--end-group -lm /columbus/Columbus/libmolcascol.a(auxv.f.o): In function `izero': auxv.f:(.text+0x30): multiple definition of izero_' /columbus/Columbus/libmolcas_col.a(molcaswrapper.o):molcaswrapper.f:(.text+0x60): first defined here /columbus/Columbus/blaswrapper.a(blaswrapper.o): In functionicopy': blaswrapper.f:(.text+0x530): multiple definition of `icopy' /columbus/Columbus/libmolcas_col.a(icopy.f.o):icopy.f:(.text+0x0): first defined here make: *** [Makefile:82: wfoverlap.x] Error 1

I changed my Makefile like this:

ifort

STATIC = -static-intel -qopenmp-link=static

PROFILE = # -pg OMP = -qopenmp FC = ifort DEBUG = #-g #-warn all # -traceback -check bounds OPT = -O3 -ipo FCFLAGS = $(OPT) $(OMP) $(PROFILE) $(DEBUG) -fpp -i8 -DEXTBLAS LINKFLAGS = $(PROFILE) #$(STATIC) $(PROFILE)

openmp (multithreaded) compilation

LALIB = -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_ilp64.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_intel_thread.a -Wl,--end-group -lpthread -lm -ldl LALIB = -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_ilp64.a $(MKLROOT)/lib/intel64/libmkl_sequential.a $(MKLROOT)/lib/intel64/libmkl_core.a -Wl,--end-group -lm

gfortran

FC = gfortran

FCFLAGS = -O0 -cpp -g3 -fdefault-integer-8 -Wall -fbacktrace -DEXTBLAS

LINKFLAGS =

LALIB = -lblas -llapack -fopenmp

############## Main objects and libraries #######

MAINOBS=sysparam.o memlog.o my_alloc.o global_storage.o read_columbus.o read_lumorb.o read_turbomole.o dgetrf.o lowdin.o sortblockmod.o calcmod.o inputmod.o outputmod.o DUMMYOBS=read_dalton_dummy.o read_molcas_dummy.o

############## Dalton and SEWARD ################

no Dalton and SEWARD support

LIBS = $(LALIB)

OPTOBS = $(DUMMYOBS)

activate direct reading of Dalton and Seward files

LIBS = $(COLUMBUS)/libmolcas_col.a $(COLUMBUS)/colib.a $(COLUMBUS)/blaswrapper.a $(LALIB) OPTOBS = read_dalton.o read_molcas.o

Anything that I got wrong?

Thanks, Zihan

markusoppel commented 2 years ago

Hi,

I am sorry but I don't understand your Makefile and the changes you have made. Looking at the error message, I suggest to add the following option to the link flag: --allow-multiple-definition

Give it a try.

ghost commented 2 years ago

Hi, by having -zmuldefs in linkflag helped, thanks!