wiki:CompilingOnRice

Version 33 (modified by trac, 12 years ago) ( diff )

Compiling AstroBEAR and its Dependencies on the Rice RTC cluster

NOTE: The information on this page was last updated in August, 2007. I am fairly certain that their systems have changed since then. This page needs the attention of someone who knows what's going on. --KY

As of revision 175, AstroBEAR links to the hdf4, hdf5, and pgplot libraries. These must be compiled using the same compiler used for compiling AstroBEAR. An installation of hdf5 does exist in /opt/apps on rtc, but it is not fortran enabled, and there are no installations of hdf4 or pgplot. We could ask tech support to install what we need in /opt/apps, but alternatively one may install these libraries locally as described below.

Module Loading

To use the intel compiler and myrinet, execute the following module commands (you may want to add these to your .bashrc file):

module load intel/9.1
module load mpich-gm

Installing the Libraries

create a local directory:

cd
mkdir local

obtain the following gzipped tar archives and place them in /users/[home dir]/local:

hdf5: hdf-1.6.5.tar.gz
hdf4: HDF4.2r1.tar.gz
pgplot: pgplot5.2.tar.gz

move to local directory and extract the archives:

tar xzvf [archivename].tar.gz

Create installation directories for the hdf4 and hdf5 libraries:

mkdir hdf4 hdf5

install hdf5:

mkdir hdf5

Make your current directory the hdf5 source directory:

cd ~/local/hdf5-1.6.5

Run the configure script with prefix set to the hdf5 installation directory and enabling fortran:

./configure -prefix=/users/[home dir]/local/hdf5 -enable-fortran

To ensure that compiler variables are assigned properly define the following enviroment variables:

export FC=ifort
export F77=ifort
export F9X=ifort
export CXX=icpc
export CXXCPP="icpc -E"
export CC=icc
export CPP="icc -E"

run make install

make install

If you like you may now discard the source directory:

cd ~/local
rm -rf hdf5-1.6.5

install pgplot

Make your current directory the pgplot installation directory:

cd ~/local/pgplot

Open the file "drivers.list" in an editor and uncomment the entries for the drivers PS, VPS, CPS, and VCPS

Run the "makemake" script as follows:

./makemake /users/[home dir]/local/pgplot linux g77_gcc

Open the resulting makefile in an editor and make the following changes to the variables "FCOMPL" and "CCOMPL":

FCOMPL=ifort
CCOMPL=icc

Define the environment variable PGPLOT_DIR as follows:

export PGPLOT_DIR=/users/[home dir]/local/pgplot

run make

make

Modifying Makefile.inc in the bearclaw directory

If you haven't already done so unpack a bearclaw archive into your home directory:

cd
tar xzvf bearclaw.tar.gz

cd to the bearclaw directory and edit Makefile.inc as follows:

Copy Makefile.nova.inc to Makefile.inc

cp Makefile.nova.inc Makefile.inc

Open Makefile.inc in an editor and edit it as follows:

Under "Intel Fortran Compiler" redefine LINKER as follows:

LINKER=ifort

Under "Intel Optimization" redefine FFLAGS as follows:

FFLAGS = -O3 -tpp2 -fpp

Alter the path names in the definition of "HDFLIBS" to include the following paths (NOTE: do NOT alter the "-l" options)

-L/users/[home dir]/local/hdf4/lib
-L/users/[home dir]/local/hdf5/lib
-L/users/[home dir]/local/pgplot

Next, set HDFINC to:

HDFINC=\
-I/users/[home dir]/local/hdf4/include \
-I/users/[home dir]/local/hdf5/lib

Compile AstroBEAR

It should now be possible to compile AstroBEAR without incident:

cd ~/bearclaw/contrib/astro
make xbear
make mpibear

Note: See TracWiki for help on using the wiki.