Nwchem-src-2014-01-28 broken on Fedora 20 x86 64


Gets Around
The following produces broken executables on Fedora 20 x86_64:

$ rpm -q gcc-gfortran openmpi atlas
gcc-gfortran-4.8.2-7.fc20.x86_64
openmpi-1.7.3-1.fc20.x86_64
atlas-3.8.4-11.fc20.x86_64
$ uname -rvm
3.12.8-300.fc20.x86_64 #1 SMP Thu Jan 16 01:07:50 UTC 2014 x86_64

cd /tmp
su -c "yum -y install wget gcc-gfortran openmpi-devel python-devel atlas-devel"
wget http://nwchemgit.github.io/download.php?f=Nwchem-src-2014-01-28.tar.gz -O Nwchem-src-2014-01-28.tar.gz
tar zxf Nwchem-src-2014-01-28.tar.gz
cd nwchem-src-2014-01-28/src
sh ../../compile.sh 2>&1| tee ../build.log
cd ..
module load mpi/openmpi-x86_64
mpiexec -np 1 bin/LINUX64/nwchem QA/tests/h2o_opt/h2o_opt.nw 2>&1 | tee h2o_opt.out


with the following /tmp/compile.sh

export NWCHEM_TOP=/tmp/nwchem-src-2014-01-28
export NWCHEM_TARGET=LINUX64
export CC=gcc
export FC=gfortran
export LARGE_FILES=TRUE
export USE_NOFSCHECK=TRUE
export PYTHONHOME=/usr
export PYTHONVERSION=2.7
export PYTHONLIBTYPE=so
export USE_PYTHON64=1
export HAS_BLAS=yes
export BLASOPT='-L/usr/lib64/atlas -lf77blas -lcblas -latlas'
export MAKE=/usr/bin/make
export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPIEXEC=/usr/lib64/openmpi/bin/mpiexec
export MPI_LIB=/usr/lib64/openmpi/lib
export MPI_INCLUDE=/usr/include/openmpi-x86_64
export LIBMPI='-lmpi -lmpi_usempi -lmpi_mpifh'
$MAKE nwchem_config NWCHEM_MODULES="all python" 2>&1 | tee ../make_nwchem_config_openmpi.log
$MAKE 64_to_32 2>&1 | tee ../make_64_to_32.log
export MAKEOPTS="USE_64TO32=y"
$MAKE ${MAKEOPTS} 2>&1



Result:

 Summary of "ao basis" -> "ao basis" (cartesian)
 ------------------------------------------------------------------------------
       Tag                 Description            Shells   Functions and Types
 ---------------- ------------------------------  ------  ---------------------
 O                           6-31G*                  6       15   3s2p1d
 H                           6-31G*                  2        2   2s


MA_verify_allocator_stuff: starting scan ...
heap block 'texas basis/nuc', handle 7, address 0x13415390:
        current right signature 0 != proper right signature 1431655765
MA_verify_allocator_stuff: scan completed
MA error: MA_verify_allocator_stuff:
                                heap    stack
                                ----    -----
        checksum errors            0        0
        left signature errors      0        0
        right signature errors     1        0
        total bad blocks           1        0
        total blocks              12        4
MA_verify_allocator_stuff: starting scan ...
heap block 'texas basis/nuc', handle 7, address 0x13415390:
        current right signature 0 != proper right signature 1431655765
MA_verify_allocator_stuff: scan completed
MA error: MA_verify_allocator_stuff:
                                heap    stack
                                ----    -----
        checksum errors            0        0
        left signature errors      0        0
        right signature errors     1        0
        total bad blocks           1        0
        total blocks              12        4
 ------------------------------------------------------------------------
 texas_init: alloc for texas mapping1 failed      911
 ------------------------------------------------------------------------
 ------------------------------------------------------------------------
  current input line :
    56: task scf optimize
 ------------------------------------------------------------------------

Forum Vet
Thanks for the timely bug report

Forum Vet
Patch for the tools directory
Marcindulak
Please apply the following patch

http://nwchemgit.github.io/images/Ga52.patch.gz

To apply, please do the following

cd $NWCHEM_TOP/src/
wget http://nwchemgit.github.io/images/Ga52.patch.gz
gzip -d Ga52.patch.gz
patch -p0 < Ga52.patch
cd tools
./get-tools
cd ..
...
recompile


Cheers, Edo

Forum Vet
BLAS_SIZE
Marcindulak
Your env. variables seem to be missing BLAS_SIZE=4

Gets Around
Neither BLAS_SIZE=4 , using ga-5-2 instead of ga-5-3 patch, and these two combined together help.
I remember now i got the same problem "texas_init: alloc for texas mapping1 failed 911" with nwchem-6.3.revision2-src.2013-10-17, when trying to play with ga compilation options, see https://bugzilla.redhat.com/show_bug.cgi?id=984605#c17 - the full build logs are available there: http://koji.fedoraproject.org/koji/taskinfo?taskID=6405852 does work, http://koji.fedoraproject.org/koji/taskinfo?taskID=6429073 does not.
Maybe also this bug gives a hint: https://bugzilla.redhat.com/show_bug.cgi?id=1037075

Forum Vet
This is what worked for me on a Fedora 20 x86_64 box
Used vanilla Nwchem-src-2014-01-28 tarbal;
Applied the two following patches
http://nwchemgit.github.io/images/Ga53_acc.patch.gz
http://nwchemgit.github.io/images/Gcc48.patch.gz

Used the following compile.sh
export NWCHEM_TOP=/home/edo/nwchem-src-2014-01-28
export NWCHEM_TARGET=LINUX64
export CC=gcc
export FC=gfortran
export LARGE_FILES=TRUE
export USE_NOFSCHECK=TRUE
export PYTHONHOME=/usr
export PYTHONVERSION=2.7
export PYTHONLIBTYPE=so
export USE_PYTHON64=1
export HAS_BLAS=yes
export BLAS_SIZE=4
export BLASOPT='-L/usr/lib64/atlas -lf77blas -lcblas -latlas'
export BLAS_LIB='-L/usr/lib64/atlas -lf77blas -lcblas -latlas'
export MAKE=/usr/bin/make
export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPIEXEC=/usr/lib64/openmpi/bin/mpiexec
export MPI_LIB=/usr/lib64/openmpi/lib
export MPI_INCLUDE=/usr/include/openmpi-x86_64
export LIBMPI='-lmpi -lmpi_usempi -lmpi_mpifh'
$MAKE nwchem_config NWCHEM_MODULES="all python" 2>&1 | tee ../make_nwchem_config_openmpi.log
$MAKE 64_to_32 2>&1 | tee ../make_64_to_32.log
export MAKEOPTS="USE_64TO32=y"
$MAKE ${MAKEOPTS} 2>&1

Gets Around
Works for me after the two patches applied (haven't tried applying them one by one).
I have an additional question: when exactly do I need BLAS_SIZE=4?
I have not been setting this for a long time already,
on 86_64 both with atlas and acml. Similarly - do we need BLAS_LIB, when BLASOPT is set?

Forum Vet
BLAS_SIZE=4 is needed when the Blas library you are using have 32-bit integer arguments (de facto default)

In principle, you should not need to set BLAS_LIB since the makefile structure should guess it from the BLASOPT value.

By the way, I would recommend using OpenBLAS instead of Atlas (since OpenBLAS is available on Fedora 20)

Gets Around
Thanks, i hope the patches will get into the next nwchem release.
As for the openblas vs atlas i made two builds to be compared: http://nwchemgit.github.io/Special_AWCforum/st/id1145/official_RPMS_for_RHEL6_and_...
I hope to get some feedback in that thread, so I can select the version of blas, taking into account the stability and performance of the
executables.


Forum >> NWChem's corner >> Compiling NWChem