Quick instructions:
HAD uses environment variables to control compiling. A quick example [using cshrc shell]
for compiling HAD:
setenv MPIHOME /usr/local/mpich/intel
setenv LSV
setenv IMPI "-I$MPIHOME/include"
setenv LMPI "-L$MPIHOME/lib"
setenv MPIF90 $MPIHOME/bin/mpif90
setenv CC $MPIHOME/bin/mpicc
setenv F90FLAGS "-g"
setenv CCFLAGS "-g"
setenv F90_FREEFORM_FLAG -FR
setenv F90_FIXEDFORM_FLAG -FI
setenv LOCALIB "-L/usr/local/lib"
setenv LOCALINCLUDE "-I/usr/local/include"
make
The environments would typically be placed in a local file .ENV_local which is sourced prior to invoking make.
Examples:
Supermike: Using INTEL compilers and MPICH:
setenv CC mpicc
setenv LSV -lsv
setenv IMPI "-I$MPIHOME/include -I/ibm_shark/home1/matt/rnpl-lib/include"
setenv LMPI "-L$MPIHOME/lib -lmpich"
setenv MPIF90 "$MPIHOME/bin/mpif90 "
setenv LOCALIB "-L/ibm_shark/home1/matt/rnpl-lib/lib"
setenv F90FLAGS "-O3 -w90 -w95 "
setenv CCFLAGS -O3
setenv F90_FREEFORM_FLAG -FR
setenv F90_FIXEDFORM_FLAG -FI
setenv CCTK_C_PTR_TYPE integer4
Bluedawg: AIX using xlf/xlc compilers and vendor MPI
setenv CC mpcc
setenv LSV
setenv MPIF90 mpxlf
setenv LOCALIB -L/mnt/home/matt/rnpl/lib
setenv F90FLAGS "-g -q64"
setenv MACRO "-DAIX"
setenv CCFLAGS "-g -q64 $MACRO -qcpluscmt -I/mnt/home/matt/rnpl/include/"
setenv F90SUFFIX "-qsuffix=f=F90"
setenv CPPFORTSUFFIX "F"
setenv CPPMACRO "-WF"
setenv F90_FREEFORM_FLAG -qfree
setenv F90_FIXEDFORM_FLAG -qfixed
setenv CCTK_C_PTR_TYPE integer8
setenv MODULE_INC_DIR "-qmoddir="
setenv OBJECT_MODE 64
setenv HSCRIPT "hsetup3"
Mudwasp: Mac Intel using gcc/gfortran compilers and MPICH
export MPIHOME="/opt/mpich2.gnu"
export LSV=""
export IMPI="-I$MPIHOME/include"
export LMPI="-L$MPIHOME/lib -lmpich"
export MPIF90="mpif90
export CC="mpicc"
export LOCALIB="-L/usr/local/GNU/lib"
export LOCALINCLUDE="-I/usr/local/GNU/include"
export F90FLAGS="-g -fno-second-underscore"
export CCFLAGS="-g"
export F90_FREEFORM_FLAG="-ffree-form"
export F90_FIXEDFORM_FLAG="-ffixed-form"
export MODULE_INC_DIR="-J"
export EQS="hyperMHD"
export EXECNAME="ff"
Detailed instructions:
- Download and compile the rnpl libraries: rnpletal.tar.gz
- Precompiled versions of the rnpl libraries, DataVault visualization tool, and xvs visualization tool can be found here.
- In the directory you wish HAD installed: tar -zxf had.tar.gz
- cd had
- Set the appropriate environments for compiling HAD:
LSV -- on some systems, the bbhutil library ( part of rnpl ) links to the sv library if installed. If sv is not installed, set this to blank. Otherwise, set to "-lsv".
IMPI -- The location of the MPI headers.
LMPI -- The location of the MPI libraries and the name of the MPI library. For MPICH, this is generally "-lmpich".
MPIF77 -- The name of the MPI wrapper for F77.
MPIF90 -- The name of the MPI wrapper for F90.
CC -- The name of the C compiler.
F90FLAGS -- F90 compiler flags
CCFLAGS -- C compiler flags
LOCALLIB -- The location of any libraries needed by the application, including bbhutil.
LOCALINCLUDE -- The location of any header files needed by the application, including bbhutil.h.
F90_FREEFORM_FLAG -- The F90 flag indicating freeform source code.
F90_FIXEDFORM_FLAG -- The F90 flag indicating fixedform source code.
MODULE_INC_DIR -- The F90 module flag [default: "-module"]
CPPFORTSUFFIX -- fortran suffix indicating C preprocessor is needed [default: "f"]
HSCRIPT -- Indicate the script in had/sbin
for parsing setup files. [default: "hsetup2"]
F90SUFFIX -- file suffix indicating fixed form F90 source code
EQS -- The desired application for compiling. This should match the name of the application code found in the "had/src" directory. The default is hyperCurvedWave.
EXECNAME -- The executable name. The default is hcw.
CCTK_C_PTR_TYPE -- This only affects code which mix C and Fortran. The C pointer type varies by architecture. The default is "integer4". For 64-bit architectures, this should be set to "integer8".
CCTK_F77_QUAD_TYPE -- The default is real*8. However, for routines supporting quadruple precision (real*16), if CCTK_F77_QUAD_TYPE is set to be "real16", real*16 will be in those routines.
- Ensure that the "had/sbin" is in your PATH. ( The makefile needs to execute the hsetup scripts ).
- Modify "include/mem.inc" to indicate the size of the local memory arena you wish for the HAD installation. Default is 721 MB.
- make
- Encounter problems?
- Read the error message
- If you get the message 'mv: cannot stat `mask.f90.o': No such file or directory'
your compiler environments were not set properly.
- If you get the message 'cannot find hsetup2', add had/sbin to your path.
- Check the FAQ.
- Send an email to a HAD developer..