Showing posts with label compiling. Show all posts
Showing posts with label compiling. Show all posts

12 October 2012

254. Compiling Thunderbird 16 on Debian Wheezy

I've posted how to compile thunderbird (12 and 13) in the past. Here's v 16.0.1:

First you need to sort out the dependencies:

sudo apt-get install libdbus-glib-1-dev gir1.2-notify-0.7 libnotify-dev yasm checkinstall libzip-dev zip libgtk2.0-dev

As usual, I prefer to do the building in ~/tmp
If you have a ~/tmp/comm-release directory, make sure to delete it first:

rm ~/tmp/comm-release -rf

Now download the new source (106 Mb):

cd ~/tmp
wget ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/16.0.1/source/thunderbird-16.0.1.source.tar.bz2

Untar it, and create a new directory for out-of-tree building:

tar xvf thunderbird-16.0.1.source.tar.bz2
mkdir thunderbird16
cd thunderbird16/

Time to configure:
../comm-release/./configure --disable-necko-wifi

And build (40 minutes on a triple core AMD II)

make -j4

where -j4 indicates that it's built in parallel on a 3 core (3+1=4) processor. Note that this has nothing to do with running the finished binaries in parallel -- it's just a way of speeding up the compilation.


Make sure that you don't have an older version of thunderbird install via dpkg i.e.

aptitude search thunderbird|grep ^i

should come up blank. If not, uninstall that package.

Finally, install your new binaries:

sudo make install

And you're done.

17 June 2012

194. Wine 1.4.1 and Wine 1.5.6 on Debian Wheezy

UPDATE 16 May 2013: See here for Wine 1.5.30: http://verahill.blogspot.com.au/2013/05/416-wine-1530-in-chroot.html

There's great appetite for anything wine-related in Debian, as I can see from visitor numbers, so  here's how to build  Wine 1.4.1 and Wine 1.5.6 in Debian Testing/Wheezy. Enough talking -- let's get compilin'!

The builds take a little while, so be warned. Not all features are enabled in this particular build either -- see the configure output.

If you're interested in the missing development files seen below, this post might help: http://verahill.blogspot.com.au/2012/03/cross-compiling-eg-32-bit-binaries-on.html. Instinctively, I am suspicious as to whether that would work. I haven't explored it though, and my chief motivation is to make build instructions which anyone can easily follow and reproduce.

UPDATE (10th Jan 2013): See here for Wine 1.5.21 using the multiarch approach: http://verahill.blogspot.com.au/2013/01/308-compiling-wine-1521-on-debian.html


For both
sudo apt-get install bison flex gcc libc6-dev libfontconfig-dev libfreetype6-dev libglu-dev libgsm1-dev libice-dev libjpeg-dev libldap-dev libmpg123-dev libncurses5-dev libopenal-dev libpng-dev libsm-dev libssl-dev libusb-dev libx11-dev libxcomposite-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxml2-dev libxrandr-dev libxrender-dev libxslt-dev libxt-dev libxxf86vm-dev make libcapi20-dev liblcms-dev libsane-dev libhal-dev libdbus-1-dev valgrind prelink libcups2-dev opencl-dev lib32opencl1 oss4-dev gettext lib32v4l-dev lib32ncurses5-dev lib32asound2-dev lib32z-dev ia32-libs-dev


Version 1.4.1
wget http://prdownloads.sourceforge.net/wine/wine-1.4.1.tar.bz2

tar xvf wine-1.4.1.tar.bz2
cd wine-1.4.1/
./configure
configure: OpenCL 32-bit development files not found, OpenCL won't be supported.
configure: gstreamer-0.10 base plugins 32-bit development files not found, gstreamer support disabled
configure: libgsm 32-bit development files not found, gsm 06.10 codec won't be supported.
configure: libtiff 32-bit development files not found, TIFF won't be supported.
configure: WARNING: libjpeg 32-bit development files not found, JPEG won't be supported.
configure: Finished.  Do 'make' to compile Wine.
make
sudo checkinstall --install=yes

Note: To just make a .deb package, do ---install=no.

Version 1.5.6
wget http://prdownloads.sourceforge.net/wine/wine-1.5.6.tar.bz2
tar xvf wine-1.5.6.tar.bz2
cd wine-1.5.6/
./configure

configure: OpenCL 32-bit development files not found, OpenCL won't be supported.
configure: libsane 32-bit development files not found, scanners won't be supported.
configure: gstreamer-0.10 base plugins 32-bit development files not found, gstreamer support disabled
configure: libgsm 32-bit development files not found, gsm 06.10 codec won't be supported.
configure: libtiff 32-bit development files not found, TIFF won't be supported.
configure: WARNING: libjpeg 32-bit development files not found, JPEG won't be supported.
configure: Finished.  Do 'make' to compile Wine.
make
sudo checkinstall --install=yes

Note: To just make a .deb package, do ---install=no.

08 June 2012

183. Compiling OpenMM 4.1 on debian testing

OpenMM 4.0 is still somewhat of a traumatic memory. However, having gotten a question about the compilation of v4.1 I can't really resist giving the new version a go.

Having said that, I never ended up using the GPU-enabled gromacs for which I built openmm, so it was all an enormous waste of time -- for those of you thinking about GPU/Gromacs know this:
* not all graphics cards are supported or worth supporting
* there's no speed-up for explicit solvent molecules, and what else would you use gromacs or MD for?
* consumer-grade graphics cards get very hot

I make no attempt at ferreting out what packages are needed other than what I'm explicitly prompted for. Look at http://verahill.blogspot.com.au/2012/01/debian-testing-64-wheezy_20.html for an indication of what you might need.

Also, I already have openmm 4.0 installed, so e.g. paths and other things defined in the post above are still active.


Start here
Register with simtk.org and download the source file.
sudo apt-get install cmake-curses-gui libgccxml-dev gccxml nvidia-cuda-toolkit
unzip -x OpenMM4.1-Source.zipe
mkdir openmm_build
cd openmm_build/
ccmake -i ../OpenMM4.1-Source/

It'll say Empty Cache. Hit c which will populate the list.

I think we can ignore the EMU libs since they do device emulation. I never figured out what the CUT program was and it's not mentioned in the manual from what I can see.


These are the settings I chose -- I had problems before setting the OPENCL parts (in red) to off.

BUILD_TESTING:BOOL=ON
CMAKE_BUILD_TYPE:STRING=Release
CMAKE_INSTALL_PREFIX:PATH=/home/verahill/.openmm
CUDA_BUILD_TYPE:STRING=Device
CUDA_INSTALL_PREFIX:PATH=/usr/bin
CUDA_NVCC:FILEPATH=/usr/bin/nvcc
DL_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libdl.so
FOUND_CUBLAS:FILEPATH=/usr/lib/x86_64-linux-gnu/libcublas.so
FOUND_CUBLASEMU:FILEPATH=FOUND_CUBLASEMU-NOTFOUND
FOUND_CUFFT:FILEPATH=/usr/lib/x86_64-linux-gnu/libcufft.so
FOUND_CUFFTEMU:FILEPATH=FOUND_CUFFTEMU-NOTFOUND
FOUND_CUT:FILEPATH=FOUND_CUT-NOTFOUND
FOUND_CUT_INCLUDE:PATH=FOUND_CUT_INCLUDE-NOTFOUND

GCCXML_EXTRA_ARGS:STRING=
GCCXML_PATH:FILEPATH=/usr/bin/gccxml
OPENMM_BUILD_AMOEBA_CUDA_LIB:BOOL=ON
OPENMM_BUILD_AMOEBA_PLUGIN:BOOL=ON
OPENMM_BUILD_CUDA_LIB:BOOL=ON
OPENMM_BUILD_CUDA_TESTS:BOOL=TRUE
OPENMM_BUILD_C_AND_FORTRAN_WRAPPERS:BOOL=ON
OPENMM_BUILD_FREE_ENERGY_CUDA_LIB:BOOL=ON
OPENMM_BUILD_FREE_ENERGY_PLUGIN:BOOL=ON
OPENMM_BUILD_OPENCL_LIB:BOOL=OFF
OPENMM_BUILD_OPENCL_TESTS:BOOL=OFF
OPENMM_BUILD_PYTHON_WRAPPERS:BOOL=ON
OPENMM_BUILD_RPMD_OPENCL_LIB:BOOL=OFF
OPENMM_BUILD_RPMD_PLUGIN:BOOL=ON
OPENMM_BUILD_SERIALIZATION_SUPPORT:BOOL=ON
OPENMM_BUILD_STATIC_LIB:BOOL=ON
OPENMM_GENERATE_API_DOCS:BOOL=OFF
OPENMM_SVN_REVISION:STRING=exported
PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python
SVNVERSION_PROGRAM:FILEPATH=/usr/bin/svnversion
SWIG_EXECUTABLE:FILEPATH=/usr/bin/swig
SWIG_VERSION:STRING=2.0.7

Make your changes and hit c again, then hit g which brings you back to the terminal.



make -d|tee make.log
make test


If all goes well you'll see
126/126 Test #126: TestParser ......................................   Passed    0.02 sec
100% tests passed, 0 tests failed out of 126
Total Test time (real) = 345.83 sec
make install


[..]
-- Installing: /home/verahill/.openmm/examples/Makefile
-- Installing: /home/verahill/.openmm/examples/NMakefile
-- Installing: /home/verahill/.openmm/examples/MakefileNotes.txt
-- Installing: /home/verahill/.openmm/examples/Empty.cpp

And you are done!

tree ~/.openmm/ -L 4 -d
.openmm/
|-- bin
|-- docs
|   |-- api-c++
|   `-- api-python
|-- examples
|   `-- VisualStudio
|-- include
|   `-- openmm
|       |-- internal
|       `-- serialization
|-- lib
|   `-- plugins
`-- licenses


01 June 2012

170. Compiling PVM and XPVM on ROCKS 5.4.3

And we're back to ROCKS again.

NOTE: I haven't actually tested the binaries and libs compiled here. I think they should work. But I don't know for sure.

PQS works with openmpi, mpich and PVM. Our vanilla ROCKS install already has openmpi and mpich. There's a package called rocks-pvm, but the size is 50 kb and didn't seem to actually install anything precompiled, so I removed it and decided to go the compilation way instead.

The paths here are specific to the cluster I did this on, so customise as needed.

sudo mkdir /share/apps/pvm
sudo chown ${USER} /share/apps/pvm
cd /share/apps/pvm
wget http://www.netlib.org/pvm3/pvm3.4.6.tgz
tar xvf pvm3.4.6.tgz
cd pvm3/
export PVM_ROOT=`pwd`
make

Time to set up environment variables. Either edit /etc/profile or ~/.bashrc, depending on powers and reach., and add
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:share/apps/pvm/pvm3/lib/LINUX64
export PATH=$PATH:/share/apps/pvm/pvm3/bin/LINUX64
export PVM_ROOT=/share/apps/pvm/pvm3

Changes won't take effect until you source the file, or open a new terminal.


I profess to be ignorant about how to actually use pvm, so no testing just yet.


So I also stumbled across xpvm, which sounds (and looks) neat.

wget http://www.netlib.org/pvm3/xpvm/XPVM.src.1.2.5.tgz
cd /share/apps/pvm
tar xvf XPVM.src.1.2.5.tgz
cd xpvm/

Time to do some housekeeping before compiling:
It requires:
1. PVM 3.3.0 or later.
2. TCL 7.3 or later.
3. TK 3.6.1 or later.

I find
/usr/share/tk8.4
/usr/share/tcl8.4
so I might be ok. We just compiled pvm 3.4.6, so it should be alright.

First figure out where stuff is:

locate libtk|grpe so
/usr/lib/libtk.so
/usr/lib/libtk8.4.so
/usr/lib64/libtk.so
/usr/lib64/libtk8.4.so
locate libtcl|grep so
/usr/lib/libtcl.so
/usr/lib/libtcl8.4.so
/usr/lib64/libtcl.so
/usr/lib64/libtcl8.4.so
/usr/lib64/tclx8.4/libtclx8.4.so
These are fairly standard locations, so they should already be searched by ld -- no need to specify them thus.

Include is potentially worse since they'd typically need the development packages.
locate tcl | grep "\.h"
[..]
/usr/include/tcl-private/generic/tcl.h
[..]
locate tk|grep "\.h"
[..]
/usr/include/tk-private/generic/tk.h
[..]
So we /should/ be fine.

We also need the X11 libs and headers:
locate libX11

/usr/lib/libX11.so
/usr/lib/libX11.so.6
/usr/lib/libX11.so.6.2.0
/usr/lib64/libX11.so
/usr/lib64/libX11.so.6
/usr/lib64/libX11.so.6.2.0
locate X11|grep include

[..]
/usr/include/X11
[..]
Finally,

locate libdl
/lib/libdl-2.5.so
/lib/libdl.so.2
/lib64/libdl-2.5.so
/lib64/libdl.so.2
/usr/lib/libdl.a
/usr/lib/libdl.so
/usr/lib64/libdl.a
/usr/lib64/libdl.so
I'll specify the lib locations even though in some of these particular cases it isn't necessary:


Edit xpvm/src/Makefile.aimk and set (line numbers added by me):
19  PVMVERSION = -DUSE_PVM_34
Comment out line 42:
 42 #TCLTKHOME  =  $(HOME)/TCL
and
 44 TCLTKHOME  =   /usr/include
Change

 47 TCLINCL     =   -I$(TCLTKHOME)/tcl-private/generic
 48 TKINCL      =   -I$(TCLTKHOME)/tk-private/generic
and

 57 TCLLIBDIR   =   -L/usr/lib64/tclx8.4
 58 TKLIBDIR    =   -L/usr/lib64
and
 70 TCLLIB      =   -ltcl8.4
 71 TKLIB       =   -ltk8.4
and
83 XINCL       = -L/usr/include/X11
84 XLIBDIR     = -L/usr/lib64
and finally,
 96 SHLIB       = -ldl



Fell asleep? Time to get compiling.
export XPVM_ROOT=/share/apps/pvm/xpvm

export TCL_LIBRARY=
/usr/share/tcl8.4

export TK_LIBRARY=/usr/share/tk8.4

cd ${XPVM_ROOT}
make
[..]
Installing xpvm.tcl
Installing globs.tcl
Installing procs.tcl
Installing util.tcl
make[1]: Leaving directory `/share/apps/pvm/xpvm/src/LINUX64'

The beautiful thing is that the xpvm binary automagically ends up in the pvm3/bin/LINUX64 directory, so no need to fiddle with path.



In theory everything should work now if you log in with ssh -XC. However I get
xpvm
libpvm [pid2607] /tmp/pvmd.502: No such file or directory
libpvm [pid2607]: Can't Start PVM: Can't start pvmd
I'm not actually running -- nor have I ever run -- anything with pvm.

touch /tmp/pvmd.502
xpvm
libpvm [pid4219]: mksocs() read addr file: wrong length read
Connecting to PVMD already running... libpvm [pid4219]: mksocs() read addr file: wrong length read
libpvm [pid4219]: mksocs() read addr file: wrong length read
libpvm [pid4219]: mksocs() read addr file: wrong length read
libpvm [pid4219]: pvm_mytid(): Can't contact local daemon
libpvm [pid4219]: Error Joining PVM: Can't contact local daemon
I mean, it looks like it should work, once pvm is being used.

16 May 2012

151. Building nwchem 6.1 on debian wheezy/testing with openblas

Build without external libs in a later post.

Openblas:

sudo apt-get install build-essential gfortran gpp
sudo mkdir /opt/openblas
sudo chown ${USER} /opt/openblas
cd ~/tmp
wget http://nodeload.github.com/xianyi/OpenBLAS/tarball/v0.1.1
tar xvf v0.1.1
cd xianyi-OpenBLAS-e6e87a2/
wget http://www.netlib.org/lapack/lapack-3.4.1.tgz
make all BINARY=64 CC=/usr/bin/gcc FC=/usr/bin/gfortran USE_THREAD=0 INTERFACE64=1 1> make.log 2>make.err

make PREFIX=/opt/openblas install
cp lib*.*  /opt/openblas/lib

add
export LD_LIBRARY_PATH:$LD_LIBRARY_PATH:/opt/openblas/lib
to your ~/.bashrc

[for later use with nwchem and ecce, add /opt/openblas/lib to /etc/ld.so.conf and do sudo ldconfig]



Nwchem:
sudo apt-get install libopenmpi-dev python-dev

sudo mkdir /opt/nwchem
sudo chown ${USER} /opt/nwchem
cd /opt/nwchem
wget http://www.nwchem-sw.org/images/Nwchem-6.1-2012-Feb-10.tar.gz
tar xvf Nwchem-6.1-2012-Feb-10.tar.gz
cd nwchem-6.1/

Edit line 1914 in src/config/makefile.h and add -lz -lssl for python support
Then continue

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"
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
export FC=gfortran
cd ../contrib
./getmem.nwchem

Building takes ages

Edit your ~/.bashrc and add
export NWCHEM_EXECUTABLE=/opt/nwchem/nwchem-6.1/bin/LINUX64/nwchem
export NWCHEM_BASIS_LIBRARY=/opt/nwchem/nwchem-6.1/src/basis/libraries/
export PATH=$PATH:/opt/nwchem/nwchem-6.1/bin/LINUX64

To make ecce play nice you also need to edit /etc/ld.so.conf and add
/opt/openblas/lib
then do 
sudo ldconfig

Links to this post:
http://chemport.ru/forum/viewtopic.php?f=71&t=98589

13 March 2012

106. htop 1.0.1 and sinfo-0.0.45 on rock 5.4.3/centos 5.6

There are a number of performance monitor tools in the debian repos. ROCKS 5.4.3/Centos doesn't seem quite as well-equipped.

First out, htop:

htop:
wget http://downloads.sourceforge.net/project/htop/htop/1.0.1/htop-1.0.1.tar.gz
tar -xvf htop-1.0.1.tar.gz
cd htop-1.0.1/
./configure --prefix=/home/me/.htop
make
make install

It's as simple as that.
Add e.g.
alias htop='/home/me/.htop/bin/htop'
to your ~/.bashrc
Note: this works on Scientific Linux (boron) 5.4 as well.

sinfo:
Update 13/03/2012:
Sinfo <0.0.44 has IPv6 enabled by default.
On sinfo >=0.0.45 you can disable IPv6 using ./configure --disable-IPv6

Sinfo is probably the snazziest cluster monitoring tool that I know of. Sure, ganglia etc. are nice too, but they run as web service. Sinfo is a 'simple' curses program, but building it on CentOS was a bit of a challenge.

Be aware that sinfo versions prior to 0.045 expect ipv6 to work -- by default ROCKS disables IPv6, so use sinfo 0.0.45 and above.





First boost:
(yum install boost-devel didn't do anything for me)
cd ~/tmp
wget http://sourceforge.net/projects/boost/files/boost/1.49.0/boost_1_49_0.tar.gz/download
tar -xvf boost_1_49_0.tar.gz
cd boost_1_49_0/
./bootstrap.sh --prefix=/usr

Edit Jamroot and add
using mpi ;
The space between mpi and ; is needed.

Symlink to your mpic++, e.g. if your mpic++ is in /opt/openmpi:
sudo ln -s /opt/openmpi/bin/mpic++ /usr/bin/mpic++

The following step takes a long time:
sudo ./b2 -a install --layout=versioned --build-type=complete

These days all the libboost libs are multithread aware (or so I hear), and in debian it turns out that the -mt.so libs are just symbolic links to the 'regular' libs.
sudo ln -s /usr/lib/libboost_signals.so /usr/lib/libboost_signals-mt.so
sudo ln -s /usr/lib/libboost_date_time.so /usr/lib/libboost_date_time-mt.so
sudo ln -s /usr/lib/libboost_serialization.so /usr/lib/libboost_serialization-mt.so
sudo ln -s /usr/lib/libboost_wserialization.so /usr/lib/libboost_wserialization-mt.so
sudo ln -s /usr/lib/libboost_regex.so /usr/lib/libboost_regex-mt.so

sudo ln -s /usr/lib/libboost_signals.so.1.49.0 /usr/lib64/libboost_signals.so.1.49.0

Then asio
cd ~/tmp
wget "http://downloads.sourceforge.net/project/asio/asio/1.5.3%20%28Development%29/asio-1.5.3.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fasio%2F&ts=1331441086&use_mirror=aarnet"
tar -xvf asio-1.5.3.tar.bz2
cd asio-1.5.3/
./configure
make
sudo make install

Then sinfo
cd ~/tmp
wget http://www.ant.uni-bremen.de/whomes/rinas/sinfo/download/sinfo-0.0.45.tar.gz
tar -xvf sinfo-0.0.45.tar.gz
cd sinfo-0.0.45/
./configure --disable-IPv6

The build should be fine.

Configuration:
you'll end up with
/usr/local/sbin/sinfod
/usr/local/bin/sinfo
You may want to make sure there are paths to them by adding the following to your ~/.bashrc:
export PATH=$PATH:/usr/local/bin:/usr/local/sbin
The changes take effect next time you log in to a shell, or just run
source ~/.bashrc
for immediate effect.

Also, create a file called /etc/default/sinfo with the following in it:
OPTS="--quiet --bcastaddress=192.168.1.255"

Start sinfod with
sinfod --quiet --bcastaddress=192.168.1.255

then check that it's running
ps aux | grep sinfod

If it's not running, then try
sinfod -F

If it gives something along the lines of
exception:open:address family not supported
you most likely
1) haven't enabled ipv6 for your interface and
2) didn't disable IPv6 during compilation and/or
3) used version<0.045

Check by doing ifconfig -- does it return both an ipv4 and an ipv6 address?

Enabling ipv6
Unless you know what you're doing, don't fiddle with the network interfaces on a production cluster -- network interfaces on a multinode cluster are typically highly tuned to minimise latency, so don't mess it up.

Anyway. First check your /etc/modules.conf and - if present - comment out
alias ipv6 off
options ipv6 disable=1
Edit your /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1:0
IPADDR=192.168.1.111
NETMASK=255.255.255.0
BOOTPROTO=none
MTU=1500
TYPE=Ethernet
GATEWAY=192.168.1.1
USERCTL=no
IPV6INIT=yes
PEERDNS=yes
ONPARENT=yes
IPV6ADDR=fe80::2f0:4dff:f383:b44/64
IPV6_DEFAULTGW=fe80::2f0:4dff:fe83:a48/64
I just made up the IPV6ADDR, and took the IPV6_DEFAULTGW from my gateway machine (running debian, so ipv6 enabled by default)

Assuming that your firewall is allowing traffic at port 60003 and free traffic in and out on 192.168.1.255 things should work fine.



Errors


Error (boost):
MPI auto-detection failed: unknown wrapper compiler mpic++
Please report this error to the Boost mailing list: http://www.boost.org
You will need to manually configure MPI support.
Solution:
make sure you've symlinked to your mpic++ instance in /usr/bin
e.g. if your mpic++ is in /opt/openmpi/bin/mpic++
sudo ln -s /opt/openmpi/bin/mpic++ /usr/bin/mpic++


Error (sinfo):
message.cc: In member function 'void Message::popFrontMemory(void*, size_t)':
message.cc:183: error: 'memory' was not declared in this scope
message.cc:193: error: 'boost' has not been declared
message.cc:193: error: expected primary-expression before 'char'
message.cc:193: error: expected `;' before 'char'
message.cc:196: error: 'newMemory' was not declared in this scope
message.cc:196: error: 'memory' was not declared in this scope
make[2]: *** [message.lo] Error 1
make[2]: Leaving directory `/state/partition1/home/me/tmp/sinfo-0.0.44/libmessage'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/state/partition1/home/me/tmp/sinfo-0.0.44/libmessage'
make: *** [all-recursive] Error 1
Solution:
You need to make sure that the libs are found -- either symlink manually between your build directory and /usr/lib, or use boostrap.sh --prefix=/usr. See above for how to do it.

Error (sinfo):
udpmessagereceiver.h:14: error: 'asio' has not been declared
udpmessagereceiver.h:14: error: ISO C++ forbids declaration of 'endpoint' with no type
udpmessagereceiver.h:14: error: expected ';' before 'sender_endpoint'
udpmessagereceiver.h:16: error: 'asio' has not been declared
udpmessagereceiver.h:16: error: ISO C++ forbids declaration of 'io_service' with no type
udpmessagereceiver.h:16: error: expected ';' before '&' token
udpmessagereceiver.h:17: error: 'asio' has not been declared
udpmessagereceiver.h:17: error: ISO C++ forbids declaration of 'socket' with no type
udpmessagereceiver.h:17: error: expected ';' before 'sock'
udpmessagereceiver.h:20: error: expected ',' or '...' before '::' token
udpmessagereceiver.h:20: error: ISO C++ forbids declaration of 'asio' with no type
udpmessagereceiver.h:23: error: 'asio' has not been declared
udpmessagereceiver.h:23: error: expected `)' before '&' token
udpmessagereceiver.cc:5: error: 'asio' has not been declared
udpmessagereceiver.cc:5: error: expected `)' before '&' token
make[1]: *** [udpmessagereceiver.lo] Error 1
make[1]: Leaving directory `/state/partition1/home/me/tmp/sinfo-0.0.44/libmessageio'
make: *** [all-recursive] Error 1

Solution: you've only got boost::asio installed, not the independent asio. See above for how to compile and install asio.

Error (sinfo):

/usr/bin/ld: cannot find -lboost_signals-mt
collect2: ld returned 1 exit status
make[2]: *** [sinfod] Error 1
make[2]: Leaving directory `/state/partition1/home/me/tmp/sinfo-0.0.44/sinfod'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/state/partition1/home/me/tmp/sinfo-0.0.44/sinfod'
make: *** [all-recursive] Error 1
Solution:
You need a symlink pointing form /usr/lib/libboost_signals-mt.so to /usr/lib/libboost_signals.so
ln -s /usr/lib/libboost_signals.so /usr/lib/libboost_signals-mt.so 

Error (sinfod):
sinfod --quiet --bcastaddress=192.168.1.255 gives nothing and sinfod exits silently immediately
sinfod -F gives
exception:open:address family not supported
Here's the relevant strace output:
[..]
 socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 6
[..]
 socket(PF_INET6, SOCK_DGRAM, IPPROTO_UDP) = -1 EAFNOSUPPORT (Address family not supported by protocol)
futex(0x333a40d350, FUTEX_WAKE_PRIVATE, 2147483647) = 0
close(6)                                = 0
close(3)                                = 0
close(4)                                = 0
close(5)                                = 0
write(2, "Exception: ", 11)             = 11
write(2, "open: Address family not support"..., 46) = 46
write(2, "\n", 1)                       = 1
exit_group(0)                           = ?

Solution: enable ipv6 (see above)

08 March 2012

97. Wine 1.4 out now -- very brief build instructions

UPDATE 16 May 2013: See here for Wine 1.5.30: http://verahill.blogspot.com.au/2013/05/416-wine-1530-in-chroot.html

UPDATE (10th Jan 2013): See here for Wine 1.5.21 using the multiarch approach in Debian Testing/Wheezy: http://verahill.blogspot.com.au/2013/01/308-compiling-wine-1521-on-debian.html

Updated list of dependencies for debian stable/squeeze: http://verahill.blogspot.com.au/2012/11/compiling-wine-155-from-source-using.html


The instructions are identical to those for wine1.4 rc4 and 5: http://verahill.blogspot.com.au/2012/02/debian-testing-wheezy-64-compiling-wine.html and wine 1.3.35: http://verahill.blogspot.com.au/2012/01/debian-testingwheezy-64-bit-installing.html

I've tested the build on 8 March 2012.

-- START HERE --
sudo apt-get install bison flex gcc libc6-dev libfontconfig-dev libfreetype6-dev libglu-dev libgsm1-dev libice-dev libjpeg-dev libldap-dev libmpg123-dev libncurses5-dev libopenal-dev libpng-dev libsm-dev libssl-dev libusb-dev libx11-dev libxcomposite-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxml2-dev libxrandr-dev libxrender-dev libxslt-dev libxt-dev libxxf86vm-dev make libcapi20-dev liblcms-dev libsane-dev libhal-dev libdbus-1-dev valgrind prelink libcups2-dev opencl-dev lib32opencl1 oss4-dev gettext lib32v4l-dev lib32ncurses5-dev lib32asound2-dev lib32z-dev ia32-libs-dev
mkdir ~/tmp
cd tmp/
wget http://prdownloads.sourceforge.net/wine/wine-1.4.tar.bz2
tar -xvf wine-1.4.tar.bz2
./configure

configure: gstreamer-0.10 base plugins 32-bit development files not found, gstreamer support disabled
configure: libgsm 32-bit development files not found, gsm 06.10 codec won't be supported.
configure: libtiff 32-bit development files not found, TIFF won't be supported.
configure: WARNING: libjpeg 32-bit development files not found, JPEG won't be supported.
configure: Finished.  Do 'make' to compile Wine.
The warnings about lack of support can safely be ignored if you don't need it. The TIFF error seems a bit random since it appears on some of my systems, but not others. I haven't figured out the responsible package yet.

make
sudo checkinstall --install=no
to build 23Mb deb package without installing it
 OR 
sudo make install
to install without building a package.


Note:
JPEG support is supposedly available if you
1. remove symlinks
sudo rm /usr/lib32/libjpeg.so.62 /usr/lib32/libjpeg.so.62.0.0
2. Then, create new ones
sudo ln -s /usr/lib32/libjpeg.so.8 /usr/lib32/libjpeg.so.62
sudo ln -s /usr/lib32/libjpeg.so.8 /usr/lib32/libjpeg.so.62.0.0




Edit:
I didn't know it before, but there's a slightly different, wine-specific, way of building described here http://chrisjrob.com/2012/03/08/wine-1-4-on-debian-wheezy/

To see you wine version do
winecfg
This is from a newer build - 1.5.6



Links to this page:
http://chrisjrob.com/2012/03/08/wine-1-4-on-debian-wheezy
http://forums.linuxmint.com/viewtopic.php?p=535245
http://debian.linux.pl/threads/26515-Instalacja-wine-1-4-w-Debianie-Squeeze

02 March 2012

90. Compiling kernel 3.2.9 on Debian Testing

UPDATE: the instructions below work without modification with kernel v 3.2.9

For a more exhaustive description of how to build a kernel for debian, see here:
http://verahill.blogspot.com.au/2012/02/debian-testing-building-your-own-linux.html

I'll be brief:
You need 6.6 Gb of free space to build, and a fair amount of free time.


sudo apt-get install kernel-package fakeroot
wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.2.9.tar.bz2
tar -xvf linux-3.2.9.tar.bz2 
cd linux-3.2.9/
cat /boot/config-`uname -r`>.config
make oldconfig
make-kpkg clean


-- apply to 32 bit only --
ln -s /home/me/tmp/linux-3.2.9/Documentation/virtual/lguest  Documentation/lguest
-- for 32 bit only end --


fakeroot make-kpkg -j4 --initrd --revision=3.2.9 kernel_image kernel_headers

where 4 is the number of cores(3)+1 (e.g. quadcore gives 5)
wait....wait...wait...takes a while...wait...wait...


mv ../linux*3.2.9*.deb .
sudo dpkg -i *.deb

Done. 
Linux tantalum 3.2.9 #1 SMP Fri Mar 2 15:21:59 EST 2012 x86_64 GNU/Linux

Minor note: Navigating Kernel.org


Each minor version has a stable release -- for 3.2.X it was 3.2.8 until 3.2.9 was released. Given that 3.3 is in the works, 3.2.9 will be the stable version of the 3.2 minor version.
"Full source" is the full kernel source, which is what we used in the example above. "Patch" is the difference between the previous version and the current version e.g. 3.2.8 vs 3.2.9 -- there's more information here. You can save both bandwidth and compile time by patching instead of doing a full download.




Build times:
Intel Celeron 32 bit (1.6 GHz)
still waiting...

AMD Athlon II X3 using -j4
real    44m56.522s
user    75m52.633s
sys     12m7.241s
Intel i5-2400 using -j5
real 22m26.712s
user 50m23.289
  sys 6m1.111s
AMD Phenom II X7 using -j7
real 28m46.599s
user 81m0.108s
sys 12m57.825s




01 March 2012

88. Building Apache 2.4.1 on Debian Testing

WARNING:
Don't remove your existing installation of apache2 without thinking. gnome-core depends on it.

Updated 1 March 2012. Added missing information which prevented building and now provide information about auto-start using an /etc/init.d/ script. Original post at 2012-02-23

Building
 A new version of apache is kind of a big deal. Here's how to build it.

sudo apt-get install libapr1-dev uuid-dev libaprutil1-dev libmysqlclient-dev libpq-dev libsqlite3-dev rcconf
wget http://apache.mirror.aussiehq.net.au//httpd/httpd-2.4.1.tar.gz
tar -xvf httpd-2.4.1.tar.gz
cd httpd-2.4.1/
./configure
make -j5

where 5 is the number of cores+1. Four-core i5 => 4+1=5.

To install run
sudo make install
or
sudo checkinstall
sudo dpkg -i *.deb


Done.


sudo checkinstall won't work unless you first
sudo mkdir -p /usr/local/apache2/modules
(see comment below by Y&S who pointed this out)

If you don't create the directory first, you get
/usr/share/apr-1.0/build/libtool --silent --mode=install install mod_allowmethods.la /usr/local/apache2/modules/
ranlib: could not create temporary file whilst writing archive: No more archived files
make[3]: *** [install-modules-yes] Error 1
make[3]: Leaving directory `/home/me/tmp/httpd-2.4.1/modules/aaa'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/me/tmp/httpd-2.4.1/modules/aaa'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/me/tmp/httpd-2.4.1/modules'
make: *** [install-recursive] Error 1
****  Installation failed. Aborting package creation.

Anyway, your compiled httpd is now in /usr/local/apache2/bin/httpd
In my case /usr/local/apache2/bin is not in my PATH -- whether you want to add it or not is a matter of choice.

In order for you to bind your own httpd to port 80 you need to stop apache2 if it is running
sudo service apache2 stop


Test your build:
me@tantalum:~$ /usr/local/apache2/bin/httpd -v
Server version: Apache/2.4.1 (Unix)
Server built:   Feb 23 2012 11:51:26
So far, very easy.

I've tried it on amd64 and i386 debian testing machines.

Replacing old version of apache2
Don't try to remove apache2.2-bin since gnome-core depends on it:
http://www.linuxformat.com/forums/viewtopic.php?p=101538

The easiest way to deal with this is to do
sudo rcconf 
and de-select apache2. This way it's still installed, but won't run as a rc service.

Making it boot -- init.d script
I had a look at this: http://www.cyberciti.biz/tips/linux-write-sys-v-init-script-to-start-stop-service.html

And here's my /etc/init.d/httpd script

#!/bin/bash
# description: apache2 httpd 2.4.1 server
# Start the service httpd
start() {
        /usr/local/apache2/bin/httpd &
        echo "Up and running"
}
# Restart the service httpd
stop() {
        killall httpd
        echo "Killing httpd"
}
### main logic ###
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  *)
        echo $"Usage: $0 {start|stop}"
        exit 1
esac
exit 0
Don't forget to chmod+x


Finally,
sudo rcconf
and select httpd (it'll be at the bottom of the list)

It's not the prettiest of scripts, and you can probably do better by editing /etc/init.d/apache2

26 February 2012

77. Compiling Wine 1.4-rc4 and wine 1.4-rc5 on debian testing

UPDATE 16 May 2013: See here for Wine 1.5.30: http://verahill.blogspot.com.au/2013/05/416-wine-1530-in-chroot.html

A more exhaustive description of installing wine in general is here: http://verahill.blogspot.com.au/2012/01/debian-testingwheezy-64-bit-installing.html

I'm not a fan of running windows programmes on linux -- there are enough high-quality packages out there for linux to last you a life-time, and no matter how good wine is¸ the experience of running a windows program on linux is likely to be worse (if faster) than running it natively.

But like most people I'm help prisoner by my fellow co-workers who insists on dog+world using MS Office etc. Also, in spite of everything there are a few pieces of specialised software which lack linux equivalents.

UPDATE (10th Jan 2013): See here for Wine 1.5.21 using the multiarch approach: http://verahill.blogspot.com.au/2013/01/308-compiling-wine-1521-on-debian.html



Finally, from the point of view of easing new users off of windows and onto a real OS, wine and virtualbox fill important functions. I was myself a heavy user of both in the beginning, before learning how to use gnuplot, latex etc.

JPEG support is a PITA, but possible -- see below.

opencl -dev and lib32opencl1 require the contrib non-free repos, e.g.
deb ftp://ftp.au.debian.org/debian/ testing main contrib non-free
Updated: I've tried the same guide on wine 1.4-rc5

--- START HERE ---
With that out of the way, here's building wine 1.4-rc4

First, you need a whole lot of packages -- these will be installed if you've previously compiled wine according to this:

sudo apt-get install bison flex gcc libc6-dev libfontconfig-dev libfreetype6-dev libglu-dev libgsm1-dev libice-dev libjpeg-dev libldap-dev libmpg123-dev libncurses5-dev libopenal-dev libpng-dev libsm-dev libssl-dev libusb-dev libx11-dev libxcomposite-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxml2-dev libxrandr-dev libxrender-dev libxslt-dev libxt-dev libxxf86vm-dev make libcapi20-dev liblcms-dev libsane-dev libhal-dev libdbus-1-dev valgrind prelink libcups2-dev opencl-dev lib32opencl1 oss4-dev gettext

sudo apt-get install lib32v4l-dev lib32ncurses5-dev lib32asound2-dev lib32z-dev ia32-libs-dev

To enable jpeg support you are SUPPOSED TO:
First, remove existing symlinks
sudo rm /usr/lib32/libjpeg.so.62 /usr/lib32/libjpeg.so.62.0.0
Then, create new ones
sudo ln -s /usr/lib32/libjpeg.so.8 /usr/lib32/libjpeg.so.62
sudo ln -s /usr/lib32/libjpeg.so.8 /usr/lib32/libjpeg.so.62.0.0

Download the sources and expand:
wget http://prdownloads.sourceforge.net/wine/wine-1.4-rc4.tar.bz2
bzip2 -d wine-1.4-rc4.tar.bz2
tar -xvf wine-1.4-rc4.tar
./configure

If you get errors, see below and here for solutions. Missing libraries are often ok -- it just means certain functionality will be missing. It's up to you what is important. If you followed the instructions above you'll have jpeg support in spite of what configure spits out.

make -j7

as usual 7 is the number of cores +1. If you have a dual core, replace 7 with 3. Parallel building is sometimes much, much faster than just using one core, sometimes not.
If you already have a version of wine installed, this is a good time to uninstall it. Then,

sudo checkinstall

builds a .deb package and installs it. It's useful if you need to uninstall in the future.

The

Copying documentation directory...
./
./VERSION
./AUTHORS
./LICENSE
./README
./ANNOUNCE
./COPYING.LIB

part takes forever. It will finish in about ten minutes or so. If the building of the debian package fails, make sure you set the version number correctly (see errors below).


aptitude show wine-1.4
Package: wine-1.4                      
New: yes
State: installed
Automatically installed: no
Version: 1.4-rc4-1
Priority: extra
Section: checkinstall
Maintainer: root@beryllium
Uncompressed Size: 129 M
Description: Wine 1.4-rc4

Done.

Updated 02/03/2012:

For Wine1.4-rc5:
 wget http://sourceforge.net/projects/wine/files/Source/wine-1.4-rc5.tar.bz2
tar -xvf wine-1.4-rc5.tar.bz2
cd wine-1.4-rc5/
./configure
gstreamer, libgsm, libtiff, libjpeg warnings. You can ignore them.
make
sudo checkinstall


List of errors:

Error:
configure: OpenCL 32-bit development files not found, OpenCL won't be supported.

Solution:
sudo apt-get install lib32opencl1 opencl-dev


Error:
configure: gstreamer-0.10 base plugins 32-bit development files not found, gstreamer support disabled
No solution:
Not the only one with this problem...I don't care enough about video to follow this up any more. Likely, an approach similar to this will work: http://forum.winehq.org/viewtopic.php?t=5797&sid=afde9de83a98b8cb24df2bb3646930b6


Error:
configure: OSS sound system found but too old (OSSv4 needed), OSS won't be supported.

Solution:
 sudo apt-get install oss4-dev


Error:
configure: libgsm 32-bit development files not found, gsm 06.10 codec won't be supported.
Solution, maybe:
I don't care too much,  but there are solutions if you are desperate enough: http://forum.winehq.org/viewtopic.php?t=5797&sid=afde9de83a98b8cb24df2bb3646930b6



Error:

configure: libtiff 32-bit development files not found, TIFF won't be supported.

No soution:
This comes up on some boxes, but not others. Comparing the installed packages I have no idea why.

aptitude search tiff|grep dev


v   libtiff-dev                     -                                        
i A libtiff4-dev                    - Tag Image File Format (TIFF) library (old
p   libtiff5-dev                    - Tag Image File Format library (TIFF), deve

ls /usr/lib32/libtiff* -lah
 /usr/lib32/libtiff.a
 /usr/lib32/libtiff.la
 /usr/lib32/libtiff.so -> libtiff.so.4.3.3
/usr/lib32/libtiff.so.4 -> libtiff.so.4.3.3
 /usr/lib32/libtiff.so.4.3.3
 /usr/lib32/libtiffxx.a
 /usr/lib32/libtiffxx.la
 /usr/lib32/libtiffxx.so -> libtiffxx.so.0.0.7


Error:
configure: WARNING: gettext tools not found, translations won't be built.
Solution:
sudo apt-get install gettext


Error:
configure: WARNING: libjpeg 32-bit development files not found, JPEG won't be supported.

Solution:
First, install
sudo apt-get install libjpeg8-dev

This pointed me here.

Here's how to check for the bug
 locate libjpeg | grep 32
/usr/lib32/libjpeg.a
/usr/lib32/libjpeg.la
/usr/lib32/libjpeg.so
/usr/lib32/libjpeg.so.62
/usr/lib32/libjpeg.so.62.0.0
/usr/lib32/libjpeg.so.8
/usr/lib32/libjpeg.so.8.0.2
ls /usr/lib32/libjpeg.* -lah

 /usr/lib32/libjpeg.a
/usr/lib32/libjpeg.la
/usr/lib32/libjpeg.so -> libjpeg.so.62.0.0
/usr/lib32/libjpeg.so.62 -> libjpeg.so.62.0.0
/usr/lib32/libjpeg.so.62.0.0
 /usr/lib32/libjpeg.so.8 -> libjpeg.so.8.0.2
 /usr/lib32/libjpeg.so.8.0.2

Yup, libjpeg.so points to v 6.2 instead of v 8 which I have installed.

According to the bug report, the cause of the error is that the header file jpeglib.h states one version, and the /usr/lib32/libjpeg.so points to another:

cat /usr/include/jpeglib.h|grep "LIB_VERSION"| grep define
#define JPEG_LIB_VERSION        80 /* Compatibility version 8.0 */
#define JPEG_LIB_VERSION_MAJOR  8
#define JPEG_LIB_VERSION_MINOR  4

FIX:
Remove existing symlinks
sudo rm /usr/lib32/libjpeg.so.62 /usr/lib32/libjpeg.so.62.0.0
Create new ones
sudo ln -s /usr/lib32/libjpeg.so.8 /usr/lib32/libjpeg.so.62
sudo ln -s /usr/lib32/libjpeg.so.8 /usr/lib32/libjpeg.so.62.0.0

ls /usr/lib32/libjpeg.* -lah now gives

 /usr/lib32/libjpeg.a

 /usr/lib32/libjpeg.la

/usr/lib32/libjpeg.so -> libjpeg.so.62.0.0

 /usr/lib32/libjpeg.so.62 -> /usr/lib32/libjpeg.so.8

 /usr/lib32/libjpeg.so.62.0.0 -> /usr/lib32/libjpeg.so.8

/usr/lib32/libjpeg.so.8 -> libjpeg.so.8.0.2

/usr/lib32/libjpeg.so.8.0.2


The error message remains on ./configure, but jpeg support is /supposed/ to work in spite of this.


Error:
Building Debian package... FAILED!
*** Failed to build the package
Do you want to see the log file?  [y]:
dpkg-deb: error: parsing file '/var/tmp/tmp.Y50XUaisW0/package/DEBIAN/control' near line 7 package 'wine-1.4':  error in Version string 'rc4-1': version number does not start with digit

Solution:
sudo checkinstall
This package will be built according to these values:
0 -  Maintainer: [ root@beryllium ]
1 -  Summary: [ Wine 1.4-rc4 ]
2 -  Name:    [ wine-1.4 ]
3 -  Version: [ rc4 ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ amd64 ]
8 -  Source location: [ wine-1.4-rc4 ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ wine-1.4 ]
12 - Conflicts: [  ]
13 - Replaces: [  ]
Enter a number to change any of them or press ENTER to continue: 3
Enter new version:
>> 1.4-rc4

24 February 2012

75. [solved] Problems with homebuilt nwchem 6.1 on Debian Testing


EDIT 18 May 2012: 
It's now been solved
Compiling nwchem 6.1 with internal libs on debian:
 http://verahill.blogspot.com.au/2012/05/compiling-nwchem-61-with-internal-libs.html
Compiling nwchem 6.1 with openblas on debian:
 http://verahill.blogspot.com.au/2012/05/building-nwchem-61-on-debian.html


UPDATE April 2012: Someone else is having the same problem: http://www.nwchem-sw.org/index.php/Special:AWCforum/st/id435/ . Binaries built on ROCKS 5.4.3 work, but binaries built on debian testing don't: the gfortran version is GNU Fortran (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50). On debian, which yields a segfaulting binary, the version is GNU Fortran (Debian 4.6.3-1) 4.6.3


Nwchem 6.1 was released in February this year. The build instructions are ALMOST the same as for Nwchem 6.0 -- the difference is the use of export USE_MPIF4=y. Well, that and me not having much success in actually USING nwchem as opposed to building it.

There is now an nwchem version with mpi support in the debian unstable repos. I have not used or tested it.

I can build the 32 bit version of nwchem 6.1 just fine.Building the 64 bit version works absolutely fine too. However, once you attempt to run, it crashes. Ergo, this is NOT A SOLUTION. It's a bunch of error messages so that more seasoned and skilled operators than I may offer a solution. If you have an option, build and use version 6.0 instead.

Update:
I built a version with openmpi support as well, which also segfaults:
Here are the build instructions:

sudo apt-get install openmpi-bin openmpi-dev
export LARGE_FILES=TRUE
export TCGRSH=/usr/bin/ssh
export NWCHEM_TOP=/home/me/tmp/nwchem-6.1
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES=all
export USE_MPI=y
export USE_MPIF=y
export MPI_LOC=/usr/lib/openmpi
export MPI_INCLUDE=/usr/lib/openmpi/include
export USE_MPIF4=y
export LIBRARY_PATH=$LIBRARY_PATH:/usr/lib/openmpi/lib
export LIBMPI="-lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77"
cd $NWCHEM_TOP/src
make clean
make  nwchem_config
make  FC=gfortran


and here's what happens on execution

[beryllium:24650] *** Process received signal ***
[beryllium:24650] Signal: Segmentation fault (11)
[beryllium:24650] Signal code: Address not mapped (1)
[beryllium:24650] Failing at address: 0x44000098
[beryllium:24650] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x324f0) [0x7f08deeb84f0]
[beryllium:24650] [ 1] /usr/lib/libmpi.so.0(PMPI_Comm_set_errhandler+0x60) [0x7f08e0526c30]
[beryllium:24650] [ 2] ./nwchem() [0x292d504]
[beryllium:24650] [ 3] ./nwchem() [0x292d596]
[beryllium:24650] [ 4] ./nwchem() [0x40657a]
[beryllium:24650] [ 5] ./nwchem() [0x406f7d]
[beryllium:24650] [ 6] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7f08deea4ead]
[beryllium:24650] [ 7] ./nwchem() [0x405189]
[beryllium:24650] *** End of error message ***


This only happens on 64 bit debian -- 32 bit deb and 64 bit centos are both fine

OLD POST:

--start here --

Here's what I've done so far

Put a hold on your mpich2 and mpich2-dev packages (see e.g. here for more details)
1. edit your /etc/apt/sources.list to allow packages from stable e.g.

deb ftp://ftp.au.debian.org/debian/ testing main contrib non-fre
deb ftp://ftp.au.debian.org/debian/ stable main contrib non-free

2. create an /etc/apt/preferences file e.g.

Package: *
Pin: release a=testing
Pin-Priority: 990
Package: *
Pin: release a=stable
Pin-Priority: -10
2. install v 1.2 explicitly
sudo apt-get update && sudo apt-get install mpich2=1.2.1.1-5 libmpich2-dev=1.2.1.1-5

3. put a hold on the packages

sudo su
echo "mpich2 hold"|dpkg --set-selections
echo "libmpich2-dev hold"|dpkg --set-selections

exit

Download the nwchem source
cd ~
wget http://www.nwchem-sw.org/images/Nwchem-6.1-2012-Feb-10.tar.gz
tar -xvf Nwchem-6.1-2012-Feb-10.tar.gz
cd nwchem-6.1

create buildconf.sh in ~/nwchem-6.1
Put the following in it (for 64 bit system):
export LARGE_FILES=TRUE
export TCGRSH=/usr/local/bin/ssh
export NWCHEM_TOP=/home/me/nwchem-6.1
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES=all
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_LOC=/usr
export MPI_LIB=$MPI_LOC/lib
export MPI_INCLUDE=$MPI_LOC/include/mpich2
export LIBMPI="-lmpich -lfmpich"
export NWCHEM_MODULES="all"
cd $NWCHEM_TOP/src
make clean
make nwchem_config
make FC=gfortran

Build
Start the build
sh buildconf.sh

Building takes about half an hour. Everything builds fine. However, running -- with or without mpdrun -- causes the error below.

It doesn't matter how much memory I allocated. The error seems to have something to do with "Invalid write of size 8" which I understand to mean that pointers are 8 bytes long but don't have 8 bytes allocated to them. But then I'm not an expert.

Would it have something to do with
USE_MPIF4=y?

Without USE_MPIF4 I end up with the stupid_* error messages (stupid_sum, stupid_task etc.)



Error:
running e.g.  mpdrun -n 2 nwchem nwchem.nw gives:

      Screening Tolerance Information
      -------------------------------
          Density screening/tol_rho: 1.00D-10
          AO Gaussian exp screening on grid/accAOfunc:  14
          CD Gaussian exp screening on grid/accCDfunc:  20
          XC Gaussian exp screening on grid/accXCfunc:  20
          Schwarz screening/accCoul: 1.00D-08

0:Segmentation Violation error, status=: 11
(rank:0 hostname:tantalum pid:19944):ARMCI DASSERT fail. ../../ga-5-1/armci/src/common/signaltrap.c:SigSegvHandler():310 cond:0



More detail:
Running just nwchem nwchem.nw gives a bit more detail:

      Screening Tolerance Information
      -------------------------------
          Density screening/tol_rho: 1.00D-10
          AO Gaussian exp screening on grid/accAOfunc:  14
          CD Gaussian exp screening on grid/accCDfunc:  20
          XC Gaussian exp screening on grid/accXCfunc:  20
          Schwarz screening/accCoul: 1.00D-08

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]
/usr/lib/libmpich.so.1.2(+0xbedc9)[0x7f597c101dc9]
/usr/lib/libmpich.so.1.2(MPID_Abort+0x6d)[0x7f597c122d0d]
/usr/lib/libmpich.so.1.2(PMPI_Abort+0x2f5)[0x7f597c090805]
nwchem[0x2896591]
nwchem[0x2883883]
/lib/x86_64-linux-gnu/libc.so.6(+0x324f0)[0x7f597b0e64f0]
nwchem[0x29b6043]
nwchem[0x27a04a0]
nwchem[0x27a3955]
nwchem[0x271492b]
nwchem[0x5cf410]
nwchem[0x5b3d18]
nwchem[0x5a9735]
nwchem[0x5a99b6]
nwchem[0x418ee8]
nwchemAborted

And more detail:
valgrind nwchem nwchem.nw



==19910==    by 0x5CF40F: diis_bld12_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)                                          
==19910==    by 0x5B3D17: dft_main0d_ (dft_main0d.F:549)                                                                      
==19910==    by 0x5A9734: nwdft_ (nwdft.F:274)                                                                                
==19910==    by 0x5A99B5: dft_energy_ (nwdft.F:18)                                                                            
==19910==    by 0x418EE7: task_energy_doit_ (task_energy.F:251)                                                              
==19910==    by 0x41A57B: task_energy_ (task_energy.F:95)                                                                    
==19910==    by 0x40DAD2: task_ (task.F:337)                                                                                  
==19910==    by 0x4068F5: MAIN__ (nwchem.F:251)                                                                              
==19910==  Address 0x199750a0 is not stack'd, malloc'd or (recently) free'd                                                  
==19910==                                                                                                                    
==19910== Invalid write of size 8                                                                                            
==19910==    at 0x29B6043: dgemm_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)                                              
==19910==    by 0x27A049F: GAI_DGEMM (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)                                            
==19910==    by 0x27A3954: pnga_matmul (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)                                          
==19910==    by 0x271492A: ga_dgemm_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)                                            
==19910==    by 0x5CF40F: diis_bld12_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)                                          
==19910==    by 0x5B3D17: dft_main0d_ (dft_main0d.F:549)                                                                      
==19910==    by 0x5A9734: nwdft_ (nwdft.F:274)                                                                                
==19910==    by 0x5A99B5: dft_energy_ (nwdft.F:18)                                                                            
==19910==    by 0x418EE7: task_energy_doit_ (task_energy.F:251)                                                              
==19910==    by 0x41A57B: task_energy_ (task_energy.F:95)                                                                    
==19910==    by 0x40DAD2: task_ (task.F:337)                                                                                  
==19910==    by 0x4068F5: MAIN__ (nwchem.F:251)                                                                              
==19910==  Address 0x199750b0 is not stack'd, malloc'd or (recently) free'd                                                  
==19910==                                                                                                                    
0:Segmentation Violation error, status=: 11                                                                                  
(rank:0 hostname:tantalum pid:19910):ARMCI DASSERT fail. ../../ga-5-1/armci/src/common/signaltrap.c:SigSegvHandler():310 cond:0
application called MPI_Abort(comm=0x84000001, 11) - process 0                                                                
==19910==                                                                                                                    
==19910== HEAP SUMMARY:                                                                                                      
==19910==     in use at exit: 4,303,284,335 bytes in 695 blocks                                                              
==19910==   total heap usage: 2,132 allocs, 1,437 frees, 4,305,897,103 bytes allocated                                        
==19910==                                                                                                                    
==19910== LEAK SUMMARY:                                                                                          
==19910==    definitely lost: 24 bytes in 1 blocks
==19910==    indirectly lost: 512 bytes in 1 blocks
==19910==      possibly lost: 0 bytes in 0 blocks
==19910==    still reachable: 4,303,283,799 bytes in 693 blocks
==19910==         suppressed: 0 bytes in 0 blocks
==19910== Rerun with --leak-check=full to see details of leaked memory
==19910==
==19910== For counts of detected and suppressed errors, rerun with: -v
==19910== Use --track-origins=yes to see where uninitialised values come from
==19910== ERROR SUMMARY: 662 errors from 9 contexts (suppressed: 4 from 4)


And way too much detail:
valgrind --leak-check=full --track-origins=yes --log-file=valgrind.log nwchem nwchem.nw
==20005== Memcheck, a memory error detector

==20005== Memcheck, a memory error detector
==20005== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==20005== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==20005== Command: nwchem nwchem.nw
==20005== Parent PID: 19563
==20005==
==20005== Warning: set address range perms: large range [0x3952b040, 0x13352b110) (undefined)
==20005== Syscall param write(buf) points to uninitialised byte(s)
==20005==    at 0x12803980: __write_nocancel (syscall-template.S:82)
==20005==    by 0x127A8B92: _IO_file_write@@GLIBC_2.2.5 (fileops.c:1276)
==20005==    by 0x127A8809: new_do_write (fileops.c:530)
==20005==    by 0x127A8B34: _IO_do_write@@GLIBC_2.2.5 (fileops.c:503)
==20005==    by 0x127A9347: _IO_file_sync@@GLIBC_2.2.5 (fileops.c:905)
==20005==    by 0x1279DE19: fflush (iofflush.c:43)
==20005==    by 0xA3CF1F: hdbm_file_flush (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x8C84AA: rtdb_seq_put (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x8C55BD: rtdb_put (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x8C48B2: rtdb_put_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x9EAFAC: util_set_rtdb_state_ (util_rtdb_state.F:40)
==20005==    by 0x4067FD: MAIN__ (nwchem.F:222)
==20005==  Address 0x10950022 is not stack'd, malloc'd or (recently) free'd
==20005==  Uninitialised value was created by a stack allocation
==20005==    at 0x8C6130: rtdb_seq_put_info (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==
==20005== Invalid write of size 8
==20005==    at 0x29B6048: dgemm_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x27A049F: GAI_DGEMM (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x27A3954: pnga_matmul (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x271492A: ga_dgemm_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x5CF40F: diis_bld12_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x5B3D17: dft_main0d_ (dft_main0d.F:549)
==20005==    by 0x5A9734: nwdft_ (nwdft.F:274)
==20005==    by 0x5A99B5: dft_energy_ (nwdft.F:18)
==20005==    by 0x418EE7: task_energy_doit_ (task_energy.F:251)
==20005==    by 0x41A57B: task_energy_ (task_energy.F:95)
==20005==    by 0x40DAD2: task_ (task.F:337)
==20005==    by 0x4068F5: MAIN__ (nwchem.F:251)
==20005==  Address 0x19975040 is 0 bytes after a block of size 42,008,576 alloc'd
==20005==    at 0x1155679D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20005==    by 0x291F69B: morecore (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x291F793: kr_malloc (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x27A492B: pnga_matmul (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x271492A: ga_dgemm_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x5CF40F: diis_bld12_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x5B3D17: dft_main0d_ (dft_main0d.F:549)
==20005==    by 0x5A9734: nwdft_ (nwdft.F:274)
==20005==    by 0x5A99B5: dft_energy_ (nwdft.F:18)
==20005==    by 0x418EE7: task_energy_doit_ (task_energy.F:251)
==20005==    by 0x41A57B: task_energy_ (task_energy.F:95)
==20005==    by 0x40DAD2: task_ (task.F:337)
==20005==
==20005== Invalid write of size 8
==20005==    at 0x29B604D: dgemm_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x27A049F: GAI_DGEMM (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x27A3954: pnga_matmul (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x271492A: ga_dgemm_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x5CF40F: diis_bld12_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x5B3D17: dft_main0d_ (dft_main0d.F:549)
==20005==    by 0x5A9734: nwdft_ (nwdft.F:274)
==20005==    by 0x5A99B5: dft_energy_ (nwdft.F:18)
==20005==    by 0x418EE7: task_energy_doit_ (task_energy.F:251)
==20005==    by 0x41A57B: task_energy_ (task_energy.F:95)
==20005==    by 0x40DAD2: task_ (task.F:337)
==20005==    by 0x4068F5: MAIN__ (nwchem.F:251)
==20005==  Address 0x19975050 is not stack'd, malloc'd or (recently) free'd
==20005==
==20005== Invalid write of size 8
==20005==    at 0x29B6052: dgemm_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x27A049F: GAI_DGEMM (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x27A3954: pnga_matmul (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x271492A: ga_dgemm_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x5CF40F: diis_bld12_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x5B3D17: dft_main0d_ (dft_main0d.F:549)
==20005==    by 0x5A9734: nwdft_ (nwdft.F:274)
==20005==    by 0x5A99B5: dft_energy_ (nwdft.F:18)
==20005==    by 0x418EE7: task_energy_doit_ (task_energy.F:251)
==20005==    by 0x41A57B: task_energy_ (task_energy.F:95)
==20005==    by 0x40DAD2: task_ (task.F:337)
==20005==    by 0x4068F5: MAIN__ (nwchem.F:251)
==20005==  Address 0x19975060 is not stack'd, malloc'd or (recently) free'd
==20005==
==20005== Invalid write of size 8
==20005==    at 0x29B6057: dgemm_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x27A049F: GAI_DGEMM (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x27A3954: pnga_matmul (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x271492A: ga_dgemm_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x5CF40F: diis_bld12_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x5B3D17: dft_main0d_ (dft_main0d.F:549)
==20005==    by 0x5A9734: nwdft_ (nwdft.F:274)
==20005==    by 0x5A99B5: dft_energy_ (nwdft.F:18)
==20005==    by 0x418EE7: task_energy_doit_ (task_energy.F:251)
==20005==    by 0x41A57B: task_energy_ (task_energy.F:95)
==20005==    by 0x40DAD2: task_ (task.F:337)
==20005==    by 0x4068F5: MAIN__ (nwchem.F:251)
==20005==  Address 0x19975070 is not stack'd, malloc'd or (recently) free'd
==20005==
==20005== Invalid write of size 8
==20005==    at 0x29B6035: dgemm_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x27A049F: GAI_DGEMM (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x27A3954: pnga_matmul (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x271492A: ga_dgemm_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x5CF40F: diis_bld12_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x5B3D17: dft_main0d_ (dft_main0d.F:549)
==20005==    by 0x5A9734: nwdft_ (nwdft.F:274)
==20005==    by 0x5A99B5: dft_energy_ (nwdft.F:18)
==20005==    by 0x418EE7: task_energy_doit_ (task_energy.F:251)
==20005==    by 0x41A57B: task_energy_ (task_energy.F:95)
==20005==    by 0x40DAD2: task_ (task.F:337)
==20005==    by 0x4068F5: MAIN__ (nwchem.F:251)
==20005==  Address 0x19975080 is not stack'd, malloc'd or (recently) free'd
==20005==
==20005== Invalid write of size 8
==20005==    at 0x29B6039: dgemm_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x27A049F: GAI_DGEMM (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x27A3954: pnga_matmul (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x271492A: ga_dgemm_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x5CF40F: diis_bld12_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x5B3D17: dft_main0d_ (dft_main0d.F:549)
==20005==    by 0x5A9734: nwdft_ (nwdft.F:274)
==20005==    by 0x5A99B5: dft_energy_ (nwdft.F:18)
==20005==    by 0x418EE7: task_energy_doit_ (task_energy.F:251)
==20005==    by 0x41A57B: task_energy_ (task_energy.F:95)
==20005==    by 0x40DAD2: task_ (task.F:337)
==20005==    by 0x4068F5: MAIN__ (nwchem.F:251)
==20005==  Address 0x19975090 is not stack'd, malloc'd or (recently) free'd
==20005==
==20005== Invalid write of size 8
==20005==    at 0x29B603E: dgemm_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x27A049F: GAI_DGEMM (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x27A3954: pnga_matmul (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x271492A: ga_dgemm_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x5CF40F: diis_bld12_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x5B3D17: dft_main0d_ (dft_main0d.F:549)
==20005==    by 0x5A9734: nwdft_ (nwdft.F:274)
==20005==    by 0x5A99B5: dft_energy_ (nwdft.F:18)
==20005==    by 0x418EE7: task_energy_doit_ (task_energy.F:251)
==20005==    by 0x41A57B: task_energy_ (task_energy.F:95)
==20005==    by 0x40DAD2: task_ (task.F:337)
==20005==    by 0x4068F5: MAIN__ (nwchem.F:251)
==20005==  Address 0x199750a0 is not stack'd, malloc'd or (recently) free'd
==20005==
==20005== Invalid write of size 8
==20005==    at 0x29B6043: dgemm_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x27A049F: GAI_DGEMM (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x27A3954: pnga_matmul (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x271492A: ga_dgemm_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x5CF40F: diis_bld12_ (in /home/me/nwchem-6.1/bin/LINUX64/nwchem)
==20005==    by 0x5B3D17: dft_main0d_ (dft_main0d.F:549)
==20005==    by 0x5A9734: nwdft_ (nwdft.F:274)
==20005==    by 0x5A99B5: dft_energy_ (nwdft.F:18)
==20005==    by 0x418EE7: task_energy_doit_ (task_energy.F:251)
==20005==    by 0x41A57B: task_energy_ (task_energy.F:95)
==20005==    by 0x40DAD2: task_ (task.F:337)
==20005==    by 0x4068F5: MAIN__ (nwchem.F:251)
==20005==  Address 0x199750b0 is not stack'd, malloc'd or (recently) free'd
==20005==
==20005==
==20005== HEAP SUMMARY:
==20005==     in use at exit: 4,303,284,355 bytes in 697 blocks
==20005==   total heap usage: 2,135 allocs, 1,438 frees, 4,305,900,787 bytes allocated
==20005==
==20005== 536 (24 direct, 512 indirect) bytes in 1 blocks are definitely lost in loss record 662 of 679
==20005==    at 0x1155679D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20005==    by 0x11D6E128: ??? (in /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0)
==20005==    by 0x11E332F8: ??? (in /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0)
==20005==    by 0x11E2C573: ??? (in /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0)
==20005==    by 0x11D6BB47: ??? (in /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0)
==20005==    by 0x1093CCCF: call_init (dl-init.c:85)
==20005==    by 0x1093CDC6: _dl_init (dl-init.c:134)
==20005==    by 0x1092FB29: ??? (in /lib/x86_64-linux-gnu/ld-2.13.so)
==20005==    by 0x1: ???
==20005==    by 0x7FF00033A: ???
==20005==    by 0x7FF000341: ???
==20005==
==20005== LEAK SUMMARY:
==20005==    definitely lost: 24 bytes in 1 blocks
==20005==    indirectly lost: 512 bytes in 1 blocks
==20005==      possibly lost: 0 bytes in 0 blocks
==20005==    still reachable: 4,303,283,819 bytes in 695 blocks
==20005==         suppressed: 0 bytes in 0 blocks
==20005== Reachable blocks (those to which a pointer was found) are not shown.
==20005== To see them, rerun with: --leak-check=full --show-reachable=yes
==20005==
==20005== For counts of detected and suppressed errors, rerun with: -v
==20005== ERROR SUMMARY: 663 errors from 10 contexts (suppressed: 4 from 4)



For comparison, here's using nwchem 6.0:
NOTE that this version works just fine and runs to completion without error messages normally.
valgrind --leak-check=full --track-origins=yes --log-file=valgrind.log nwchem nwchem.nw



==21014== Memcheck, a memory error detector
==21014== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==21014== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==21014== Command: nwchem nwchem.nw
==21014== Parent PID: 20854
==21014==
==21014== Warning: set address range perms: large range [0x3952b040, 0x13352b110) (undefined)
==21014== Syscall param write(buf) points to uninitialised byte(s)
==21014==    at 0x11673980: __write_nocancel (syscall-template.S:82)
==21014==    by 0x11618B92: _IO_file_write@@GLIBC_2.2.5 (fileops.c:1276)
==21014==    by 0x11618809: new_do_write (fileops.c:530)
==21014==    by 0x11618B34: _IO_do_write@@GLIBC_2.2.5 (fileops.c:503)
==21014==    by 0x11619347: _IO_file_sync@@GLIBC_2.2.5 (fileops.c:905)
==21014==    by 0x1160DE19: fflush (iofflush.c:43)
==21014==    by 0x8A16D7: hdbm_file_flush (in /home/me/nwchem-6.0/bin/LINUX64/nwchem)
==21014==    by 0x83C973: rtdb_seq_put (in /home/me/nwchem-6.0/bin/LINUX64/nwchem)
==21014==    by 0x83ADA6: rtdb_put (in /home/me/nwchem-6.0/bin/LINUX64/nwchem)
==21014==    by 0x83A13F: rtdb_put_ (in /home/me/nwchem-6.0/bin/LINUX64/nwchem)
==21014==    by 0x85C72C: util_set_rtdb_state_ (util_rtdb_state.F:40)
==21014==    by 0x40636B: MAIN__ (nwchem.F:223)
==21014==  Address 0xf7c0022 is not stack'd, malloc'd or (recently) free'd
==21014==  Uninitialised value was created by a stack allocation
==21014==    at 0x83B7D0: rtdb_seq_put_info (in /home/me/nwchem-6.0/bin/LINUX64/nwchem)
==21014==
==21014== Conditional jump or move depends on uninitialised value(s)
==21014==    at 0x8A5E1F: sym_op_class_name_ (sym_op_cname.F:26)
==21014==    by 0x83FB41: sym_op_classify_ (sym_op_clsfy.F:49)
==21014==    by 0x845AE9: sym_movecs_adapt_ (sym_mo_adapt.F:77)
==21014==    by 0x719A4A: scf_movecs_sym_adapt_ (scf_sym_adap.F:70)
==21014==    by 0x731028: scf_vectors_guess_ (scf_vec_guess.F:403)
==21014==    by 0x58D4E6: dft_scf_ (dft_scf.F:526)
==21014==    by 0x58B67B: dft_main0d_ (dft_main0d.F:537)
==21014==    by 0x5818B3: nwdft_ (nwdft.F:309)
==21014==    by 0x581B24: dft_energy_ (nwdft.F:18)
==21014==    by 0x4174D7: task_energy_doit_ (task_energy.F:229)
==21014==    by 0x418AEB: task_energy_ (task_energy.F:74)
==21014==    by 0x40C646: task_ (task.F:301)
==21014==  Uninitialised value was created by a stack allocation
==21014==    at 0x83F9BD: sym_op_classify_ (sym_op_clsfy.F:32)
==21014==
==21014==
==21014== HEAP SUMMARY:
==21014==     in use at exit: 4,254,665,672 bytes in 20 blocks
==21014==   total heap usage: 10,491 allocs, 10,471 frees, 4,275,242,731 bytes allocated
==21014==
==21014== 17 bytes in 2 blocks are definitely lost in loss record 9 of 19
==21014==    at 0x103C679D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21014==    by 0x11626881: strdup (strdup.c:43)
==21014==    by 0x24D33F7: pbeginf_ (in /home/me/nwchem-6.0/bin/LINUX64/nwchem)
==21014==    by 0x405F53: MAIN__ (nwchem.F:66)
==21014==    by 0x406964: main (nwchem.F:336)
==21014==
==21014== 536 (24 direct, 512 indirect) bytes in 1 blocks are definitely lost in loss record 13 of 19
==21014==    at 0x103C679D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21014==    by 0x10BDE128: ??? (in /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0)
==21014==    by 0x10CA32F8: ??? (in /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0)
==21014==    by 0x10C9C573: ??? (in /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0)
==21014==    by 0x10BDBB47: ??? (in /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0)
==21014==    by 0xF7ACCCF: call_init (dl-init.c:85)
==21014==    by 0xF7ACDC6: _dl_init (dl-init.c:134)
==21014==    by 0xF79FB29: ??? (in /lib/x86_64-linux-gnu/ld-2.13.so)
==21014==    by 0x1: ???
==21014==    by 0x7FF00032A: ???
==21014==    by 0x7FF000331: ???
==21014==
==21014== LEAK SUMMARY:
==21014==    definitely lost: 41 bytes in 3 blocks
==21014==    indirectly lost: 512 bytes in 1 blocks
==21014==      possibly lost: 0 bytes in 0 blocks
==21014==    still reachable: 4,254,665,119 bytes in 16 blocks
==21014==         suppressed: 0 bytes in 0 blocks
==21014== Reachable blocks (those to which a pointer was found) are not shown.
==21014== To see them, rerun with: --leak-check=full --show-reachable=yes
==21014==
==21014== For counts of detected and suppressed errors, rerun with: -v
==21014== ERROR SUMMARY: 178 errors from 4 contexts (suppressed: 4 from 4)