# C compiler and options for fgetwtod.c
CC="gcc"
CFLAGS="-O"

# Fortran compiler and options
FRTC="gfortran"
FRTFLAGS="-O3 -fopenmp -I../share"
FRTVERS="--version"

# MPI Fortran compiler and options
MPIC="mpif90"
MPIFLAGS="-O3 -fopenmp -I../share"

# Preprocessor, HPF and backend MPI Fortran compiler and options
PP="cpp"
PFLAGS="-P -I../share"
HPFC="fhpf"
HPFFLAGS="-Free -Am"
HPFVERS=""
BACKC="mpif90"
BACKFLAGS="-O3 -fopenmp"

# XMP compiler and options
XMPC="xmpf90"
XMPFLAGS="-O3 -I../share --Wf-fopenmp --Wn-fopenmp"
XMPVERS="--version"

# Archiver and its options for library
AR="ar"
ARFLAG="-rc"

# Ranlib and its options for library
RANLIB="ar"
RANLIBFLAG="-ts"

# simulation parameters
LSTEP=10
LX=128
LY=128
LZ=128

# number of processes
LN1Z="1 2"

LN2Y="1 2"
LN2Z="1 2"

LN3X="1 2"
LN3Y="1 2"
LN3Z="1 2"

# if you want to change system size for weak scaling,
# you can override values as follows.
#LN1Z="1 2 4 8"
#LZ1="16 32 64 128"

#LN2Y="1 2 2"
#LY2="64 128 128"
#LN2Z="1 2 4"
#LZ2="32 64 128"

#LN3X="1 2"
#LX3="64 128"
#LN3Y="1 2"
#LY3="64 128"
#LN3Z="1 2"
#LZ3="64 128"

# pre/post command in execution scripts
# These commands will be executed under "sh", not "csh".
# PREEXEC="export FLIB_CNTL_BARRIER_ERR=FALSE"
# POSTEXEC="echo The script ended | mail -s Benchmark sakagami"
PREEXEC="export OMP_NUM_THREADS=2"

# command for execution
# %PR in RUNCOM will be replaced with number of processes
# %CN in RUNCOM will be replaced with the code name.
RUNCOM="mpirun"

# script is invoked as
#
#  ${PRERUN}
#  ${RUNCOM} ${RUNOPT1} loadmodule ${RUNOPT2}
#  ${POSTRUN}
#
# %PR in RUNOPT[12] will be replaced with number of processes
# %CN in RUNOPT[12] will be replaced with the code name.
# %PR in {PRE,POST}RUN will be replaced with number of processes
# %CN in {PRE,POST}RUN will be replaced with the code name.
# Pre/post commands will be executed under "sh", not "csh".
#
# PRERUN="echo %PR in %CN"
RUNOPT1="-np %PR"
RUNOPT2="< /dev/null >> ./results/%CN-%PR.list 2> ./results/%CN-%PR.err"
POSTRUN="sleep 5"

