Compilation on Seaborg (SP3)
From Zori Wiki
| Table of contents |
Get Organized
Make three directories in $HOME
local: This is where the libraries will be installed zori_aux: This is where the libraries will be compiled zori: This is where zori will be compiled
Download the required libraries (http://www.zori-code.com/wiki/index.php/Compilation_Instructions#Requirements) and save them in zori_aux. Seaborg limits the number of files you can own, so don't unpack the tar balls until you're ready to compile... and tar each one back up as soon as you're done with it.
Compile the Libraries
gettext
First, run configure
CC="xlc -q64" CXXFLAGS="-q64" \ AR="ar -X 64" NM="nm -B -X 64" RANLIB="ranlib -X 64" \ ./configure --prefix=$HOME/local
The configure script does not put the -q64 flag in all the appropriate places. You'll need to change "xlC_r" to "xlC_r -q64" in all of the libtool files. It might be worth your time to write a script (similar to this untested one) to make these changes for you.
for item in `find . -name libtool` sed -e s/xlC_r/xlC_r\ -q64/ $item >tmp; mv tmp $item
From there, make does the job without any problem
make clean make make install
pkg-config
This is pretty much the same deal as gettext
CC="xlc -q64" CXXFLAGS="-q64" \
AR="ar -X 64" NM="nm -B -X 64" RANLIB="ranlib -X 64" \
./configure --prefix=$HOME/local
Add -q64 to the libtool scripts again. I'd appreciate it if someone tested and debugged this script.
for item in `find . -name libtool` sed -e s/xlC_r/xlC_r\ -q64/ $item >tmp; mv tmp $item
The rest is done by make.
make clean make make install
popt
export PATH=$HOME/local/bin:$PATH CC="xlc -q64" CXXFLAGS="-q64" \ AR="ar -X 64" NM="nm -B -X 64" RANLIB="ranlib -X 64" \ ./configure --prefix=$HOME/local
Before running make,
- edit intl/Makefile: change AR definition to "ar -X 64"
make clean make 1>popt_make.out make install
glib-2.0
CC="xlc -q64" \ CFLAGS="-q64 -qtune=pwr3 -O3 -qstrict \ -I$HOME/local_xlc/include -L$HOME/local_xlc/lib" \ CXXFLAGS="-q64" AR="ar -X 64" NM="nm -B -X 64" RANLIB="ranlib -X 64" \ ./configure --prefix=$HOME/local_xlc
make clean make
- Before make install, change glib/gutils.h:
#define G_INLINE_FUNC static
libxml2
libxml2 compiles out of the box without any problems that I've noticed.
CC="xlc -q64" \ CFLAGS="-q64 -qtune=pwr3 -O3 -qstrict \ -I$HOME/local_xlc/include -L$HOME/local_xlc/lib" \ CXXFLAGS="-q64" AR="ar -X 64" NM="nm -B -X 64" RANLIB="ranlib -X 64" \ ./configure --prefix=$HOME/local_xlc
make make install
gsl
CC="xlc -q64 -qtune=pwr3 -O3 -qstrict" \ AR="ar -X 64" NM="nm -B -X 64" RANLIB="ranlib -X 64" \ ./configure --prefix=$HOME/local_xlc
make clean make make install
OPT++
In config/mt-aix:
- add the -q64 flag to CC CXX and LD
- set AR = ar -ruX 64
./configure make ln -s lib/libopt-aix.a lib/libopt.a ln -s lib/libnewmat-aix.a lib/libnewmat.a
Compile Zori
Start by setting up your environment.
module load gnu module load hdf5_par_64 export PATH=$HOME/local_xlc/bin:$PATH export ACLOCAL_FLAGS="-I $HOME/local_xlc/share/aclocal" aclocal $ACLOCAL_FLAGS
Now it is okay to configure:
CC="mpcc -q64 -qcpluscmt -I$HOME/local_xlc/include -L$HOME/local_xlc/lib $HDF5" \ CXX="mpCC -q64 -qcpluscmt -I$HOME/local_xlc/include -L$HOME/local_xlc/lib $HDF5" \ ./autogen.sh --enable-optpp21
Several files need to be modified before the compilaton begins:
- config.h:
comment out the definition of HAVE_INLINE (there may be two or more instances)
- src/Makefile:
remove all -W and -f flags change "-O1" to "-O3 -qstrict -qtune=pwr3" remove instances of -DHAVE_INLINE change GSL_FLAGS from "-lessl" to "-lgsl -lessl -lm"
There are also a couple of neccessary changes to the zori source that I'll check-in soon.
cd src make
Hooray!

