MA fatal error: MA sizeof: invalid datatype


Clicked A Few Times
I have compiled NWChem 6.3 on Mac OS X 10.7.5 with MPICH and GCC. The following script seems to do the job, with one lingering problem (discussed below).

There's some talk in the documentation of using "export OLD_GA=yes" for Mac, at least the 6.1.1 version; it's not clear yet if this is actually necessary for 6.3, especially as 6.3 requires MPI and the documentation unsets it. I did it anyway.

#Installation of NWChem 6.3 on Mac OS X with OpenMPI already installed
#export LARGE_FILES=FALSE
export OLD_GA=yes
export USE_NOFSCHECK=TRUE
export LIB_DEFINES="-DDFLT_TOT_MEM=16777216"

export NWCHEM_TOP=~/Code/nwchem/nwchem-6.3-src.2013-05-28/
export NWCHEM_TARGET=MACX
export NWCHEM_NWPW_LIBRARY=~/Code/nwchem/nwchem-6.3-src.2013-05-28/src/nwpw/libraryps/

export USE_MPI=y
#export USE_MPIF=yes
#export USE_MPI4=yes
export LIBMPI="-lfmpich -lmpich -lpmpich"
export MPI_LOC=/opt/local/
export MPI_LIB=$MPI_LOC/lib
export MPI_INCLUDE=$MPI_LOC/include

cd $NWCHEM_TOP/src/
make realclean
make nwchem_config NWCHEM_MODULES=all
make


The problem is that upon execution (with or without mpiexec) I get the error message:
../bin/MACX/nwchem ../examples/pspw/C2.nw 
 argument  1 = ../examples/pspw/C2.nw
MA fatal error: MA_sizeof: invalid datatype: 4337916969973


What would give rise to this? Any help is appreciated. Thank you.

Forum Regular
It seems that the MA library expects a different size of integer than what it is given. As the code normally compiles with 64-bit integers you will have to manually specify that it should use 32-bit integers. To do this do:

   export USE_64TO32=yes

and replace the compilation commands with

   make realclean
make nwchem_config NWCHEM_MODULES=all
make 64_to_32
make

with these settings and commands the code should compile correctly.

Clicked A Few Times
Okay, that helped quite a bit, Huub. For anyone's future reference with the prior-mentioned system configuration, the following script does the job pretty well, although occasionally a SIGSEGV error arises in some tasks.

#Installation of NWChem 6.3 on Mac OS X with OpenMPI already installed
#export LARGE_FILES=FALSE
export OLD_GA=yes
export USE_NOFSCHECK=TRUE
export LIB_DEFINES="-DDFLT_TOT_MEM=16777216"

export NWCHEM_TOP=~/Code/nwchem/nwchem-6.3-src.2013-05-28/
export NWCHEM_TARGET=MACX
export NWCHEM_NWPW_LIBRARY=~/Code/nwchem/nwchem-6.3-src.2013-05-28/src/nwpw/libraryps/

export USE_MPI=y
export USE_MPIF=yes
export USE_MPI4=yes
export LIBMPI="-lfmpich -lmpich -lpmpich"
export MPI_LOC=/opt/local/
export MPI_LIB=$MPI_LOC/lib
export MPI_INCLUDE=$MPI_LOC/include
export USE_64TO32=yes

cd $NWCHEM_TOP/src/
make realclean
make nwchem_config NWCHEM_MODULES=all
make 64_to_32
make


The error being

Backtrace for this error:
#0  0x11463f182
#1  0x11463f94e
#2  0x7fff93d33cf9
#3  0x1064acb07
#4  0x10649b0b9
#5  0x1062dfdb2
#6  0x106393b69
#7  0x10577abec
#8  0x10576878d
#9  0x105768d25
Segmentation fault: 11


Forum >> NWChem's corner >> Compiling NWChem