Skip to content

Commit

Permalink
Creating standalone CMake build system for hafs-community/gfdl-tracker (
Browse files Browse the repository at this point in the history
hafs-community#85)

* Creating standalone CMake build system for hafs-community/gfdl-tracker
  • Loading branch information
BijuThomas-NOAA authored Aug 18, 2021
1 parent 79f611d commit 2369116
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 48 deletions.
49 changes: 2 additions & 47 deletions sorc/build_vortextracker.sh
Original file line number Diff line number Diff line change
@@ -1,52 +1,7 @@
#!/bin/sh
set -eux
source ./machine-setup.sh > /dev/null 2>&1
cwd=`pwd`

module use ../modulefiles
module load modulefile.hafs.$target
module list

if [ $target = hera ]; then
export FC=ifort
export F90=ifort
export CC=icc
elif [ $target = orion ]; then
export FC=ifort
export F90=ifort
export CC=icc
elif [ $target = jet ]; then
export FC=ifort
export F90=ifort
export CC=icc
elif [ $target = wcoss_cray ]; then
export FC=ftn
export F90=ftn
export CC=icc
elif [ $target = wcoss_dell_p3 ]; then
export FC=ifort
export F90=ifort
export CC=icc
else
echo "Unknown machine = $target"
exit 1
fi

cd hafs_vortextracker.fd
if [ -d "build" ]; then
rm -rf build
fi
mkdir build
cd build

if [ $target = wcoss_cray ]; then
cmake .. -DCMAKE_Fortran_COMPILER=ftn -DCMAKE_C_COMPILER=cc
else
cmake .. -DCMAKE_Fortran_COMPILER=ifort -DCMAKE_C_COMPILER=icc
fi
make -j 8 VERBOSE=1
make install

cd ../
cd hafs_vortextracker.fd/src
./build_all_cmake.sh

exit

0 comments on commit 2369116

Please sign in to comment.