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

Added functionality for MacOS X #242

Merged
merged 6 commits into from
Apr 27, 2022
Merged
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
23 changes: 0 additions & 23 deletions env/build_macos_gccgfortran.env

This file was deleted.

85 changes: 85 additions & 0 deletions env/build_macos_gnu.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Setup instructions for macOS Big Sur (Darwin20)
# Compilers: gcc-11.2.0 including gfortran-11.2.0
# MPI: openmpi/4.2.1
# Option 1 (default) : M1 chip, arm64, running natively (not using Rosetta)
# Option 2 (uncomment if needed) Intel chip, x86_64
#
# Option 1 (default):
export BASH_ENV=/opt/homebrew/opt/lmod/init/bash
# Option 2 (uncomment if needed):
#export BASH_ENV=/usr/local/opt/lmod/init/bash
source $BASH_ENV

# This path should point to your HPCstack installation directory
export HPCstack=/Users/username/hpc-stack/install

# This path should point to your SRW Application directory
export SRW=/Users/username/ufs-srweather-app

module purge
# Load HPC stack
module use ${HPCstack}/modulefiles/stack
module load hpc
module load hpc-python
#
module load hpc-gnu
module load openmpi
module load hpc-openmpi

module use ${SRW}/env
#module load srw_common
module load jasper/2.0.25
module load zlib/1.2.11

module load hdf5/1.10.6
module load netcdf/4.7.4
module load pio/2.5.3
module load esmf/8_2_0
module load fms/2021.04

module load bacio/2.4.1
module load crtm/2.3.0
module load g2/3.4.5
module load g2tmpl/1.10.0
module load ip/3.3.3
module load sp/2.3.3
module load w3nco/2.4.1
module load upp/10.0.10

module load gftl-shared/v1.3.6
module load yafyaml/v0.5.1
module load mapl/2.12.2-esmf-8_2_0
module load gfsio/1.4.1
module load landsfcutil/2.4.1
module load nemsio/2.5.4
module load nemsiogfs/2.5.3
module load sfcio/1.4.1
module load sigio/2.3.2
module load w3emc/2.9.2
module load wgrib2/2.0.8
module list

# Option 1 compiler paths:
export CC=/opt/homebrew/bin/gcc
export FC=/opt/homebrew/bin/gfortran
export CXX=/opt/homebrew/bin/g++

# Option 2 compiler paths:
#export CC=/usr/local/bin/gcc
#export FC=/usr/local/bin/gfortran
#export CXX=/usr/local/bin/g++

ulimit -S -s unlimited

export MPI_CC=mpicc
export MPI_CXX=mpicxx
export MPI_FC=mpif90

export CMAKE_C_COMPILER=${MPI_CC}
export CMAKE_CXX_COMPILER=${MPI_CXX}
export CMAKE_Fortran_COMPILER=${MPI_FC}
export CMAKE_Platform=macos.gnu

export CMAKE_Fortran_COMPILER_ID="GNU"
export LDFLAGS="-L${MPI_ROOT}/lib"
export FFLAGS="-DNO_QUAD_PRECISION -fallow-argument-mismatch "
18 changes: 18 additions & 0 deletions env/wflow_macos.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Prepare environment for generating and running SRW workflow
# (wflow_macos.env)

export CMAKE_Platform=macos

# This path should point to your python virtual environment directory,
# `regional_workflow`, created earlier for
#
export VENV=/Users/username/venv/regional_workflow
source $VENV/bin/activate

# Uncomment if Rocoto workflow manager is used
# This path should point to your Rocoto module location
# ROCOTOmod=/Users/username/modules
# module use ${ROCOTOmod}
# module load rocoto
# module list