Hello Everyone,
I want to run MEGANv3.2 and when I try to run pre-compiled executable files I get the following error:
error while loading shared libraries: libiomp5.so: cannot open shared object file: No such file or directory
I realized that this error is because the executable files were created using “ifort” compilers and my system supports “gfortran”. (I do not whether I am write or wrong about this)
Then I installed Intel OneAPI and tried to run the programs while setting LD_LIBRARY_PATH pointing to libiomp5.so library, and I got this error:
Please verify that both the operating system and the processor support Intel(R) MOVBE, F16C, FMA, BMI, LZCNT and AVX2 instructions.
Afterwards I tried to compile the programs by changing the compilers from ifort to gfortran. Here is what my makefile looks like after changing the FC:
SHELL=/bin/sh
PROGRAM= megcan
FC = gfortran
#FFLAGS= -O -Mvect=sse -Mextend -Msecond_underscore -Bstatic_pgi -Mlfs
#FFLAGS = -O3 –fixed -132 -traceback -qopenmp -xHost –Bstatic
FFLAGS = -O3 -fixed -132 -traceback -qopenmp -xHost -Bstatic
LIBS = -L/home/fernando/Build_CMAQ/LIBRARIES/ioapi/lib -lioapi \
-L/home/fernando/Build_CMAQ/LIBRARIES/netcdf/lib -lnetcdf -lnetcdff
INCLUDE = -I/home/fernando/Build_CMAQ/src/ioapi/ioapi/fixed_src \
-I/home/fernando/Build_CMAQ/LIBRARIES/netcdf/include \
-I$(CURDIR)/INCLDIR
OBJS = \
checkmem.o \
findlai.o \
$(PROGRAM).o
MODULES= *mod.f
#-----------------------------------------------------------------------
# line to allow file.mod files to be recognised by GNU make
%.o : %.mod
#-----------------------------------------------------------------------
.SUFFIXES : .f .f .o
.f.o:
$(FC) -c $(FFLAGS) $(INCLUDE) $<
.F.o:
$(FC) -c $(FFLAGS) $(INCLUDE) $<
#-----------------------------------------------------------------------
$(PROGRAM): $(OBJS)
$(FC) $(FFLAGS) $(INCLUDE) -o $(@) $(OBJS) $(LIBS)
#-----------------------------------------------------------------------
clean:
rm -f $(PROGRAM) *.o *.mod *.core
#-----------------------------------------------------------------------
And I got the following errors while performing “make” on this:
gfortran -c -O3 -fixed -132 -traceback -qopenmp -xHost -Bstatic -I/home/fernando/Build_CMAQ/src/ioapi/ioapi/fixed_src -I/home/fernando/Build_CMAQ/LIBRARIES/netcdf/include -I/home/fernando/megan32/MEGANv3.2_Dec_2021/src/MEGCAN/INCLDIR checkmem.f
gfortran: error: unrecognized command line option ‘-fixed’; did you mean ‘-ffixed-’?
gfortran: error: unrecognized command line option ‘-132’; did you mean ‘-m32’?
gfortran: error: unrecognized command line option ‘-traceback’
gfortran: error: unrecognized command line option ‘-qopenmp’; did you mean ‘-fopenmp’?
make: *** [makefile:29: checkmem.o] Error 1
After that I changed the FFLAGS to “FFLAGS = FFLAGS = -O3 -fopenmp -xHost -Bstatic” and got this error:
gfortran -c -O3 -fopenmp -xHost -Bstatic -I/home/fernando/Build_CMAQ/src/ioapi/ioapi/fixed_src -I/home/fernando/Build_CMAQ/LIBRARIES/netcdf/include -I/home/fernando/megan32/MEGANv3.2_Dec_2021/src/MEGCAN/INCLDIR checkmem.f
gfortran: error: language Host not recognized
gfortran: error: language Host not recognized
make: *** [makefile:29: checkmem.o] Error 1
I would really appreciate it if someone could help me with this problem. I am a beginner and I do not know much about this matter.
Thanks
Fer