Problems in compiling NWChem


Clicked A Few Times
Dear all,
I have some problems in compiling NWChem. I get the following error:

/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `__svml_idiv4'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `MPL_trrealloc'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `MPL_trspace'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `MPL_trDebugLevel'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `__intel_sse2_strcpy'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `MPL_TrSetMaxMem'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `__intel_sse2_strchr'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `MPL_trlevel'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `__intel_sse2_strrchr'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `MPL_trmalloc'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `MPL_env2bool'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `__intel_sse2_strncmp'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `MPL_env2range'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `_intel_fast_memset'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `MPL_trcalloc'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `MPL_trfree'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `MPL_env2str'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `MPL_trstrdup'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `__intel_sse2_strlen'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `MPL_trdump'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `__intel_sse2_strncpy'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `__intel_sse2_strcspn'
/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib/libmpich.so: undefined refer ence to `MPL_trinit'
collect2: error: ld returned 1 exit status
make: *** [all] Error 1


Any idea about which is the problem?
Thanks a lot
Alessandro

Forum Vet
Please post output from the following commands


mpif90 -show

env | grep MPI_ 

Clicked A Few Times
Sorry, it seems the command mpif90 -show doesn't work (mpif90, command not found)...

Forum Vet
Quote:Alessandro.chiesa Sep 25th 12:02 am
Sorry, it seems the command mpif90 -show doesn't work (mpif90, command not found)...


Try

/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/bin/mpif90 -show

Clicked A Few Times
Many thanks, here is the answer

ifort -I/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/include -I/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/include -L/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib -lmpichf90 -lmpichf90 -lmpich -Wl,-rpath-link=/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib

Forum Vet
Please try
MPI_INCLUDE=usr/local/parastation/mpi2-intel12-mt-5.0.27-1/include
MPI_LIB=" -lmpichf90 -lmpichf90 -lmpich"
LIBMPI=/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib

if this does not work,
Try to replace the previous MPI_LIB with
MPI_LIB="-lmpichf90 -lmpichf90 -lmpich -Wl,-rpath-link=/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib"

Clicked A Few Times
Thank you for the suggestion, I tried both, but unfortunately it doesn't work.
Always the same error:

"collect2: error: ld returned 1 exit status
make: *** [all] Error 1"

Forum Vet
Quote:Alessandro.chiesa Sep 27th 10:38 pm
Thank you for the suggestion, I tried both, but unfortunately it doesn't work.
Always the same error:

"collect2: error: ld returned 1 exit status
make: *** [all] Error 1"

Please copy and paste the last 30 lines of your link step

Clicked A Few Times
I am not sure I have understood correctly... anyway, this is my build_nwchem file

 1 #!/bin/bash
2 #export USE_GPROF=yes
3 export USE_SUBGROUPS=yes
4 export USE_MPI=yes
5 #export OLD_GA=yes
6 export MSG_COMMS=MPI
7 export USE_PYTHON64=yes
8 export MPI_LOC=/usr/local/parastation/mpi2-intel12-mt-5.0.27-1
9 export MPI_INCLUDE=$MPI_LOC/include
10 export MPI_LIB=$MPI_LOC/lib
11 #export MPI_LIB=" -lmpichf90 -lmpichf90 -lmpich"
12 #export LIBMPI=$MPI_LOC/lib
13 #export LIBMPI="-lfmpich -lmpich -lpthread" # MPICH2 1.2
14 export LIBMPI="-lmpichf90 -lmpich -lmpl -lpthread" # MPICH2 1.3.1
15 export ARMCI_NETWORK=OPENIB
16 export PYTHONHOME=/usr/bin
17 export PYTHONVERSION=2.6
18 export NWCHEM_TOP=`pwd`
19 export NWCHEM_TARGET=LINUX64
20 export NWCHEM_MODULES="all python"
21 export NWCHEM_MODULES="all"
22 export NWCHEM_EXECUTABLE=$NWCHEM_TOP/bin/LINUX64/nwchem
23 export PYTHONPATH=./:$NWCHEM_TOP/contrib/python/
24 export LARGE_FILES=TRUE
25 export ENABLE_COMPONENT=yes
26 export TCGGRSH=/usr/bin/ssh
27 export FOPTIMIZE="-O3 -xSSE2,SSE3,SSSE3,SSE4.1,SSE4.2 -no-prec-div -funroll-loops -unroll-aggressive"
28 export COPTIMIZE="-O3 -xSSE2,SSE3,SSSE3,SSE4.1,SSE4.2 -no-prec-div -funroll-loops"
30 cd $NWCHEM_TOP/src
31 #make DIAG=PAR FC=gfortran CC=gcc CDEBUG="-g -ffpe-trap=invalid,zero,overflow" FDEBUG="-g -ffpe-trap=invalid,zero,overflow" FOPTIMIZE="-g -ffpe-trap=invalid,zero,overflow" COPTIMIZE="-g -ffpe-trap=invalid,zero,overflow" nwchem_config
32 #make DIAG=PAR FC=gfortran CC=gcc CDEBUG="-g -ffpe-trap=invalid,zero,overflow" FDEBUG="-g -ffpe-trap=invalid,zero,overflow" FOPTIMIZE="-g -ffpe-trap=invalid,zero,overflow" COPTIMIZE="-g -ffpe-trap=invalid,zero,overflow" $1
33 #make DIAG=PAR FC=gfortran CC=gcc CDEBUG="-pg -g" FDEBUG="-pg -g" FOPTIMIZE="-pg -g -O0" COPTIMIZE="-pg -g -O0" nwchem_config
34 #make DIAG=PAR FC=gfortran CC=gcc CDEBUG="-pg -g" FDEBUG="-pg -g" FOPTIMIZE="-pg -g -O0" COPTIMIZE="-pg -g -O0" $1
35 make realclean
36
37 make FC=gfortran _GCC4=Y CC=gcc nwchem_config
38 #make DIAG=PAR FC=gfortran CC=gcc nwchem_config
39 make DIAG=PAR FC=gfortran CC=gcc $1

Forum Vet
Nope,
I am asking you what is the output of

cd $NWCHEM_TOP/src
make link

PS Please do not redefine FOPTIMIZE and COPTIMIZE since it's a recipe for impending disaster

Clicked A Few Times
Ok, sorry. Here is the output:

make nwchem.o stubs.o
make[1]: warning: -jN forced in submake: disabling jobserver mode.
Converting nwchem.F -> nwchem.f
Converting stubs.F -> stubs.f
f77 -c -g -g stubs.f
/bin/sh: f77: command not found
make[1]: *** [stubs.o] Error 127
make[1]: *** Waiting for unfinished jobs....
f77 -c -g -g nwchem.f
/bin/sh: f77: command not found
make[1]: *** [nwchem.o] Error 127
make: *** [link] Error 2

Forum Vet
I am asking you what is the output of

cd $NWCHEM_TOP/src
make FC=gfortran LIBMPI=" -lmpichf90 -lmpichf90 -lmpich" MPI_LIB=/usr/local/parastation/mpi2-intel12-mt-5.0.27-1/lib link

Clicked A Few Times
It is a little bit long, but I attach it below

ntel12-mt-5.0.27-1/lib link
make nwchem.o stubs.o
make[1]: warning: -jN forced in submake: disabling jobserver mode.
Converting nwchem.F -> nwchem.f
Converting stubs.F -> stubs.f
gfortran -c -g -g stubs.f
stubs.f:1.1:

/* Copyright (C) 1991-2012 Free Software Foundation, Inc.
1
Error: Non-numeric character in statement label at (1)
stubs.f:1.2:

/* Copyright (C) 1991-2012 Free Software Foundation, Inc.
 1
Error: Invalid character in name at (1)
stubs.f:2.4:

  This file is part of the GNU C Library.
1
Error: Non-numeric character in statement label at (1)
stubs.f:2.4:

  This file is part of the GNU C Library.
1
Error: Unclassifiable statement at (1)
stubs.f:4.4:

  The GNU C Library is free software; you can redistribute it and/or
1
Error: Non-numeric character in statement label at (1)
stubs.f:4.4:

  The GNU C Library is free software; you can redistribute it and/or
1
Error: Unclassifiable statement at (1)
stubs.f:4.38:

  The GNU C Library is free software; you can redistribute it and/or
1
Error: Unclassifiable statement at (1)
stubs.f:5.4:

  modify it under the terms of the GNU Lesser General Public
1
Error: Non-numeric character in statement label at (1)
stubs.f:5.4:

  modify it under the terms of the GNU Lesser General Public
1
Error: Unclassifiable statement at (1)
stubs.f:6.4:

  License as published by the Free Software Foundation; either
1
Error: Non-numeric character in statement label at (1)
stubs.f:6.4:

  License as published by the Free Software Foundation; either
1
Error: Unclassifiable statement at (1)
stubs.f:6.56:

  License as published by the Free Software Foundation; either
1
Error: Unclassifiable statement at (1)
stubs.f:7.4:

  version 2.1 of the License, or (at your option) any later version.
1
Error: Non-numeric character in statement label at (1)
stubs.f:7.4:

  version 2.1 of the License, or (at your option) any later version.
1
Error: Unclassifiable statement at (1)
stubs.f:9.4:

  The GNU C Library is distributed in the hope that it will be useful,
1
Error: Non-numeric character in statement label at (1)
stubs.f:9.4:

  The GNU C Library is distributed in the hope that it will be useful,
1
Error: Unclassifiable statement at (1)
stubs.f:10.4:

  but WITHOUT ANY WARRANTY; without even the implied warranty of
1
Error: Non-numeric character in statement label at (1)
stubs.f:10.4:

  but WITHOUT ANY WARRANTY; without even the implied warranty of
1
Error: Unclassifiable statement at (1)
stubs.f:10.28:

  but WITHOUT ANY WARRANTY; without even the implied warranty of
1
Error: Unclassifiable statement at (1)
stubs.f:11.4:

  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1
Error: Non-numeric character in statement label at (1)
stubs.f:11.4:

  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1
Error: Unclassifiable statement at (1)
stubs.f:12.4:

  Lesser General Public License for more details.
1
Error: Non-numeric character in statement label at (1)
stubs.f:12.4:

  Lesser General Public License for more details.
1
Error: Unclassifiable statement at (1)
stubs.f:14.4:

  You should have received a copy of the GNU Lesser General Public
1
Error: Non-numeric character in statement label at (1)
stubs.f:14.4:

  You should have received a copy of the GNU Lesser General Public
1
Error: Unclassifiable statement at (1)
Fatal Error: Error count reached limit of 25.
make[1]: *** [stubs.o] Error 1
make[1]: *** Waiting for unfinished jobs....
gfortran -c -g -g nwchem.f
nwchem.f:1.1:

/* Copyright (C) 1991-2012 Free Software Foundation, Inc.
1
Error: Non-numeric character in statement label at (1)
nwchem.f:1.2:

/* Copyright (C) 1991-2012 Free Software Foundation, Inc.
 1
Error: Invalid character in name at (1)
nwchem.f:2.4:

  This file is part of the GNU C Library.
1
Error: Non-numeric character in statement label at (1)
nwchem.f:2.4:

  This file is part of the GNU C Library.
1
Error: Unclassifiable statement at (1)
nwchem.f:4.4:

  The GNU C Library is free software; you can redistribute it and/or
1
Error: Non-numeric character in statement label at (1)
nwchem.f:4.4:

  The GNU C Library is free software; you can redistribute it and/or
1
Error: Unclassifiable statement at (1)
nwchem.f:4.38:

  The GNU C Library is free software; you can redistribute it and/or
1
Error: Unclassifiable statement at (1)
nwchem.f:5.4:

  modify it under the terms of the GNU Lesser General Public
1
Error: Non-numeric character in statement label at (1)
nwchem.f:5.4:

  modify it under the terms of the GNU Lesser General Public
1
Error: Unclassifiable statement at (1)
nwchem.f:6.4:

  License as published by the Free Software Foundation; either
1
Error: Non-numeric character in statement label at (1)
nwchem.f:6.4:

  License as published by the Free Software Foundation; either
1
Error: Unclassifiable statement at (1)
nwchem.f:6.56:

  License as published by the Free Software Foundation; either
1
Error: Unclassifiable statement at (1)
nwchem.f:7.4:

  version 2.1 of the License, or (at your option) any later version.
1
Error: Non-numeric character in statement label at (1)
nwchem.f:7.4:

  version 2.1 of the License, or (at your option) any later version.
1
Error: Unclassifiable statement at (1)
nwchem.f:9.4:

  The GNU C Library is distributed in the hope that it will be useful,
1
Error: Non-numeric character in statement label at (1)
nwchem.f:9.4:

  The GNU C Library is distributed in the hope that it will be useful,
1
Error: Unclassifiable statement at (1)
nwchem.f:10.4:

  but WITHOUT ANY WARRANTY; without even the implied warranty of
1
Error: Non-numeric character in statement label at (1)
nwchem.f:10.4:

  but WITHOUT ANY WARRANTY; without even the implied warranty of
1
Error: Unclassifiable statement at (1)
nwchem.f:10.28:

  but WITHOUT ANY WARRANTY; without even the implied warranty of
1
Error: Unclassifiable statement at (1)
nwchem.f:11.4:

  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1
Error: Non-numeric character in statement label at (1)
nwchem.f:11.4:

  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1
Error: Unclassifiable statement at (1)
nwchem.f:12.4:

  Lesser General Public License for more details.
1
Error: Non-numeric character in statement label at (1)
nwchem.f:12.4:

  Lesser General Public License for more details.
1
Error: Unclassifiable statement at (1)
nwchem.f:14.4:

  You should have received a copy of the GNU Lesser General Public
1
Error: Non-numeric character in statement label at (1)
nwchem.f:14.4:

  You should have received a copy of the GNU Lesser General Public
1
Error: Unclassifiable statement at (1)
Fatal Error: Error count reached limit of 25.
make[1]: *** [nwchem.o] Error 1
make: *** [link] Error 2

Forum Vet
Could you please try the 6.6 beta version since the MPI part of the installation has been simplified?
Please unset all the MPI env. variables (MPI_LIB LIBMPI and MPI_INCLUDE). You simply need mpif90 to be in your path

Download instructions at
http://nwchemgit.github.io/index.php/Download#Download_the_beta_version_of_the_NWChem_6.6_Re...

Clicked A Few Times
Dear Edoapra,
thank you for your precious advice. Unfrotunately, I still have some problems to run in parallel which I think are due to the compilation step. I attach my current makefile:

 1 #!/bin/bash
3 module load intel
4 export USE_SUBGROUPS=y
5 export USE_MPI=y
6 export USE_MPIF=y
7 export USE_MPIF4=y
9 export MSG_COMMS=MPI
10 export USE_PYTHON64=yes
11 export MPI_LOC=/usr/local/software/jureca/Stage3/software/Toolchain/iccifort/2015.3.187-GCC-bare-4.9.3/impi/5.1.0.079/intel64/
12 export USE_SCALAPACK=y
13 export SCALAPACK "location of Scalapack and BLACS library"
14 export USE_INTERNALBLAS=y
21 export ARMCI_NETWORK=OPENIB
22 export PYTHONHOME=/usr/bin
23 export PYTHONVERSION=2.6
24 export NWCHEM_TOP=`pwd`
25 export NWCHEM_TARGET=LINUX64
27 export NWCHEM_MODULES="all"
28 export NWCHEM_EXECUTABLE=$NWCHEM_TOP/bin/LINUX64/nwchem
29 export PYTHONPATH=./:$NWCHEM_TOP/contrib/python/
30 export LARGE_FILES=TRUE
31 export ENABLE_COMPONENT=yes
32 export TCGGRSH=/usr/bin/ssh
33 export FOPTIMIZE="-O3 -xSSE2,SSE3,SSSE3,SSE4.1,SSE4.2 -no-prec-div -funroll-loops -unroll-aggressive"
34 export COPTIMIZE="-O3 -xSSE2,SSE3,SSSE3,SSE4.1,SSE4.2 -no-prec-div -funroll-loops"
35 cd $NWCHEM_TOP/src
40 make realclean
41
42 make FC=gfortran _GCC4=Y CC=gcc nwchem_config
44 make DIAG=PAR FC=gfortran CC=gcc $1

When trying to run a job, a single task is exectude. For the other tasks I get the following error:

Last System Error Message from Task 696:: No such file or directory

I am using a machine in which software is organized through a hierarchy of modules. So I loaded Intel module (which contains icc/ifort + Intel MPI) at the beginning of the script.
Any ideas about the origin of this problem?

Thank you
Alessandro


Forum >> NWChem's corner >> Compiling NWChem