Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

porting to habanero #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
compile/build/
compile/source/tools/cyrus-imapd-makedepend/Makefile
compile/source/tools/cyrus-imapd-makedepend/Makefile.bak
compile/source/tools/cyrus-imapd-makedepend/config.cache
compile/source/tools/cyrus-imapd-makedepend/config.log
compile/source/tools/cyrus-imapd-makedepend/config.status
compile/source/tools/cyrus-imapd-makedepend/cppsetup.o
compile/source/tools/cyrus-imapd-makedepend/ifparser.o
compile/source/tools/cyrus-imapd-makedepend/include.o
compile/source/tools/cyrus-imapd-makedepend/main.o
compile/source/tools/cyrus-imapd-makedepend/makedepend
compile/source/tools/cyrus-imapd-makedepend/parse.o
compile/source/tools/cyrus-imapd-makedepend/pr.o
28 changes: 28 additions & 0 deletions compile/build_MITgcm.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
# --------------------------------------------------------------------------
# this script build MITgcm for 1D BATS model
# this only works on habanero for now
# --------------------------------------------------------------------------
set -o errexit
set -o nounset
# set -o xtrace

###-------------------- habanero (Columbia Univ) --------------------------------------
module load intel-parallel-studio/2017
module load netcdf-fortran/4.4.4
module load netcdf/gcc/64/4.4.0

# set paths relative to $(pwd)/build
MODS='../modify/1d_ballast_model'
OPTFILE='../tools/build_options/linux_ia64_ifort_habanero'
ROOTDIR='../source'
GENMAKE='../tools/genmake2'

if [ ! -d build ] ; then mkdir build ; fi
cd build

# GENERATE MAKE FILE
${GENMAKE} -mods=${MODS} -optfile=${OPTFILE} -rootdir=${ROOTDIR}

make depend
make -j 4
48 changes: 48 additions & 0 deletions compile/tools/build_options/linux_ia64_ifort_habanero
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash
#
# Tested on uv100.awi.de (SGI UV 100, details:
# http://www.sgi.com/products/servers/uv/specs.html)
# a) For more speed, provided your data size does not exceed 2GB you can
# remove -fPIC which carries a performance penalty of 2-6%.
# b) You can replace -fPIC with '-mcmodel=medium -shared-intel' which may
# perform faster than -fPIC and still support data sizes over 2GB per
# process but all the libraries you link to must be compiled with
# -fPIC or -mcmodel=medium
# c) flags adjusted for ifort 12.1.0

if test "x$MPI" = xtrue ; then
CC=mpiicc
FC=mpiifort
F90C=mpiifort
else
CC=icc
FC=ifort
F90C=ifort
fi

CPP='/lib/cpp -traditional -P'
EXTENDED_SRC_FLAG='-132'

DEFINES='-DWORDLENGTH=4'
LIBS="$(nf-config --flibs)"
INCLUDES="$(nf-config --fflags)"
INCLUDEDIRS="$(nf-config --includedir)"

if test "x$MPI" = xtrue ; then
DEFINES+=' -DALLOW_USE_MPI -DALWAYS_USE_MPI'
LIBS+=" -L$I_MPI_ROOT/lib64 -lmpi"
INCLUDES+=" -I$I_MPI_ROOT/include64"
INCLUDEDIRS+=" $I_MPI_ROOT/include64"
fi

if test "x$IEEE" = x ; then
# No need for IEEE-754
FFLAGS="$FFLAGS -WB -convert big_endian -assume byterecl -mcmodel=medium -shared-intel"
FOPTIM='-O3 -align -march=corei7 -axAVX'
NOOPTFLAGS='-O1'
NOOPTFILES='calc_oce_mxlayer.F fizhi_lsm.F fizhi_clockstuff.F'
else
# Try to follow IEEE-754
FFLAGS="$FFLAGS -W0 -WB -convert big_endian -assume byterecl -mcmodel=medium -shared-intel"
FOPTIM='-O0 -noalign'
fi
18 changes: 18 additions & 0 deletions running/scripts/run_1d_MITgcm_habanero.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh
#
#SBATCH --account=ocp # The account name for the job.
#SBATCH --job-name=1d # The job name.
##SBATCH -N 1 # The number of nodes to use.
##SBATCH --exclusive
#SBATCH -c 1 # The number of cpu cores to use.
#SBATCH --time=4:59:00 # The time the job will take to run
#SBATCH --mem-per-cpu=1gb # The memory the job will use per cpu core.

module load intel-parallel-studio/2017
module load netcdf-fortran/4.4.4
module load netcdf/gcc/64/4.4.0

date
./mitgcmuv
date