error during compilation Nwchem-dev.revision25716-src.2014-06-09

From NWChem

Viewed 4117 times, With a total of 12 Posts
Jump to: navigation, search

Clicked A Few Times
Threads 4
Posts 11
hello,
during compilation of code, using this enveromental variables

export LARGE_FILES=TRUE
export NWCHEM_TOP=/opt/Nwchem-dev.revision25716-src.2014-06-09
export NWCHEM_TARGET=LINUX64
export ARMCI_NETWORK=SOCKETS
export NWCHEM_MODULES="all"
export NWCHEM_MPIF_WRAP=/opt/openmpi-1.8.1/bin/mpif90
export NWCHEM_MPIC_WRAP=/opt/openmpi-1.8.1/bin/mpicc
export NWCHEM_MPICXX_WRAP=/opt/openmpi-1.8.1/bin/mpicxx
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_INCLUDE="-I/opt/openmpi-1.8.1/include"
export MPI_LIB="-L/opt/openmpi-1.8.1/lib"
export LIBMPI="-lmpi_f90 -lmpi_f77 -lmpi -ldl -Wl,--export-dynamic -lnsl -lutil"
export FC=gfortran
export CC=gcc
export CXX=g++

I obtain this meggage of error in make.log file

'../../ga-5-2/armci/src/memory/shmem.c:1045:13: error: 'IDLOC' undeclared (first use in this function)
  size = id[IDLOC];
^
../../ga-5-2/armci/src/memory/shmem.c: At top level:
../../ga-5-2/armci/src/memory/shmem.c:1173:7: error: conflicting types for 'Create_Shared_Region'
char *Create_Shared_Region(long *id, long size, long *offset)
^
../../ga-5-2/armci/src/memory/shmem.c:453:16: note: previous implicit declaration of 'Create_Shared_Region' was here
       myptr = Create_Shared_Region(idlist+1,size,idlist);
^
../../ga-5-2/armci/src/memory/shmem.c: In function 'Create_Shared_Region':
../../ga-5-2/armci/src/memory/shmem.c:1202:11: error: 'SHMIDLEN' undeclared (first use in this function)
       id[SHMIDLEN-2]=MinShmem;
^
../../ga-5-2/armci/src/memory/shmem.c:1220:8: error: 'IDLOC' undeclared (first use in this function)
    id[IDLOC]=region_list[reg].sz; /* elan post check */
^
make[5]: *** [src/memory/shmem.lo] Error 1
make[5]: *** Attesa per i processi non terminati....
make[4]: *** [all] Error 2
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [build/.libs/libga.a] Error 1
make: *** [libraries] Error 1'

how can I solve it?

thanks

Marcel

Forum Vet
Threads 8
Posts 1384
Marcel
Thank your for reporting this problem.
There seems to be a conflict between header files caused by the presence in opempi 1.8 of the file shmem.h,
since ARMCI has a header file with the same name.
The quickest way to avoid this problem is to modify the value of the MPI_INCLUDE variable so that
the ARMCI directory is mentioned before the OpenMPI one.
Here are the settings I am suggesting you.

export LARGE_FILES=TRUE
export NWCHEM_TOP=/opt/Nwchem-dev.revision25716-src.2014-06-09
export NWCHEM_TARGET=LINUX64
export ARMCI_NETWORK=SOCKETS
export NWCHEM_MODULES="all"
export MPI_LOC=/opt/openmpi-1.8.1
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_LIB=$MPI_LOC/lib
export MPI_INCLUDE="$NWCHEM_TOP/src/tools/ga-5-2/armci/src/include -I$MPI_LOC/include"
export LIBMPI="-lmpi_f90 -lmpi_f77 -lmpi -ldl -Wl,--export-dynamic -lnsl -lutil"

Please let me know if this solves your problem.
Cheers, Edo
Edited On 2:09:10 PM PDT - Thu, Jul 17th 2014 by Edoapra

Clicked A Few Times
Threads 4
Posts 11
hi edo,
with the setting

export LARGE_FILES=TRUE
export NWCHEM_TOP=/opt/Nwchem-dev.revision25716-src.2014-06-09
export NWCHEM_TARGET=LINUX64
export ARMCI_NETWORK=SOCKETS
export NWCHEM_MODULES="all"
export MPI_LOC=/opt/openmpi-1.8.1
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_LIB=$MPI_LOC/lib
export MPI_INCLUDE="$NWCHEM_TOP/src/tools/ga-5-2/armci/src/include -I$MPI_LOC/include"
export LIBMPI="-lmpi_f90 -lmpi_f77 -lmpi -ldl -Wl,--export-dynamic -lnsl -lutil"

I obtain this error:

'/usr/bin/ld: cannot find -lmpi_f90
/usr/bin/ld: cannot find -lmpi_f77
collect2: error: ld returned 1 exit status
make: *** [all] Error 1'

thanks

Marcel

Forum Vet
Threads 8
Posts 1384
Marcel
There is now a patch available for the OpenMPI 1.8 problem you encountered.
The patch is available at
http://www.nwchem-sw.org/images/Armci_ompi18.patch.gz

To apply the patch, please do the following
cd $NWCHEM_TOP/src/tools/ga-5-2
wget http://www.nwchem-sw.org/images/Armci_ompi18.patch.gz
gzip -d Armci_ompi18.patch
patch -p0 < Armci_ompi18.patch
cd ..
rm -rf build install
make
cd ..
make link

Please use the following env. variables, too.
export NWCHEM_TOP=/opt/Nwchem-dev.revision25716-src.2014-06-09
export NWCHEM_TARGET=LINUX64
export ARMCI_NETWORK=SOCKETS
export NWCHEM_MODULES="all"
export MPI_LOC=/opt/openmpi-1.8.1
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_LIB=$MPI_LOC/lib
export MPI_INCLUDE=$MPI_LOC/include
export LIBMPI="-lmpi_usempi -lmpi_mpifh -lmpi"

Please let me know if this solves your problem.
Cheers, Edo

Clicked A Few Times
Threads 4
Posts 11
dear edo,
in dir /opt/Nwchem-dev.revision25716-src.2014-06-09/src/tools/ga-5-2
I launched the command
wget http://www.nwchem-sw.org/images/Armci_ompi18.patch.gz
then
gzip -d Armci_ompi18.patch
then
patch -p0 < Armci_ompi18.patch
with the results
patching file armci/configure
Hunk #1 succeeded at 8731 (offset -151 lines).
Hunk #2 succeeded at 10989 (offset -161 lines).
patching file armci/Makefile.in
patching file armci/src/collectives/message.c
patching file armci/src/devices/mpi-mt/mpi2_client.c
patching file armci/src/devices/mpi-spawn/mpi2_client.c
patching file armci/src/include/locks.h
patching file armci/src/common/request.c
patching file armci/src/common/armci.c
patching file armci/src/memory/winshmem.c
patching file armci/src/memory/memory.c
patching file armci/src/memory/shmem.c
patching file armci/src/memory/kr_malloc.c
patching file armci/src-gemini/request.c
patching file armci/src-gemini/armci.c
patching file armci/src-gemini/Makefile.inc
patching file armci/src-gemini/shmem.c
patching file armci/src-gemini/kr_malloc.c
patching file armci/src-gemini/message.c
patching file armci/src-gemini/memory.c
patching file armci/src-gemini/locks.h
patching file armci/Makefile.am
patching file armci/src-portals/message.c
patching file armci/src-portals/locks.h
patching file armci/src-portals/request.c
patching file armci/src-portals/armci.c
patching file armci/src-portals/shmem.c
patching file armci/src-portals/memory.c
patching file armci/src-portals/kr_malloc.c
patching file armci/src-portals/Makefile.inc
patching file armci/testing/ipctest.c

then
cd ..
rm -rf build install
make

with the message
You must define NWCHEM_TOP in your environment to be the path
of the top level nwchem directory ... something like
setenv NWCHEM_TOP /msrc/home/elvis/nwchem

../config/makefile.h:33: *** . Arresto.

then
tools # cd ..
src # make link

with the message
You must define NWCHEM_TOP in your environment to be the path
of the top level nwchem directory ... something like
setenv NWCHEM_TOP /msrc/home/elvis/nwchem

config/makefile.h:33: *** . Arresto.

then I compilated with your parameters of the last post
and I obtained

compilation terminated.
libtool: compile: cc -DHAVE_CONFIG_H -I. -I../../ga-5-2/armci -I/opt/openmpi-1.8.1/include -I/opt/openmpi-1.8.1/include -I../../ga-5-2/armci/src/devices/sockets -I../../ga-5-2/armci/src/include -O3 -funroll-loops -MT src/common/spawn.lo -MD -MP -MF src/common/.deps/spawn.Tpo -c ../../ga-5-2/armci/src/common/spawn.c -o src/common/spawn.o
depbase=`echo src/memory/buffers.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ./libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I../../ga-5-2/armci -I/opt/openmpi-1.8.1/include -I/opt/openmpi-1.8.1/include -I../../ga-5-2/armci/src/devices/sockets -I../../ga-5-2/armci/src/include -O3 -funroll-loops -MT src/memory/buffers.lo -MD -MP -MF $depbase.Tpo -c -o src/memory/buffers.lo ../../ga-5-2/armci/src/memory/buffers.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: cc -DHAVE_CONFIG_H -I. -I../../ga-5-2/armci -I/opt/openmpi-1.8.1/include -I/opt/openmpi-1.8.1/include -I../../ga-5-2/armci/src/devices/sockets -I../../ga-5-2/armci/src/include -O3 -funroll-loops -MT src/memory/buffers.lo -MD -MP -MF src/memory/.deps/buffers.Tpo -c ../../ga-5-2/armci/src/memory/buffers.c -o src/memory/buffers.o
make[5]: *** [src/common/request.lo] Errore 1
make[5]: *** Attesa per i processi non terminati....
make[4]: *** [all] Errore 2
make[3]: *** [all-recursive] Errore 1
make[2]: *** [all] Errore 2
make[1]: *** [build/.libs/libga.a] Errore 1
make: *** [libraries] Errore 1

thanks

Marcel

Forum Vet
Threads 8
Posts 1384
Marcel
The patch I have uploaded yesterday did not contain all the needed changes (sorry about that!)
There is a new patch available:
http://www.nwchem-sw.org/images/Armci_ompi18_v2.patch.gz
Please remove the previously applied patch.
Here is what you should do

cd $NWCHEM_TOP/src/tools/ga-5-2
wget http://www.nwchem-sw.org/images/Armci_ompi18_v2.patch.gz
gzip -d Armci_ompi18_v2.patch
patch -p0 -R < Armci_ompi18.patch
patch -p0 < Armci_ompi18_v2.patch
cd ..
rm -rf build install
make
cd ..
make link

If this still fails, please post the following
1) env. variables used
2) complete make log (the last lines you posted do not show what caused the compilation to stop)
Thanks, Edo
Edited On 9:50:28 AM PDT - Wed, Jul 23rd 2014 by Edoapra

Clicked A Few Times
Threads 4
Posts 11
dear edo,
with the last procedure I obtained in bin DIR the command nwchem.

this is the make.log file

https://drive.google.com/file/d/0B3px6dYr_Ws2ZnNlQ0hmb0c1alk/edit?usp=sharing

I tried an example input, but with the command nwchem test.inp > test.out &

I obtained this message error
"Program received signal SIGSEGV: Segmentation fault - invalid memory reference"

my input is


start h2o
title "Water in 6-31g basis set"

geometry units au
O 0.00000000 0.00000000 0.00000000
H 0.00000000 1.43042809 -1.10715266
H 0.00000000 -1.43042809 -1.10715266
end
basis
H library 6-31g
O library 6-31g
end
task scf

thx

Marcel

Forum Vet
Threads 8
Posts 1384
Marcel
Could you try to start NWChem using the mpirun command to see if it avoids the segv?
E.g.

/opt/openmpi-1.8.1/bin/mpirun -np 1 $NWCHEM_TOP/bin/LINUX64/nwchem test.inp

Clicked A Few Times
Threads 4
Posts 11
All done edo !!!!

thank you for useful tips

marcel

Clicked A Few Times
Threads 5
Posts 12
comppilation error with PYTHON
hello, during compilation of code, using this enveromental variables

export NWCHEM_TOP=/home/dongbo/Nwchem-6.3.revision25564-src.2014-05-03
export NWCHEM_TARGET=LINUX64
export ARMCI_NETWORK=MPI-TS
export MSG_COMMS=MPI
export LARGE_FILES=TRUE
export USE_NOFSCHECK=TRUE
export LIB_DEFINES="-DDFLT_TOT_MEM=16777216"
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_LOC=/opt/Chem_soft/openmpi-1.6.4
export MPI_INCLUDE=$MPI_LOC/include
export MPI_LIB=$MPI_LOC/lib
export LIBMPI="-lmpi_f90 -lmpi_f77 -lmpi -ldl -Wl,--export-dynamic -lnsl -lutil"
export NWCHEM_MPIF_WRAP=/opt/Chem_soft/openmpi-1.6.4/bin/mpif90
export NWCHEM_MPIC_WRAP=/opt/Chem_soft/openmpi-1.6.4/bin/mpicc
export NWCHEM_MPICXX_WRAP=/opt/Chem_soft/openmpi-1.6.4/bin/mpicxx
export FC=ifort
export CC=icc
export CXX=icpc
export BLASOPT="-L/usr/lib64/atlas -lf77blas -latlas"
export PYTHONHOME=/usr/bin/python
export PYTHONVERSION=2.6
export USE_PYTHON64=yes
export NWCHEM_MODULES="all python"
export MRCC_THEORY=TRUE

I encountered errors listed as follows:

task_python.c(7): catastrophic error: cannot open source file "Python.h"
 #include <Python.h>                     ^

compilation aborted for task_python.c (code 4)
make[1]: *** [/home/dongbo/Nwchem-dev.revision25890-src.2014-07-18/lib/LINUX64/libnwpython.a(task_python.o)] Error 4
make[1]: *** Waiting for unfinished jobs....
nwchem_wrap.c(13): catastrophic error: cannot open source file "Python.h"
 #include <Python.h>
^

compilation aborted for nwchem_wrap.c (code 4)
make[1]: *** [/home/dongbo/Nwchem-dev.revision25890-src.2014-07-18/lib/LINUX64/libnwpython.a(nwchem_wrap.o)] Error 4
make: *** [libraries] Error 1

Can anyone give some help to tackle these?

Gets Around
Threads 18
Posts 133
Your PYTHONHOME looks wrong; it should be a path but yours looks like it is naming the actual Python interpreter.

Your line "export MRCC_THEORY=TRUE" won't do what you want either; the manual is wrong in the part that suggests it. The setting you really want to build with MRCC support is MRCC_METHODS.

Do you have the Python development header files installed? If you don't know, you can try something like this (may be very slow if you have network volumes mounted):

find / -iname Python.h | less


Ignore all the 'permission denied' errors.

If the Python.h file isn't found anywhere on your system, you need to install the Python development headers. If you do find Python.h, you just need to change your NWChem build process so that it can find the header files.
Edited On 1:35:42 AM PDT - Wed, Jul 30th 2014 by Mernst

Clicked A Few Times
Threads 5
Posts 12
another problem
Dear, following your suggestion and I have found the Python.h file

[dongbo@cu06 form1]$ locate Python.h

/usr/include/python2.6/Python.h
/usr/share/doc/python-matplotlib-0.99.1.2/CXX/WrapPython.h

then, I modified these two lines as follows:

export PYTHONHOME=/usr/include/python2.6
export MRCC_METHODS=TRUE

and the whole process seems to come to an end. However, another problem was encountered:

ifort -i8 -align -vec-report6 -O2 -g -Wl,--export-dynamic -L/home/dongbo/Nwchem-dev.revision25890-src.2014-07-18/lib/LINUX64 -L/home/dongbo/Nwchem-dev.revision25890-src.2014-07-18/src/tools/install/lib -o /home/dongbo/Nwchem-dev.revision25890-src.2014-07-18/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 -lnwpython -ldrdy -lvscf -lqmmm -lqmd -letrans -lpspw -ltce -lbq -lcons -lperfm -ldntmc -lccca -lnwcutil -lga -larmci -lpeigs -lperfm -lcons -lbq -lnwcutil /usr/include/python2.6/lib64/python2.6/config/libpython2.6.a -L/usr/lib64/atlas -lf77blas -latlas -llapack -lblas -L/opt/Chem_soft/openmpi-1.6.4/lib -lmpi_f90 -lmpi_f77 -lmpi -ldl -Wl,--export-dynamic -lnsl -lutil -lnwcutil -lpthread -lutil -ldl
ifort: error #10236: File not found: '/usr/include/python2.6/lib64/python2.6/config/libpython2.6.a'
make: *** [all] Error 1

Can you further give some hints on how to solve this?

Thanks very much in advance!

--Dongbo

Clicked A Few Times
Threads 5
Posts 12
congrats. myself
I have figured out this problem by a correct link of the libpython64.so to libpython64.a and all is done correctly. Thanks very much.

--Dongbo


Forum >> NWChem's corner >> Compiling NWChem



Who's here now Members 0 Guests 0 Bots/Crawler 1


AWC's: 2.5.10 MediaWiki - Stand Alone Forum Extension
Forum theme style by: AWC