Compilation error, gfortran: error: unrecognized command line option ‘-nofor-main’; did you mean ‘-Wno-main’?
Posted: Wed Feb 08, 2023 4:55 am
Before configure, I've downloaded all libs in /lib/archive by "make -f Makefile.loc"
I'm trying to compile Yambo based on Intel Compiler+MKL+OpenMPI
here's my compile process
still it reports this
I'v read other similar error, knowing this might because gfortran and intel complier are used, but no idea how to solve this
and here's other information
I'm trying to compile Yambo based on Intel Compiler+MKL+OpenMPI
here's my compile process
Code: Select all
export CC=icc
export FC=ifort
export F77=ifort
export MPICC=mpicc
export MPIFC=mpif90
export MPIF77=mpif77
export CFLAGS=-O3
export FCFLAGS=-O3
export FFLAGS=-O3
./configure \
--enable-memory-profile --disable-open-mp --enable-iotk \
--with-blas-libs="-lmkl_intel_lp64 -lmkl_sequential -lmkl_core" \
--with-lapack-libs="-lmkl_intel_lp64 -lmkl_sequential -lmkl_core" \
--with-blacs-libs="-lmkl_blacs_openmpi_lp64" \
--with-scalapack-libs="-lmkl_scalapack_lp64" \
--with-fft-libs="-mkl" \
--with-iotk-path="$HOME/soft/qe-7.1/S3DE/iotk"
make core
I'v read other similar error, knowing this might because gfortran and intel complier are used, but no idea how to solve this
Code: Select all
>>>[Making qe_pseudo]<<<
Warning #2216: '=' assumed following macro name "_libqe_pseudo" in command-line definition
make[2]: Entering directory '/project/hewenyingdi/software/yambo-5.0.4/lib/qe_pseudo'
creating folder /project/hewenyingdi/software/yambo-5.0.4//include//modules__HDF5_IO_MPI_TIMING
cd /project/hewenyingdi/software/yambo-5.0.4/lib/qe_pseudo; /project/hewenyingdi/software/yambo-5.0.4/sbin/moduledep.sh atom.o becmod.o constants.o kind.o parameters.o pseudo_types.o s_psi.o uspp.o qe_auxdata.o invmat.o init_us_1.o init_us_2.o radial_grids.o ylmr2.o us_module.o recvec.o spin_orb.o simpsn.o upf_to_internal.o upf.o read_upf_v1.o read_upf_v2.o read_pseudo.o read_ncpp.o read_uspp.o struct_fact.o sph_ind.o spinor.o sph_bes.o qvan2.o setqf.o matches.o erf.o allocate_nlpot.o init_run.o qe_pseudo_module.o qe_errore.o addusdens.o sum_bec.o d_matrix.o > /project/hewenyingdi/software/yambo-5.0.4/lib/qe_pseudo/make.dep
gfortran: error: unrecognized command line option ‘-nofor-main’; did you mean ‘-Wno-main’?
make[2]: *** [Makefile:221: kind.o] Error 1
make[2]: Leaving directory '/project/hewenyingdi/software/yambo-5.0.4/lib/qe_pseudo'
make[1]: *** [config/mk/actions/compile_yambo.mk:2: yambo] Error 2
make[1]: Leaving directory '/project/hewenyingdi/software/yambo-5.0.4'
yambo build failed
Code: Select all
mpif90 -v
mpif90 for the Intel(R) MPI Library 2021.2 for Linux*
Copyright 2003-2021, Intel Corporation.
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)