segmentation fault--running small test case, compiled with gfortran

From NWChem

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

Clicked A Few Times
Threads 2
Posts 6
Dear NWChem users,

I have compiled a serial version of NWchem 6.1 using the gfortran compiler. I am working in a LINUX64 platform.

I tried running the sample file for water, but receive the following "segmentation fault" error. My input/output files are pasted below.

ERROR:

Last System Error Message from Task 0:: Inappropriate ioctl for device
0:Segmentation Violation error, status=: 11
(rank:0 hostname:r2c4n10 pid:16635):ARMCI DASSERT fail. ../../ga-5-1/armci/src/common/signaltrap.c:SigSegvHandler():310 cond:0
 0: ARMCI aborting 11 (0xb).
0: ARMCI aborting 11 (0xb).
system error message: Invalid argument
                                        
INPUT:

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


OUTPUT:




             Northwest Computational Chemistry Package (NWChem) 6.1
------------------------------------------------------


                   Environmental Molecular Sciences Laboratory
Pacific Northwest National Laboratory
Richland, WA 99352

                             Copyright (c) 1994-2010
Pacific Northwest National Laboratory
Battelle Memorial Institute

            NWChem is an open-source computational chemistry package
distributed under the terms of the
Educational Community License (ECL) 2.0
A copy of the license is included with this distribution
in the LICENSE.TXT file

                                 ACKNOWLEDGMENT
--------------

           This software and its documentation were developed at the
EMSL at Pacific Northwest National Laboratory, a multiprogram
national laboratory, operated for the U.S. Department of Energy
by Battelle under Contract Number DE-AC05-76RL01830. Support
for this work was provided by the Department of Energy Office
of Biological and Environmental Research, Office of Basic
Energy Sciences, and the Office of Advanced Scientific Computing.


          Job information
---------------

   hostname      = r2c4n10
program = /tigress-hsm/dkanan/software/nwchem-6.1-gcc/bin/LINUX64/nwchem
date = Tue May 1 16:49:39 2012

   compiled      = Mon_Apr_30_17:38:24_2012
source = /tigress-hsm/dkanan/software/nwchem-6.1-gcc/
nwchem branch = 6.1
input = water.nw
prefix = h2o.
data base = ./h2o.db
status = startup
nproc = 1
time left = -1s


          Memory information
------------------

   heap     =   13107201 doubles =    100.0 Mbytes
stack = 13107201 doubles = 100.0 Mbytes
global = 26214400 doubles = 200.0 Mbytes (distinct from heap & stack)
total = 52428802 doubles = 400.0 Mbytes
verify = yes
hardfail = no


          Directory information
---------------------

 0 permanent = .
0 scratch = .




                               NWChem Input Module
-------------------


                            Water in 6-31g basis set
------------------------
C2V symmetry detected

         ------
auto-z
------


                            Geometry "geometry" -> ""
-------------------------

Output coordinates in a.u. (scale by  1.000000000 to convert to a.u.)

 No.       Tag          Charge          X              Y              Z
---- ---------------- ---------- -------------- -------------- --------------
1 O 8.0000 0.00000000 0.00000000 0.22143053
2 H 1.0000 -1.43042809 0.00000000 -0.88572213
3 H 1.0000 1.43042809 0.00000000 -0.88572213

     Atomic Mass
-----------

     O                 15.994910
H 1.007825
Effective nuclear repulsion energy (a.u.) 9.1949809303

           Nuclear Dipole moment (a.u.)
----------------------------
X Y Z
---------------- ---------------- ----------------
0.0000000000 0.0000000000 0.0000000000

     Symmetry information
--------------------

Group name             C2v
Group number 16
Group order 4
No. of unique centers 2

     Symmetry unique atoms

    1    2



                               Z-matrix (autoz)
--------

Units are Angstrom for bonds and degrees for angles

     Type          Name      I     J     K     L     M      Value
----------- -------- ----- ----- ----- ----- ----- ----------
1 Stretch 1 2 0.95720
2 Stretch 1 3 0.95720
3 Bend 2 1 3 104.52019


           XYZ format geometry
-------------------
3
geometry
O 0.00000000 0.00000000 0.11717600
H -0.75695000 0.00000000 -0.46870400
H 0.75695000 0.00000000 -0.46870400

==============================================================================
                               internuclear distances
------------------------------------------------------------------------------
center one | center two | atomic units | a.u.
------------------------------------------------------------------------------
2 H | 1 O | 1.80884 | 1.80884
3 H | 1 O | 1.80884 | 1.80884
------------------------------------------------------------------------------
number of included internuclear distances: 2
==============================================================================

==============================================================================
                                internuclear angles
------------------------------------------------------------------------------
center 1 | center 2 | center 3 | degrees
------------------------------------------------------------------------------
2 H | 1 O | 3 H | 104.52
------------------------------------------------------------------------------
number of included internuclear angles: 1
==============================================================================



                     Basis "ao basis" -> "" (cartesian)
-----
H (Hydrogen)
------------
Exponent Coefficients
-------------- ---------------------------------------------------------
1 S 1.87311370E+01 0.033495
1 S 2.82539370E+00 0.234727
1 S 6.40121700E-01 0.813757

 2 S  1.61277800E-01  1.000000

 O (Oxygen)
----------
Exponent Coefficients
-------------- ---------------------------------------------------------
1 S 5.48467170E+03 0.001831
1 S 8.25234950E+02 0.013950
1 S 1.88046960E+02 0.068445
1 S 5.29645000E+01 0.232714
1 S 1.68975700E+01 0.470193
1 S 5.79963530E+00 0.358521

 2 S  1.55396160E+01 -0.110778
2 S 3.59993360E+00 -0.148026
2 S 1.01376180E+00 1.130767

 3 P  1.55396160E+01  0.070874
3 P 3.59993360E+00 0.339753
3 P 1.01376180E+00 0.727159

 4 S  2.70005800E-01  1.000000

 5 P  2.70005800E-01  1.000000

Summary of "ao basis" -> "" (cartesian)
------------------------------------------------------------------------------
Tag Description Shells Functions and Types
---------------- ------------------------------ ------ ---------------------
H 6-31g 2 2 2s
O 6-31g 5 9 3s2p


                                NWChem SCF Module
-----------------


                            Water in 6-31g basis set



 ao basis        = "ao basis"
functions = 13
atoms = 3
closed shells = 5
open shells = 0
charge = 0.00
wavefunction = RHF
input vectors = atomic
output vectors = ./h2o.movecs
use symmetry = T
symmetry adapt = T


Summary of "ao basis" -> "ao basis" (cartesian)
------------------------------------------------------------------------------
Tag Description Shells Functions and Types
---------------- ------------------------------ ------ ---------------------
H 6-31g 2 2 2s
O 6-31g 5 9 3s2p


     Symmetry analysis of basis
--------------------------

       a1          7
a2 0
b1 4
b2 2


Forming initial guess at       0.5s


     Superposition of Atomic Density Guess
-------------------------------------
Sum of atomic energies: -75.75081731
Last System Error Message from Task 0:: Inappropriate ioctl for device
0:Segmentation Violation error, status=: 11
(rank:0 hostname:r2c4n10 pid:16635):ARMCI DASSERT fail. ../../ga-5-1/armci/src/common/signaltrap.c:SigSegvHandler():310 cond:0
 0: ARMCI aborting 11 (0xb).
0: ARMCI aborting 11 (0xb).
system error message: Invalid argument

Clicked A Few Times
Threads 2
Posts 6
Problem resolved
I resolved the issue by recompiling with another compiled (ifort), thanks everyone!

Clicked A Few Times
Threads 1
Posts 5
Hi,
I have the same problem. What are the versions of gfort and ifort on your system?
Regards,
Alex

Gets Around
Threads 13
Posts 106
I'm having the same problem. Compilation works flawlessly on a ROCKS5.4.3 system (GNU Fortran (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)) but yields segfaulting binaries (same error as shown in posts above) on debian testing (GNU Fortran (Debian 4.6.3-1) 4.6.3). An added twist is that 32 bit binaries built on 32 bit debian testing work fine.

A bit more detail:
0:Segmentation Violation error, status=: 11
(rank:0 hostname:tantalum pid:19676):ARMCI DASSERT fail. ../../ga-5-1/armci/src/common/signaltrap.c:SigSegvHandler():310 cond:0
application called MPI_Abort(comm=0x84000001, 11) - process 0
      • glibc detected *** nwchem: corrupted double-linked list: 0x000000010ac34880 ***
= Backtrace: ===
/lib/x86_64-linux-gnu/libc.so.6(+0x75ab6)[0x7f597b129ab6]
/lib/x86_64-linux-gnu/libc.so.6(+0x7754c)[0x7f597b12b54c]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x6c)[0x7f597b12e7ec]
/usr/lib/x86_64-linux-gnu/libgfortran.so.3(+0xcc811)[0x7f597bbd5811]
/usr/lib/x86_64-linux-gnu/libgfortran.so.3(+0xdba7f)[0x7f597bbe4a7f]
/usr/lib/x86_64-linux-gnu/libgfortran.so.3(+0xdbbaa)[0x7f597bbe4baa]
/usr/lib/x86_64-linux-gnu/libgfortran.so.3(+0x1ab09)[0x7f597bb23b09]
/lib64/ld-linux-x86-64.so.2(+0xe21c)[0x7f597c42421c]
/lib/x86_64-linux-gnu/libc.so.6(+0x36df2)[0x7f597b0eadf2]
/lib/x86_64-linux-gnu/libc.so.6(+0x36e45)[0x7f597b0eae45]
Edited On 6:07:04 PM PDT - Sat, May 12th 2012 by Ohlincha

Forum Vet
Threads 7
Posts 1237
Ohlincha,
Could you please send
1) the environmental variables you set for compilation and the compilation command line you used and
2) the output of the ldd command for you nwchem binary.

Thanks, Edo

Quote:Ohlincha May 12th 5:26 pm
I'm having the same problem. Compilation works flawlessly on a ROCKS5.4.3 system (GNU Fortran (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)) but yields segfaulting binaries (same error as shown in posts above) on debian testing (GNU Fortran (Debian 4.6.3-1) 4.6.3). An added twist is that 32 bit binaries built on 32 bit debian testing work fine.

A bit more detail:
0:Segmentation Violation error, status=: 11
(rank:0 hostname:tantalum pid:19676):ARMCI DASSERT fail. ../../ga-5-1/armci/src/common/signaltrap.c:SigSegvHandler():310 cond:0
application called MPI_Abort(comm=0x84000001, 11) - process 0
      • glibc detected *** nwchem: corrupted double-linked list: 0x000000010ac34880 ***
= Backtrace: ===
/lib/x86_64-linux-gnu/libc.so.6(+0x75ab6)[0x7f597b129ab6]
/lib/x86_64-linux-gnu/libc.so.6(+0x7754c)[0x7f597b12b54c]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x6c)[0x7f597b12e7ec]
/usr/lib/x86_64-linux-gnu/libgfortran.so.3(+0xcc811)[0x7f597bbd5811]
/usr/lib/x86_64-linux-gnu/libgfortran.so.3(+0xdba7f)[0x7f597bbe4a7f]
/usr/lib/x86_64-linux-gnu/libgfortran.so.3(+0xdbbaa)[0x7f597bbe4baa]
/usr/lib/x86_64-linux-gnu/libgfortran.so.3(+0x1ab09)[0x7f597bb23b09]
/lib64/ld-linux-x86-64.so.2(+0xe21c)[0x7f597c42421c]
/lib/x86_64-linux-gnu/libc.so.6(+0x36df2)[0x7f597b0eadf2]
/lib/x86_64-linux-gnu/libc.so.6(+0x36e45)[0x7f597b0eae45]

Gets Around
Threads 13
Posts 106
Edo,
It's such a classical thing: suddenly it works....(with external blas libs -- not internal). Internal libs are still throwing a seg violation.

The errors I posted came from a post ([1]) that I wrote a long time ago -- binaries which I don't have at hand anymore, and which were compiled without external blas libs.

In order to get the data you asked for I recompiled nwchem-6.1 with and without external BLAS libs on three different machines. I've done it repeatedly and have never had success running the binaries...until now. Suddenly I managed to get it working with external blas libs, but without external blas it still segfaults. I find it a bit puzzling, but that's fine -- it now works with openblas which is free and accessible to everyone.

It'd still be nice to have it working without external libs and I've posted a lot more detail from the segfaulting build (scripts, ldd output, errors, strace, ltrace, ar t libncwutil.a etc.) here: http://verahill.blogspot.com.au/2012/05/nwchem-61-diagnostic-data.html

__Good__ (edit src/config/makefile.h, line 1914 and add -lz -lssl for python support)
export LARGE_FILES=TRUE
export TCGRSH=/usr/bin/ssh
export NWCHEM_TOP=`pwd`
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES="all python"
export PYTHONVERSION=2.7
export PYTHONHOME=/usr
export BLASOPT="-L/opt/openblas/lib -lopenblas -lopenblas_barcelona-r0.1.1"
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_LOC=/usr/lib/openmpi/lib
export MPI_INCLUDE=/usr/lib/openmpi/include
export LIBRARY_PATH=$LIBRARY_PATH:/usr/lib/openmpi/lib
export LIBMPI="-lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread"
cd $NWCHEM_TOP/src
make clean
make nwchem_config
make FC=gfortran

ldd nwchem
       linux-vdso.so.1 =>  (0x00007fff925ff000)
libopenblas.so.0 => /opt/openblas/lib/libopenblas.so.0 (0x00002ab79d8a8000)
libmpi.so.0 => /usr/lib/libmpi.so.0 (0x00002ab79e6b5000)
libopen-rte.so.0 => /usr/lib/libopen-rte.so.0 (0x00002ab79e968000)
libopen-pal.so.0 => /usr/lib/libopen-pal.so.0 (0x00002ab79ebb7000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00002ab79ee0f000)
libmpi_f77.so.0 => /usr/lib/libmpi_f77.so.0 (0x00002ab79f013000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00002ab79f24b000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00002ab79f468000)
libz.so.1 => /usr/lib/x86_64-linux-gnu/libz.so.1 (0x00002ab79f66b000)
libssl.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00002ab79f881000)
libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00002ab79fae0000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00002ab79fdf6000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00002ab7a0078000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00002ab7a028f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00002ab7a04c4000)
libcrypto.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00002ab7a084b000)
libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00002ab7a0c30000)
/lib64/ld-linux-x86-64.so.2 (0x00002ab79d686000)

__Bad___ (edit src/config/makefile.h, line 1914 and add -lz -lssl for python support)
export LARGE_FILES=TRUE
export TCGRSH=/usr/bin/ssh
export NWCHEM_TOP=`pwd`
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES="all python"
export PYTHONHOME=/usr
export PYTHONVERSION=2.7
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_LOC=/usr/lib/openmpi/lib
export MPI_INCLUDE=/usr/lib/openmpi/include
export LIBRARY_PATH=$LIBRARY_PATH:/usr/lib/openmpi/lib
export LIBMPI="-lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread"
cd $NWCHEM_TOP/src
make clean
make nwchem_config
make FC=gfortran

ldd nwchem
       linux-vdso.so.1 =>  (0x00007fffccbff000)
libmpi.so.0 => /usr/lib/libmpi.so.0 (0x00002b7624cd9000)
libopen-rte.so.0 => /usr/lib/libopen-rte.so.0 (0x00002b7624f8d000)
libopen-pal.so.0 => /usr/lib/libopen-pal.so.0 (0x00002b76251dc000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00002b7625433000)
libmpi_f77.so.0 => /usr/lib/libmpi_f77.so.0 (0x00002b7625638000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00002b7625870000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00002b7625a8c000)
libz.so.1 => /usr/lib/x86_64-linux-gnu/libz.so.1 (0x00002b7625c90000)
libssl.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00002b7625ea6000)
libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00002b7626104000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00002b762641b000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00002b762669d000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00002b76268b3000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00002b7626ae9000)
libcrypto.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00002b7626e70000)
libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00002b7627254000)
/lib64/ld-linux-x86-64.so.2 (0x00002b7624ab7000)

Forum Vet
Threads 7
Posts 1237
libblas-dev might be the culprit
Ohlincha,
I have manage to reproduce your failure.
It is due to the fact that the tools autoconf detects the presence of /usr/lib/libblas.a and make some decisions accordingly that
conflicts with what happens on the nwchem side (unfortunately!)

There are two ways to solve this problem (they both require to re-compile the tools directory).

1st Solution: you need patch the tools makefile by doing the following
1) cd $NWCHEM_TOP/src/tools
2) wget http://www.nwchem-sw.org/images/Toolsmakefile.patch.gz
3) gzip -d Toolsmakefile.patch
4) patch -p0 < Toolsmakefile.patch
5) make clean
6) make FC=gfortran
7) cd ..
8) make FC=gfortran link


2nd solution: you need to remove the blas system library
1) sudo apt-get remove libblas-dev (you might be forces to remove libatlas-dev, too)
2) cd $NWCHEM_TOP/src/tools
3) make clean
4) make FC=gfortran
5) ..
6) make FC=gfortran link

Please me know if this solves this problem that seems to have affected several NWChem users.

Thanks, Edo
Edited On 2:58:44 PM PDT - Wed, May 16th 2012 by Edoapra

Gets Around
Threads 13
Posts 106
I went for the first solution since e.g. Octave wants/needs atlas/blas.

I think I patched it ok:
diff nwchem-6.1_internal/src/tools/GNUmakefile nwchem-6.1_external/src/tools/GNUmakefile 
359c359
< MAYBE_BLAS = --without-blas
---
> MAYBE_BLAS = --with-blas8="$(strip $(BLAS_LIB))"

I patched it and then used the 'bad' makefile in my earlier post (sans python) to do a full compile on a freshly extracted copy. That didn't work.

Odd observation -- first time I run it (./nwchem test.nw) I get something about a missing file:
0:Segmentation Violation error, status=: 11
(rank:0 hostname:beryllium pid:7129):ARMCI DASSERT fail. ../../ga-5-1/armci/src/common/signaltrap.c:SigSegvHandler():310 cond:0
Last System Error Message from Task 0:: No such file or directory

If I re-run immediately after I don't:
0:Segmentation Violation error, status=: 11
(rank:0 hostname:beryllium pid:7282):ARMCI DASSERT fail. ../../ga-5-1/armci/src/common/signaltrap.c:SigSegvHandler():310 cond:0
nwchem: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
[beryllium:07282] *** Process received signal ***

The only difference is the presence of *.drv.hess and *.db -- my input is at the end of this post

To cover all bases, I then did (steps 5-8, solution 1) make clean in the tools dir, followed by make link in the src dir (after setting all the env vars).

Execution still fails though -- and looking at config.log it seems that it's still picking up the blas libs (see below).
./nwchem test.nw
0:Segmentation Violation error, status=: 11
(rank:0 hostname:beryllium pid:1235):ARMCI DASSERT fail. ../../ga-5-1/armci/src/common/signaltrap.c:SigSegvHandler():310 cond:0
nwchem: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
[beryllium:01235] *** Process received signal ***
[beryllium:01235] Signal: Aborted (6)
[beryllium:01235] Signal code: (-6)
[beryllium:01235] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0xf030) [0x2ad650d12030]
[beryllium:01235] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x2ad651936475]
[beryllium:01235] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x180) [0x2ad6519396f0]
[beryllium:01235] [ 3] /lib/x86_64-linux-gnu/libc.so.6(+0x75d4a) [0x2ad651979d4a]
[beryllium:01235] [ 4] /lib/x86_64-linux-gnu/libc.so.6(+0x78c73) [0x2ad65197cc73]
[beryllium:01235] [ 5] /lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x70) [0x2ad65197e960]
[beryllium:01235] [ 6] /usr/lib/libopen-pal.so.0(+0x31d1d) [0x2ad6506a0d1d]
[beryllium:01235] [ 7] /usr/lib/libopen-pal.so.0(opal_show_help_vstring+0xac) [0x2ad65069ec0c]
[beryllium:01235] [ 8] /usr/lib/libopen-rte.so.0(orte_show_help+0xaf) [0x2ad65043bcbf]
[beryllium:01235] [ 9] /usr/lib/libmpi.so.0(MPI_Abort+0x74) [0x2ad6501b8d54]
[beryllium:01235] [10] ./nwchem() [0x29073e2]
[beryllium:01235] [11] ./nwchem() [0x28f4703]
[beryllium:01235] [12] /lib/x86_64-linux-gnu/libc.so.6(+0x324f0) [0x2ad6519364f0]
[beryllium:01235] [13] ./nwchem() [0x2a1821f]
[beryllium:01235] [14] ./nwchem() [0x2811320]
[beryllium:01235] [15] ./nwchem() [0x28147d5]
[beryllium:01235] [16] ./nwchem() [0x27857ab]
[beryllium:01235] [17] ./nwchem() [0x5d3dda]
[beryllium:01235] [18] ./nwchem() [0x5b86d8]
[beryllium:01235] [19] ./nwchem() [0x5ae0f5]
[beryllium:01235] [20] ./nwchem() [0x586edb]
[beryllium:01235] [21] ./nwchem() [0x41b347]
[beryllium:01235] [22] ./nwchem() [0x41c7c7]
[beryllium:01235] [23] ./nwchem() [0x527b85]
[beryllium:01235] [24] ./nwchem() [0x41d23b]
[beryllium:01235] [25] ./nwchem() [0x40e227]
[beryllium:01235] [26] ./nwchem() [0x406f2c]
[beryllium:01235] [27] ./nwchem() [0x40742d]
[beryllium:01235] [28] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x2ad651922ead]
[beryllium:01235] [29] ./nwchem() [0x405639]
[beryllium:01235] *** End of error message ***
Aborted

ldd nwchem
       linux-vdso.so.1 =>  (0x00007fffd11a1000)
libmpi.so.0 => /usr/lib/libmpi.so.0 (0x00002abd73a64000)
libopen-rte.so.0 => /usr/lib/libopen-rte.so.0 (0x00002abd73d17000)
libopen-pal.so.0 => /usr/lib/libopen-pal.so.0 (0x00002abd73f65000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00002abd741bc000)
libmpi_f77.so.0 => /usr/lib/libmpi_f77.so.0 (0x00002abd743c1000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00002abd745f9000)
libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00002abd74815000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00002abd74b2c000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00002abd74dae000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00002abd74fc4000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00002abd751fa000)
libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00002abd75581000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00002abd75799000)
/lib64/ld-linux-x86-64.so.2 (0x00002abd73842000)


cat src/tools/build/config.log|egrep "atlas|ATLAS|blas|BLAS"
configure:18162: Checks for BLAS,LAPACK,ScaLAPACK
configure:18408: Attempting to locate BLAS library
configure:18414: checking for BLAS with user-supplied flags
configure:18546: checking for BLAS in AMD Core Math Library
configure:18682: checking for BLAS in Intel Math Kernel Library
configure:18818: checking for BLAS in ATLAS
configure:18939: gfortran -o conftest conftest.f -lf77blas -latlas -lm >&5
/usr/bin/ld: cannot find -lf77blas
/usr/bin/ld: cannot find -latlas
configure:18961: checking for BLAS in PhiPACK libraries
configure:19079: gfortran -o conftest conftest.f -lsgemm -ldgemm -lblas -lm >&5
configure:19101: checking for BLAS in Apple Accelerate.framework
configure:19227: checking for BLAS in Apple vecLib.framework
configure:19353: checking for BLAS in Alpha CXML library
configure:19608: checking for BLAS in Sun Performance Library
configure:19861: checking for BLAS in SGI/Cray Scientific Library
configure:19987: checking for BLAS in SGIMATH library
configure:20113: checking for BLAS in IBM ESSL library
configure:20224: gfortran -o conftest conftest.f -lessl -lblas -lm >&5
configure:20246: checking for BLAS in generic library
configure:20344: gfortran -o conftest conftest.f -lblas -lm >&5
configure:20652: gfortran -o conftest conftest.f -lblas -lm >&5
configure:20709: cc -o conftest conftest.c -llapack -L/usr/lib/openmpi/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/openmpi/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. -lgfortran -lm -lquadmath -lblas -lm >&5
configure:20992: gfortran -o conftest -L/usr/lib/openmpi/lib conftest.f -llapack -lblas -lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread -lm >&5
configure:21081: gfortran -o conftest -L/usr/lib/openmpi/lib conftest.f -lscalapack -llapack -lblas -lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread -lm >&5
| #define HAVE_BLAS 1
| #define BLAS_SIZE 4
| #define HAVE_BLAS 1
| #define BLAS_SIZE 4
configure:38904: BLAS_LDFLAGS= configure:38906: BLAS_LIBS=-lblas
configure:38908: BLAS_CPPFLAGS= BLAS_CPPFLAGS=
BLAS_LDFLAGS=
BLAS_LIBS='-lblas'
HAVE_BLAS_FALSE='#'
HAVE_BLAS_TRUE=
  1. define HAVE_BLAS 1
  2. define BLAS_SIZE 4

As for debian atlas/blas:
i libblas-dev - Basic Linear Algebra Subroutines 3, static
i A libblas3gf - Basic Linear Algebra Reference implementat
i libatlas-dev - Automatically Tuned Linear Algebra Softwar
i A libatlas3gf-base - Automatically Tuned Linear Algebra Softwar
EDIT: in the interest of full disclosure, I've also got my own ATLAS and acml5.1.0 installed and present in my LD_LIBRARY_PATH which I've used in conjunctino with nwchem 6.0 -- again, I would presume that NOT specifying BLASOPT should FORCE the use of internal libs.

Nwchem 6.1 is in the debian repos, and they have supplied the following set of patches -- some which I understand and some which I don't: http://ftp.de.debian.org/debian/pool/main/n/nwchem/nwchem_6.1-3.debian.tar.gz
Also, some of the patches (.e.g01_hardcode_basis-sets_location.patch) are clearly referencing nwchem-6.0, while the source (looking at nwchem.F) is 6.1.

My test file:

scratch_dir /scratch
memory 2000 mb
start benzene

geometry units angstroms
C 0.100 1.396 0.000
C 1.209 0.698 0.000
C 1.209 -0.698 0.000
C 0.000 -1.396 0.000
C -1.209 -0.698 0.000
C -1.209 0.698 0.000
H 0.000 2.479 0.000
H 2.147 1.240 0.000
H 2.147 -1.240 0.000
H 0.400 -2.479 0.000
H -2.147 -1.240 0.000
H -2.147 1.240 0.000
end
basis
H library "6-311++g**" 
c library "6-311++g**"
end
dft
       direct
end

dft
   xc b3lyp
end
task dft optimize
Edited On 11:49:26 PM PDT - Wed, May 16th 2012 by Ohlincha

Forum Vet
Threads 7
Posts 1237
tools/GNUmakefile did not work as expected
The patch I gave you for the tools GNUmakefile did not work as expected and I am not sure why.
Could you please send
1) full set of environmental variables
2) first 20 lines of $NWCHEM_TOP/src/tools/build/config.log (e.g.
head -20 NWCHEM_TOP/src/tools/build/config.log

Since I am not 100% sure the patch I gave you worked correctly,
I have uploaded the complete version of $NWCHEM_TOP/src/tools/GNUmakefile as
http://www.nwchem-sw.org/images/GNUmakefile.tools61patched.gz
To install
1) cd $NWCHEM_TOP/src/tools
2) wget http://www.nwchem-sw.org/images/GNUmakefile.tools61patched.gz
3) gzip -d GNUmakefile.tools61patched
4) mv GNUmakefile GNUmakefile.old
5) cp GNUmakefile.tools61patched GNUmakefile

Gets Around
Threads 13
Posts 106
Morning Edo,
It works! It was down to PEBKAC -- I misread the patch and edited line 359 rather than adding the extra else structure. That's what I get for trying to be clever and not follow instructions verbatim. I'm afraid that I've caused you to lose more time on this unnecessarily.

For those who are still struggling, I've posted the full build instructions with internal libraries on debian using gfortran here and what works for me with gfortran with external libs on debian is described here.

Thanks Edo! And again, I apologise.

Forum Vet
Threads 7
Posts 1237
Thanks a lot for the feedback. I was very confused by the previous development.

Just Got Here
Threads 1
Posts 4
A similar kind of problem but not resolved by changing the BLASOPT to external libraries
Dear all,
I am facing the same problem even-after exporting BLASOPT from the specified directory (as shown below). There is no error in the make.log file but when executing 'nwchem' executable then the following error is coming:

0:Segmentation Violation error, status=: 11
(rank:0 hostname:n138 pid:6781):ARMCI DASSERT fail. ../../ga-5-1/armci/src/common/signaltrap.c:SigSegvHandler():310 cond:0
Last System Error Message from Task 0:: Inappropriate ioctl for device

Please, help me in this regard.

Thanking you all in advance,
Chaitanya.

The complete output is as follows:

Northwest Computational Chemistry Package (NWChem) 6.1.1
--------------------------------------------------------


Environmental Molecular Sciences Laboratory
Pacific Northwest National Laboratory
Richland, WA 99352

Copyright (c) 1994-2012
Pacific Northwest National Laboratory
Battelle Memorial Institute

NWChem is an open-source computational chemistry package
distributed under the terms of the
Educational Community License (ECL) 2.0
A copy of the license is included with this distribution
in the LICENSE.TXT file

ACKNOWLEDGMENT
--------------

           This software and its documentation were developed at the
EMSL at Pacific Northwest National Laboratory, a multiprogram
national laboratory, operated for the U.S. Department of Energy
by Battelle under Contract Number DE-AC05-76RL01830. Support
for this work was provided by the Department of Energy Office
of Biological and Environmental Research, Office of Basic
Energy Sciences, and the Office of Advanced Scientific Computing.


          Job information
---------------

   hostname      = n138
program = ../../../nwchem-6.1.1-src/bin/LINUX64/nwchem
date = Sat Oct 13 15:22:02 2012

   compiled      = Sat_Oct_13_15:04:24_2012
source = /sfs2/home/sandeepkr/sharma/Softwares/nwchem-6.1.1-src
nwchem branch = 6.1.1
input = h2o.nw
prefix = h2o.
data base = ./h2o.db
status = startup
nproc = 1
time left = -1s



          Memory information
------------------

   heap     =   13107201 doubles =    100.0 Mbytes
stack = 13107201 doubles = 100.0 Mbytes
global = 26214400 doubles = 200.0 Mbytes (distinct from heap & stack)
total = 52428802 doubles = 400.0 Mbytes
verify = yes
hardfail = no


          Directory information
---------------------

0 permanent = .
0 scratch = .




NWChem Input Module
-------------------


Water in 6-31g basis set
------------------------
C2V symmetry detected

         ------
auto-z
------


Geometry "geometry" -> ""
-------------------------

Output coordinates in a.u. (scale by 1.000000000 to convert to a.u.)

No. Tag Charge X Y Z
---- ---------------- ---------- -------------- -------------- --------------
1 O 8.0000 0.00000000 0.00000000 0.22143053
2 H 1.0000 -1.43042809 0.00000000 -0.88572213
3 H 1.0000 1.43042809 0.00000000 -0.88572213

Atomic Mass
-----------

O 15.994910
H 1.007825


Effective nuclear repulsion energy (a.u.)       9.1949809303

           Nuclear Dipole moment (a.u.) 
----------------------------
X Y Z
---------------- ---------------- ----------------
0.0000000000 0.0000000000 0.0000000000

Symmetry information
--------------------

Group name C2v
Group number 16
Group order 4
No. of unique centers 2

Symmetry unique atoms

1 2



                               Z-matrix (autoz)
--------

Units are Angstrom for bonds and degrees for angles

Type Name I J K L M Value
----------- -------- ----- ----- ----- ----- ----- ----------
1 Stretch 1 2 0.95720
2 Stretch 1 3 0.95720
3 Bend 2 1 3 104.52019


XYZ format geometry
-------------------
3
geometry
O 0.00000000 0.00000000 0.11717600
H -0.75695000 0.00000000 -0.46870400
H 0.75695000 0.00000000 -0.46870400

============================================================================== internuclear distances
------------------------------------------------------------------------------
center one | center two | atomic units | a.u.
------------------------------------------------------------------------------
2 H | 1 O | 1.80884 | 1.80884
3 H | 1 O | 1.80884 | 1.80884
------------------------------------------------------------------------------
number of included internuclear distances: 2
==============================================================================



==============================================================================
                                internuclear angles
------------------------------------------------------------------------------
center 1 | center 2 | center 3 | degrees
------------------------------------------------------------------------------
2 H | 1 O | 3 H | 104.52
------------------------------------------------------------------------------
number of included internuclear angles: 1
==============================================================================



                     Basis "ao basis" -> "" (cartesian)
-----
H (Hydrogen)
------------
Exponent Coefficients
-------------- ---------------------------------------------------------
1 S 1.87311370E+01 0.033495
1 S 2.82539370E+00 0.234727
1 S 6.40121700E-01 0.813757

2 S 1.61277800E-01 1.000000

O (Oxygen)
----------
Exponent Coefficients
-------------- ---------------------------------------------------------
1 S 5.48467170E+03 0.001831
1 S 8.25234950E+02 0.013950
1 S 1.88046960E+02 0.068445
1 S 5.29645000E+01 0.232714
1 S 1.68975700E+01 0.470193
1 S 5.79963530E+00 0.358521

2 S 1.55396160E+01 -0.110778
2 S 3.59993360E+00 -0.148026
2 S 1.01376180E+00 1.130767

3 P 1.55396160E+01 0.070874
3 P 3.59993360E+00 0.339753
3 P 1.01376180E+00 0.727159

4 S 2.70005800E-01 1.000000

5 P 2.70005800E-01 1.000000



Summary of "ao basis" -> "" (cartesian)
------------------------------------------------------------------------------
Tag Description Shells Functions and Types
---------------- ------------------------------ ------ ---------------------
H 6-31g 2 2 2s
O 6-31g 5 9 3s2p


                                NWChem SCF Module
-----------------


Water in 6-31g basis set



 ao basis        = "ao basis"
functions = 13
atoms = 3
closed shells = 5
open shells = 0
charge = 0.00
wavefunction = RHF
input vectors = atomic
output vectors = ./h2o.movecs
use symmetry = T
symmetry adapt = T


Summary of "ao basis" -> "ao basis" (cartesian)
------------------------------------------------------------------------------
Tag Description Shells Functions and Types
---------------- ------------------------------ ------ ---------------------
H 6-31g 2 2 2s
O 6-31g 5 9 3s2p


     Symmetry analysis of basis
--------------------------

a1 7
a2 0
b1 4
b2 2


Forming initial guess at       0.1s

0:Segmentation Violation error, status=: 11
(rank:0 hostname:n138 pid:6781):ARMCI DASSERT fail. ../../ga-5-1/armci/src/common/signaltrap.c:SigSegvHandler():310 cond:0
Last System Error Message from Task 0:: Inappropriate ioctl for device




The original Build file is as follows:

export ENABLE_COMPONENT=yes
export FOPTIMIZE="-O3 -xHost -no-prec-div -funroll-loops -unroll-aggressive"
export COPTIMIZE="-O3 -xHost -no-prec-div -funroll-loops"

MKL_HOME="/sfs1/intel_122010/composerxe-2011.0.084/mkl"
MKL_LIB="$MKL_HOME/lib/intel64"
MKL_INCLUDE="$MKL_HOME/include/intel64"

export HAS_BLAS=yes
export BLASOPT="-L$MKL_LIB -lmkl_blas95_ilp64" # the other existing blas library is libmkl_blas95_lp64

export USE_LAPACK=yes
export USE_SCALAPACK=yes

export SCALAPACK="-i8 -I$MKL_INCLUDE -L$MKL_LIB -lmkl_scalapack_ilp64 -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core -lmkl_blacs_intelmpi_ilp64 -lpthread -lm"
export LAPACK="-i8 -I$MKL_INCLUDE/intel64/ilp64 -I$MKL_INCLUDE -L$MKL_LIB -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core -lpthread -lm"


export USE_MPI=TRUE
export USE_MPIF=TRUE
export USE_MPIF4=TRUE

export MPI_HOME=/opt/hpmpi
export MPI_LOC=$MPI_HOME
export MPI_LIB=$MPI_LOC/lib/linux_amd64
export MPI_INCLUDE=$MPI_LOC/include/64
export LIBMPI='-lmpi'
export FPATH=$FPATH:$MKL_INCLUDE

export NWCHEM_TOP=/sfs2/home/sandeepkr/sharma/Softwares/nwchem-6.1.1-src
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES=all
export LARGE_FILES=TRUE
export USE_NOFSCHECK=TRUE
export TCGRSH=/usr/bin/ssh

Forum Vet
Threads 7
Posts 1237
Chaitanya,
Have tried to debug what call is causing the Segmentation Violation error?

To make things simpler, I would suggest to compile first with any MKL library to link against (including Scalapack),
have you tried it already?
I suggest to recompile NWChem without redefining FOPTIMIZE and COPTIMIZE, too, and use gcc as C compiler.

Cheers, Edo


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