Problems compiling nwchem with openSUSE, gcc, openmpi


Gets Around
Hi,

I am trying to kompile nwchem-6.1.1 using the method described on the nwchem website. My systems are openSUSE 12.1, openmpi, gcc. The environment variables have been set as follows:

`
export NWCHEM_TOP=/usr/local/nwchem
export NWCHEM_TARGET=LINUX64
export USE_MPI=y
export USE_MPIF=y
export USEMPIF4=y
export LIBMPI="-lmpi_f90 -lmpi_f77 -lmpi -lpthread"
export MPI_LOC=/usr/lib64/mpi/gcc/openmpi/bin
export MPI_LIB=/usr/lib64/mpi/gcc/openmpi/lib64
export MPI_INCLUDE=/usr/lib64/mpi/gcc/openmpi
export NWCHEM_MODULES="all"
export USE_NOFSCHECK=TRUE
export FC=gcc-fortran
export CC=gcc
`
The make.log refers to config.log where the first "bad news"
is down about 150 lines:

`
Thread model: posix
gcc version 4.6.2 (SUSE Linux)
configure:4684: $? = 0
configure:4673: gcc -V >&5
gcc: error: unrecognized option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:4684: $? = 1
configure:4673: gcc -qversion >&5
gcc: error: unrecognized option '-qversion'
gcc: fatal error: no input files
compilation terminated.
`

Is there anybody out there who has successfully kompiled nwchem with the combination of programs?

Thanks,
John Keller

Gets Around
More information on kompiling nwchem with openSUSE openmpi and gcc
On several systems running openSUSE 11.4 or 12.1, the config.log also refers to "failed program confdefs.h" and the Global Arrays (GA) package. The relevant lines in the config.log are as follows. What is my next step is getting NWChem to kompile?- install a different, earlier, version of gcc?

`
configure:5285: checking how to run the C preprocessor
configure:5316: gcc -E conftest.c
configure:5316: $? = 0
configure:5330: gcc -E conftest.c
conftest.c:17:28: fatal error: ac_nonexistent.h: No such file or directory
compilation terminated.
configure:5330: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Global Arrays (GA)"
| #define PACKAGE_TARNAME "ga"
| #define PACKAGE_VERSION "5.1"
| #define PACKAGE_STRING "Global Arrays (GA) 5.1"
| #define PACKAGE_BUGREPORT "hpctools@pnl.gov"
| #define PACKAGE_URL "http://www.emsl.pnl.gov/docs/global/"
| #define LINUX 1
| #define SYSV 1
| #define PACKAGE "ga"
| #define VERSION "5.1"
| #define MSG_COMMS_TCGMSGMPI 1
| #define MSG_COMMS_MPI 1
| #define ENABLE_PEIGS 1
| #define ENABLE_PROFILING 0
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
`

Gets Around
PNNL compiles NWChem with Radhat Linux64, gfortran and gcc.
Hi again - I am answering my own posts as information becomes available, in the absence of feedback from PNNL.
According to the NWChem Developers page:
"1.Code will be build nightly on a Redhat Linux64 Platform using gfortran and gcc."
So there should be no need to invest in other fortran or C compilers.
The question is: which version of gfortran and gcc is being used successfully at PNNL?
John Keller

Forum Regular
Hi John,

Sorry about the delay. First of all let me fill you in on the compilers I am using. I have a used a variety of GNU compilers ranging from the older versions 4.1.2 on my Redhat desktop system and the combination of gcc 4.2.1 with gfortran 4.6.0 on a Macintosh. In both cases I could generate a working executable.

As for the environment settings in your original posting most of them seem alright. One that worries me is

    export FC=gcc-fortran

The issue here is that NWChem's configuration mechanism will try and guess what compiler flags to use based on the compiler name. NWChem will recognize "gfortran" but has no idea what "gcc-fortran" is. Hence it is likely to wrongly guess which compiler flags to use.

Another one that worries my is your NWCHEM_TOP. Our build procedure insists that the release number is present in the directory name. So the directory would have to be something like nwchem-6.1.1 or nwchem-6.1.1-john. The directory name /usr/local/nwchem would usually cause the build to fail. However, getting as far as you have you might already have addressed that.

However, I will have a closer look at your issue. The reason being that your compilation does not fail in compiling actual NWChem code. Instead the compilation fails well before that in the Global Array configuration phase. It is not immediately obvious to me why that happens.

These are just my initial two cents. I will try and establish where the particular configuration failure comes from.

Best wishes, Huub

Gets Around
Thanks, Huub
Huub,
Thank you for the input. Yes, I have changed the "gcc-fortran" to just "gfortran", but I am having basically the same result as shown. My consultants at the Arctic Region S.C. have experience compiling NWChem with openmpi/gcc/gfortran and today they made some suggestions also - if they pan out, I will report immediately.
John Keller

Gets Around
Still having problems. also with openSUSE 11.1, gcc v. 4.3 and openmpi 1.2.8
Hi,
The following environment variables were set:

export NWCHEM_TOP=/usr/local/nwchem-6.1.1
export NWCHEM_TARGET=LINUX64
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export LIBMPI "-lmpi_f90 -lmpi_f77 -lmpi -ldl -Wl,--export-dynamic -lnsl -lutil"
export MPI_LOC=/usr/lib64/mpi/gcc/openmpi/bin
export MPI_LIB=/usr/lib64/mpi/gcc/openmpi/lib64
export MPI_INCLUDE=usr/lib64/mpi/gcc/openmpi
export NWCHEM_MODULES="all"
export USE_NOFSCHECK=TRUE
export FC=gfortran
export CC=gcc

Then I did
> cd NWCHEM_TOP/src
> make realclean;
> make >& make.log

In the resulting make.log file, lines 31-end are as follows:

make[1]: warning: -jN forced in submake: disabling jobserver mode.

      • Configuring Parallel Tools ****

../ga-5-1/configure --prefix=/usr/local/nwchem-6.1.1/src/tools/install --with-tcgmsg --with-mpi=-Iusr/lib64/mpi/gcc/openmpi -L/usr/lib64/mpi/gcc/openmpi/lib64 -lmpi /usr/lib64/mpi/gcc/openmpi/bin --enable-peigs --enable-underscoring --disable-mpi-tests --without-scalapack --without-lapack --without-blas CC=gcc F77=gfortran
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for TARGET base (64bit-ness checked later)... LINUX
checking whether we think this system is what we call SYSV... yes
checking whether we are cross compiling... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
configure: Detected VPATH build
configure:
configure: C compiler
configure:
checking for style of include used by make... GNU
checking whether the C compiler works... no
configure: error: in `/usr/local/nwchem-6.1.1/src/tools/build':
configure: error: C compiler cannot create executables
See `config.log' for more details
make[1]: *** [build/config.status] Error 1
make: *** [libraries] Error 1

There is probably something dumb I am doing as a nwchem/linux newbie here. Can I send the make.log and config.log files to try and glean a clue about what to do next?
John Keller

Forum Vet
Can you send the tools/build/config.log to bert.dejong@pnl.gov .

Have you tried just typing gcc or "which gcc" to see if the configure script can actually find the compiler?

Bert


Quote:Jwkeller Jul 16th 7:26 pm
Hi,
The following environment variables were set:

export NWCHEM_TOP=/usr/local/nwchem-6.1.1
export NWCHEM_TARGET=LINUX64
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export LIBMPI "-lmpi_f90 -lmpi_f77 -lmpi -ldl -Wl,--export-dynamic -lnsl -lutil"
export MPI_LOC=/usr/lib64/mpi/gcc/openmpi/bin
export MPI_LIB=/usr/lib64/mpi/gcc/openmpi/lib64
export MPI_INCLUDE=usr/lib64/mpi/gcc/openmpi
export NWCHEM_MODULES="all"
export USE_NOFSCHECK=TRUE
export FC=gfortran
export CC=gcc

Then I did
> cd NWCHEM_TOP/src
> make realclean;
> make >& make.log

In the resulting make.log file, lines 31-end are as follows:

make[1]: warning: -jN forced in submake: disabling jobserver mode.

      • Configuring Parallel Tools ****

../ga-5-1/configure --prefix=/usr/local/nwchem-6.1.1/src/tools/install --with-tcgmsg --with-mpi=-Iusr/lib64/mpi/gcc/openmpi -L/usr/lib64/mpi/gcc/openmpi/lib64 -lmpi /usr/lib64/mpi/gcc/openmpi/bin --enable-peigs --enable-underscoring --disable-mpi-tests --without-scalapack --without-lapack --without-blas CC=gcc F77=gfortran
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for TARGET base (64bit-ness checked later)... LINUX
checking whether we think this system is what we call SYSV... yes
checking whether we are cross compiling... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
configure: Detected VPATH build
configure:
configure: C compiler
configure:
checking for style of include used by make... GNU
checking whether the C compiler works... no
configure: error: in `/usr/local/nwchem-6.1.1/src/tools/build':
configure: error: C compiler cannot create executables
See `config.log' for more details
make[1]: *** [build/config.status] Error 1
make: *** [libraries] Error 1

There is probably something dumb I am doing as a nwchem/linux newbie here. Can I send the make.log and config.log files to try and glean a clue about what to do next?
John Keller

Gets Around
progress compiling nwchem on opensuse 12.1 system
I had not installed openmpi-devel or gcc-fortran, thnking that "openmpi" and "gcc" were sufficient. So now that was done

`
% export NWCHEM_TOP=/usr/local/nwchem
% export NWCHEM_TARGET=LINUX64
% export USE_MPI=y
% export USE_MPIF=y
% export USE_MPIF4=y
% export LIBMPI="-I/usr/lib64/mpi/gcc/openmpi/include -I/usr/lib64/mpi/gcc/openmpi/include/openmpi -pthread -L/usr/lib64/mpi/gcc/openmpi/lib64 -lmpi -lopen-rte -lopen-pal -ldl -Wl,--export-dynamic -lnsl -lutil -lm -ldl"
% export MPI_LOC=/usr/lib64/mpi/gcc/openmpi/bin
% export MPI_LIB=/usr/lib64/mpi/gcc/openmpi/lib64
% export MPI_INCLUDE=/usr/lib64/mpi/gcc/openmpi/include
% export NWCHEM_MODULES="all"
% export USE_NOFSCHECK=TRUE
% export FC=gfortran
% export CC=gcc

% which gcc
/usr/bin/gcc

%which gfortran
/usr/bin/gfortran

% cd /usr/local/nwchem-6.1.1/src
% make nwchem_config
% make >& make.log
`
The last command above now runs for about 15 min. /usr/local/nwchem-6.1.1/bin/LINUX64 contains a single file, depend.x
Many files and folders have been created in /usr/local/nwchem-6.1.1/src .

The make.log file is about 2 mb; the config.log file is about 150 kb.

Gets Around
Same result on openSUSE 11.4 and 12.1
Two recent versions of openSUSE having different versions of openmpi, gcc, and gfortran both give essentially the same result. The target directory NWCHEM_TARGET=LINUX64 contains only a depend.x file.

Just Got Here
Same result
Hi all,

As Jwkeller, I have the same results with the same OS (openSUSE 12.1) and compilers (gcc, gfortran): depend.x single file. Therefore, the error does not depend on the hardware. I will have this thread under surveillance just in case someone answers this question...

Forum Vet
So far we have identified two problems that we are working through with John:

1. Looks like there is a bug that has been updated in the development version, and that gets caught by some strict compilers (and not by others). In src/nwpw/nwpwlib/DMatrix/DMatrix-mpi.F, one has to replace at line 1363

     stupid_msglen = 7*7
call MPI_AllReduce(VV,VV2,stupid_msglen,
> stupid_double,stupid_sum,
> stupid_world,stupid_ierr)

with

  1. ifdef MPI4
     stupid_msglen = 7*7
call MPI_AllReduce(VV,VV2,stupid_msglen,
> stupid_double,stupid_sum,
> stupid_world,stupid_ierr)
  1. else
     call MPI_AllReduce(VV,VV2,7*7,
> MPI_DOUBLE_PRECISION,MPI_SUM,
> MPI_COMM_WORLD,ierr)
  1. endif


2. On his system the CONFIG_SITE environment variable is set and our configure is picking this up and puts the libraries generated in tools into lib64 instead of the lib we expect. We'll fix this for future releases. One approach is to change the LIBPATH line (line 107 for me) in $NWCHEM_TOP/config/makefile.h to

LIBPATH = -L$(SRCDIR)/tools/install/lib -L$(SRCDIR)/tools/install/lib64


Bert





Quote:Sefonorio Jul 24th 9:52 pm
Hi all,

As Jwkeller, I have the same results with the same OS (openSUSE 12.1) and compilers (gcc, gfortran): depend.x single file. Therefore, the error does not depend on the hardware. I will have this thread under surveillance just in case someone answers this question...

Gets Around
These changes were inserted, maybe, but the result is the same
I made the above changes in the two files that were mentioned. I did this two ways: one with the "1." line numbers, and one without. Either way the make.log file ends with many error lines referring to DMatrix-mpi.F file. And only the depend.x file appears in /usr/local/nwchem-6.1.1/bin/LINUC_64 folder. Here are the last 40 lines or so of make.log:
`
....
Error: Unclassifiable statement at (1)
DMatrix-mpi.F:1373.5:

   >                   MPI_DOUBLE_PRECISION,MPI_SUM,                   
1
Error: Non-numeric character in statement label at (1)
DMatrix-mpi.F:1373.5:

   >                   MPI_DOUBLE_PRECISION,MPI_SUM,                   
1
Error: Unclassifiable statement at (1)
DMatrix-mpi.F:1374.5:

   >                   MPI_COMM_WORLD,ierr)                            
1
Error: Non-numeric character in statement label at (1)
DMatrix-mpi.F:1374.5:

   >                   MPI_COMM_WORLD,ierr)                            
1
Error: Unclassifiable statement at (1)
DMatrix-mpi.F:1375.1:

endif
1
Error: Non-numeric character in statement label at (1)
DMatrix-mpi.F:1375.1:

endif
1
Error: Unclassifiable statement at (1)
make[4]: *** [/usr/local/nwchem-6.1.1/lib/LINUX64/libnwpwlib.a(DMatrix-mpi.o)] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [optimized] Error 2
make[2]: *** [subdirs] Error 1
make[1]: *** [subdirs] Error 1
make: *** [libraries] Error 1
`

Forum Vet
Obviously,

"1. ifdef MPI4" should be "#ifdef MPI4" and "1. else" should be "#else" and "1. endif" should be "#endif" as in the 7/23 email that was send to you. The Wiki messes is up.

There is another instance that is around line 2387.


Thanks,

Bert


[QUOTE=Jwkeller Aug 9th 6:28 pm]I made the above changes in the two files that were mentioned. I did this two ways: one with the "1." line numbers, and one without. Either way the make.log file ends with many error lines referring to DMatrix-mpi.F file. And only the depend.x file appears in /usr/local/nwchem-6.1.1/bin/LINUC_64 folder. Here are the last 40 lines or so of make.log:
`
....
Error: Unclassifiable statement at (1)
DMatrix-mpi.F:1373.5:

   >                   MPI_DOUBLE_PRECISION,MPI_SUM,                   
1
Error: Non-numeric character in statement label at (1)
DMatrix-mpi.F:1373.5:

   >                   MPI_DOUBLE_PRECISION,MPI_SUM,                   
1
Error: Unclassifiable statement at (1)
DMatrix-mpi.F:1374.5:

   >                   MPI_COMM_WORLD,ierr)                            
1
Error: Non-numeric character in statement label at (1)
DMatrix-mpi.F:1374.5:

   >                   MPI_COMM_WORLD,ierr)                            
1
Error: Unclassifiable statement at (1)
DMatrix-mpi.F:1375.1:

endif
1
Error: Non-numeric character in statement label at (1)
DMatrix-mpi.F:1375.1:

endif
1
Error: Unclassifiable statement at (1)
make[4]: *** [/usr/local/nwchem-6.1.1/lib/LINUX64/libnwpwlib.a(DMatrix-mpi.o)] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [optimized] Error 2
make[2]: *** [subdirs] Error 1
make[1]: *** [subdirs] Error 1
make: *** [libraries] Error 1
`


Forum >> NWChem's corner >> Compiling NWChem