This page describes how to compile your own Gadget and libraries at CHPC. Before doing anything it is recommended that you create an installation directory (e.g installations) on your /export/home/username/ directory. This will help you avoid any super user conflicts. For the rest of this walkthrough I will refer to /export/home/username/installations/ as PATHINSTALL.
. /etc/profile.d/modules.sh module load sunstudio module load clustertools
These lines will help you to load openmpi and other tools that are required to compile and run Gadget. It is also recommended to add them to your job script.
Note that only FFTW-2.xx can be used because version 3.xx does not work with Gadget2.
First build SZIP by following these steps
After building SZIP build HDF5 by following these steps
Note that you need to use HDF5 version 1.6.x to avoid the latest changes in the HDF5 API.
ifeq ($(SYSTYPE),"CHPC") CC = mpicc OPTIMIZE = -O3 GSL_INCL = -I/PATHINSTALL/include GSL_LIBS = -L/PATHINSTALL/lib -Wl,"-R /PATHINSTALL/lib" FFTW_INCL= -I/PATHINSTALL/include FFTW_LIBS= -L/PATHINSTALL/lib MPICHLIB = HDF5INCL = -I/PATHINSTALL/include HDF5LIB = -L/PATHINSTALL/lib -lhdf5 endif
GADGET is now compiled and you can test it by using one of the examples that come with Gadget download. You can also download a pdf version of this walkthrough here