Compiling NWChem 6.1 on Ubuntu 12.04 with OpenMPI 1.6


Clicked A Few Times
Hi,

I am having a weird error message when I try compiling NWChem6.1 on my Ubuntu 12.04, I have OpenMPI 1.6
the errors are

/usr/bin/ld: cannot find -lmpi_f90
/usr/bin/ld: cannot find -lmpi_f77


This is weird because i see the libraries 'libmpi_f77.so' and 'libmpi_f90.so' in my '/usr/local/ib'

The following are my environment variables:

setenv NWCHEM_TOP /home/doudou/Programs/nwchem-6.1.1-src
setenv NWCHEM_TARGET LINUX64
setenv USE_MPI y
setenv USE_MPIF y
setenv MPI_LOC /usr/local/
setenv MPI_LIB $MPI_LOC/lib
setenv LIBMPI "-lmpi_f90 -lmpi_f77 -lmpi -lpthread"
setenv MPI_INCLUDE $MPI_LOC/include
setenv LARGE_FILES TRUE
setenv NWCHEM_MODULES all
cd $NWCHEM_TOP/src
make nwchem_config
make FC=gfortran >& make.log


any ideas? Thanks

Forum Regular
Hi DouDou,

May I ask what your link line looks like? The Make infrastructure should have generated a flag that tells the compiler where to find libraries. In your case that flag should read:

    -L/usr/local/lib

In the past we have also noticed that some compilers have problems figuring out which place to look in. This happens rarely but occasionally it does happen. So you might want to try

   setenv LIBMPI "/usr/local/lib/libmpi_f90.so /usr/local/lib/libmpi_f77.so <etc>"

And see if the linker finds the libraries then.

Please, let me know if this does not work.

Best wishes,

     Huub

Clicked A Few Times
Quote:Huub Aug 1st 2:05 pm
Hi DouDou,

May I ask what your link line looks like? The Make infrastructure should have generated a flag that tells the compiler where to find libraries. In your case that flag should read:

    -L/usr/local/lib

In the past we have also noticed that some compilers have problems figuring out which place to look in. This happens rarely but occasionally it does happen. So you might want to try

   setenv LIBMPI "/usr/local/lib/libmpi_f90.so /usr/local/lib/libmpi_f77.so <etc>"

And see if the linker finds the libraries then.

Please, let me know if this does not work.

Best wishes,

     Huub[/quote]



Forum >> NWChem's corner >> Compiling NWChem