f77 and mpif77 is conflict - Not properly synchronize with make file


Just Got Here
Hi Support,

While Compiling NWChem submodule geom, we are facing an error and observed that make file is not syncing with mpif77 while running make command.

While executing make, we are getting the below error message. But the same command line is running manually as separate command.

it is compiling with following command line option and getting following error message.

f77 -c -g -I. -I/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/src/include -I/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/src/tools/install/include -DPARALLEL_DIAG geom.F
geom.F: In block-data unit `geom_data':
geomP.fh:143: warning:




Argument #7 (named `isel') of `geom_selection' is one type at (2) but is some other type at (1) [info -f g77 M GLOBALS]
make: *** [/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/lib/Linux64/libnwcutil.a(geom_input.o)] Error 1
You have new mail in /var/spool/mail/root

The above same thing while compile with mpif77 instead of f77 it is compiling successfully.
So, I try to setup environment variable with export f77=mpif77 and tried alias f77=mpif77 also.
But still Makefile make command getting the same error message.
so, Kindly help us to solve this problem.

Thanks & Regards
Jaikumar S
[9751855415]

Forum Vet
Jaikumar
"f77" is not a recognized env. variable by the NWChem makefile structure. Please use FC, instead
Could you provide more details about the computer you are using to build NWChem?
For example, what is the value of NWCHEM_TARGET you are using, what Fortran compiler is available and
what is the output of the command

mpif90 -show

Just Got Here
Hi Edoapra,

Thanks for the update.

export NWCHEM_TOP="/app/setups/Nwchem-6.5.revision26243-src.2014-09-10"
export NWCHEM_TARGET="Linux64"
export LARGE_FILES="TRUE"
export ARMCI_NETWORK="OPENIB"
export ARMCI_OPENIB_DEVICE="mlx4_0"
export USE_NOFSCHECK="TRUE"
export PYTHONVERSION=2.6.6
export PYTHONHOME=/root
export NWCHEM_MODULES="all"
export NWCHEM_MPIF_WRAP="mpif90"
export NWCHEM_MPIC_WRAP="mpicc"
export NWCHEM_MPICXX_WRAP="mpicxx"
export MPI_LOC="/app/openmpi-1.6.4_intel/"
export MPI_LIB=$MPI_LOC/lib
export MPI_INCLUDE=$MPI_LOC/include
export LIB_MPI="-lmpi_f90 -lmpi_f77 -lmpi -ldl -lm -lnuma -Wl,--export-dynamic -lrt -lnsl -lutil"
export NWCHEM_MODULES="all"
export USE_MPI="y"
export IPCCSD="y"
export EACCSD="y"
export FC="mpif90"
export CC="gcc"

After adjusting with environment variable, the problem f77 got solved.
Now, I got new problem.
..................................................................................................................
l_perf_test.o util_test_lu.o util_test_eig.o util_dra_test.o util_eaf_test.o util_sf_test.o ga_lkain_2cpl3.o util_io.o util_xyz.o util_ma.o util_mpinap.o ga_lkain_2cpl3_ext.o util_dgeev.o util_nwsort.o util_mygabcast.o util_getppn.o ga_matpow.o util_pack.o dabssum.o dabsmax.o dfill.o ifill.o mabyte_fill.o ga_it_lsolve.o ga_it_orth.o ga_orthog.o idamin.o util_jacobi.o stpr_sjacobi.o util_memcpy.o ga_accback.o ga_asymmetr.o util_gnxtval.o nxtask.o util_mirror.o ga_copy_dz.o dgami.o util_eri_cholesky.o util_test_cholesky.o icopy.o dsum.o dgefa.o
/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/lib/Linux64/libnwcutil.a
/bin/sh: line 7: /app/setups/Nwchem-6.5.revision26243-src.2014-09-10/lib/Linux64/libnwcutil.a: Permission denied
make[2]: Leaving directory `/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/src/util'
make[1]: Leaving directory `/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/src/util'
Making libraries in peigs
make[1]: Entering directory `/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/src/peigs'
(make lib ) || exit 1
make[2]: Entering directory `/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/src/peigs'
(cd ./src/c; make)
make[3]: Entering directory `/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/src/peigs/src/c'
gcc -I/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/src/peigs/h -DLinux64 -D -c clustrfix.c
'<command-line>: error: macro names must be identifiers
clustrfix.c: In function ‘clustrfix_’:
clustrfix.c:206: error: ‘DLAMCHE’ undeclared (first use in this function)
clustrfix.c:206: error: (Each undeclared identifier is reported only once
clustrfix.c:206: error: for each function it appears in.)'
make[3]: *** [clustrfix.o] Error 1
make[3]: Leaving directory `/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/src/peigs/src/c'
make[2]: *** [lib] Error 2
make[2]: Leaving directory `/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/src/peigs'
make[1]: *** [peigs_stamp] Error 1
make[1]: Leaving directory `/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/src/peigs'
make: *** [libraries] Error 1
You have new mail in /var/spool/mail/root

I tried google it redirect me .....
http://stackoverflow.com/questions/10779872/command-line11-error-macro-names-must-be-ident...

I have another Question.
1) How to identify make command recognized env variable? ("f77" is not a recognized env. variable by the NWChem makefile structure.)

Thanks & Regards
Jaikumar S

Forum Vet
Jaikumar
There is plenty of problems in your settings.
For example, NWCHEM_TARGET should be set equal to LINUX64
Could you have a look at the following URL for guidance in compiling NWChem?

http://nwchemgit.github.io/index.php/Compiling_NWChem

Just Got Here
Hi Edoaprat,

Nwchem Application environment flags optimization after every possible option.Finally following Environment variable it is giving better progress,I hope almost 70% is complete installation. But still I am face error message.

Environment Variable of the system
export NWCHEM_TOP="/app/setups/Nwchem-6.5.revision26243-src.2014-09-10"
export NWCHEM_TARGET="LINUX64"
export ARMCI_NETWORK="OPENIB"
export ARMCI_OPENIB_DEVICE="mlx4_0"
export PYTHONVERSION=2.6.6
export PYTHONHOME=/root
export NWCHEM_MODULES="all"
export NWCHEM_MPIF_WRAP="mpif90"
export NWCHEM_MPIC_WRAP="mpicc"
export NWCHEM_MPICXX_WRAP="mpicxx"
export MPI_LOC="/app/openmpi-1.6.4"
export MPI_LIB=$MPI_LOC/lib
export MPI_INCLUDE=$MPI_LOC/include
export LIB_MPI="-lmpi_f90 -lmpi_f77 -lmpi -ldl -lm -lnuma -Wl,--export-dynamic -lrt -lnsl -lutil"
export NWCHEM_MODULES="all"
export USE_MPI="y"
export FC="gfortran"
export CC="gcc"
export LARGE_FILES="TRUE"
export USE_NOFSCHECK="TRUE"

.............................................................................................................
.............................................................................................................
gfortran -L/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/lib/LINUX64 -L/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/src/tools/install/lib -o /app/setups/Nwchem-6.5.revision26243-src.2014-09-10/bin/LINUX64/nwchem nwchem.o stubs.o -lnwctask -lccsd -lmcscf -lselci -lmp2 -lmoints -lstepper -ldriver -loptim -lnwdft -lgradients -lcphf -lesp -lddscf -ldangchang -lguess -lhessian -lvib -lnwcutil -lrimp2 -lproperty -lsolvation -lnwints -lprepar -lnwmd -lnwpw -lofpw -lpaw -lpspw -lband -lnwpwlib -lnwxc -lcafe -lspace -lanalyze -lqhop -lpfft -ldplot -ldrdy -lvscf -lqmmm -lqmd -letrans -lpspw -ltce -lbq -lcons -lperfm -ldntmc -lccca -lnwcutil -lga -larmci -lpeigs -lperfm -lcons -lbq -lnwcutil -llapack -lblas -L/app/openmpi-1.6.4/lib -lmpi -libverbs
/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/lib/LINUX64/libnwcutil.a(util_wallsec.o): In function `util_wallsec_':
/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/src/util/util_wallsec.F:18: undefined reference to `mpi_wtime_'
/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/src/util/util_wallsec.F:20: undefined reference to `mpi_wtime_'
/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/src/util/util_wallsec.F:24: undefined reference to `mpi_wtime_'
/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/lib/LINUX64/libnwpwlib.a(Parallel-mpi.o): In function `parallel_recv_characters_':
Parallel-mpi.F:(.text+0x78b): undefined reference to `mpi_recv_'
/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/lib/LINUX64/libnwpwlib.a(Parallel-mpi.o): In function `parallel_recv_ivalues_':
Parallel-mpi.F:(.text+0x8b9): undefined reference to `mpi_recv_'
/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/lib/LINUX64/libnwpwlib.a(Parallel-mpi.o): In function `parallel_recv_values_':
Parallel-mpi.F:(.text+0xa13): undefined reference to `mpi_recv_'
/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/lib/LINUX64/libnwpwlib.a(Parallel-mpi.o): In function `parallel_send_characters_':
Parallel-mpi.F:(.text+0xab8): undefined reference to `mpi_send_'
/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/lib/LINUX64/libnwpwlib.a(Parallel-mpi.o): In function `parallel_send_ivalues_':
Parallel-mpi.F:(.text+0xb6c): undefined reference to `mpi_send_'

Manually while checking most of the above undefined reference symbol will resolve LIB_MPI="-lmpi_f90 -lmpi_f77 -lmpi -ldl -lm -lnuma -Wl,--export-dynamic -lrt -lnsl -lutil" flags, But Here problem is while compiling it is using only the flags -L/app/openmpi-1.6.4/lib -lmpi rather than what we have specified LIB_MPI="-lmpi_f90 -lmpi_f77 -lmpi -ldl -lm -lnuma -Wl,--export-dynamic -lrt -lnsl -lutil". So could you help us to solve this problem.

Thanks & Regards
Jaikumar S

Forum Vet
There is yet one little problem in your env. variables.

LIB_MPI should be LIBMPI (i.e. no "underscore" sign)

export LIBMPI="-lmpi_f90 -lmpi_f77 -lmpi -ldl -lm -lnuma -Wl,--export-dynamic -lrt -lnsl -lutil"

Just Got Here
HI,

Thanks for the update.
after export LIBMPI="-lmpi_f90 -lmpi_f77 -lmpi -ldl -lm -lnuma -Wl,--export-dynamic -lrt -lnsl -lutil" .
Library Problem got solved.But still I am getting some error message and I didn't get any clue regarding the error message.So, Could you help to resolve the problem?

gfortran -L/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/lib/LINUX64 -L/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/src/tools/install/lib -o /app/setups/Nwchem-6.5.revision26243-src.2014-09-10/bin/LINUX64/nwchem nwchem.o stubs.o -lnwctask -lccsd -lmcscf -lselci -lmp2 -lmoints -lstepper -ldriver -loptim -lnwdft -lgradients -lcphf -lesp -lddscf -ldangchang -lguess -lhessian -lvib -lnwcutil -lrimp2 -lproperty -lsolvation -lnwints -lprepar -lnwmd -lnwpw -lofpw -lpaw -lpspw -lband -lnwpwlib -lnwxc -lcafe -lspace -lanalyze -lqhop -lpfft -ldplot -ldrdy -lvscf -lqmmm -lqmd -letrans -lpspw -ltce -lbq -lcons -lperfm -ldntmc -lccca -lnwcutil -lga -larmci -lpeigs -lperfm -lcons -lbq -lnwcutil -llapack -lblas -L/app/openmpi-1.6.4/lib -lmpi_f90 -lmpi_f77 -lmpi -ldl -lm -lnuma -Wl,--export-dynamic -lrt -lnsl -lutil -libverbs
/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/lib/LINUX64/libnwpwlib.a(D3dB-tcgmsg.o): In function `balance_c_balance_end_':
D3dB-tcgmsg.F:(.text+0x0): multiple definition of `balance_c_balance_end_'
/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/lib/LINUX64/libnwpwlib.a(D3dB-mpi.o):D3dB-mpi.F:(.text+0x8fbf): first defined here
/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/lib/LINUX64/libnwpwlib.a(D3dB-tcgmsg.o): In function `balance_c_unbalance_end_':
D3dB-tcgmsg.F:(.text+0x1): multiple definition of `balance_c_unbalance_end_'
/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/lib/LINUX64/libnwpwlib.a(D3dB-mpi.o):D3dB-mpi.F:(.text+0x8cfd): first defined here
.....................................................................................................................................................
/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/lib/LINUX64/libnwpwlib.a(C3dB-tcgmsg.o): In function `c3db_r_transpose_jk_':
C3dB-tcgmsg.F:(.text+0x5554): multiple definition of `c3db_r_transpose_jk_'
/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/lib/LINUX64/libnwpwlib.a(C3dB-mpi.o):C3dB-mpi.F:(.text+0x5347): first defined here
/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/lib/LINUX64/libnwpwlib.a(C3dB-tcgmsg.o): In function `c3db_c_transpose_jk_':
C3dB-tcgmsg.F:(.text+0x5b71): multiple definition of `c3db_c_transpose_jk_'
/app/setups/Nwchem-6.5.revision26243-src.2014-09-10/lib/LINUX64/libnwpwlib.a(C3dB-mpi.o):C3dB-mpi.F:(.text+0x595b): first defined here
collect2: ld returned 1 exit status
make: *** [all] Error 1
You have new mail in /var/spool/mail/root.


Thanks & Regards
Jaikumar S

Forum Vet
You must have change some env. variables settings resulting in this duplication of object files.
Please do the following

rm /app/setups/Nwchem-6.5.revision26243-src.2014-09-10/lib/LINUX64/libnwpwlib.a
cd /app/setups/Nwchem-6.5.revision26243-src.2014-09-10/src/nwpw
make
cd ..
make link


Forum >> NWChem's corner >> Compiling NWChem