Skip to content

Commit

Permalink
Merge pull request #505 from NOAA-EPIC/feature/macos
Browse files Browse the repository at this point in the history
Feature/macos
  • Loading branch information
natalie-perlin authored Nov 11, 2022
2 parents c680449 + 9f144bf commit 42db447
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 59 deletions.
24 changes: 13 additions & 11 deletions config/config_mac_gnu.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/bash

# Use Lmod for modules definition
source /usr/local/opt/lmod/init/profile
LMOD=$(brew --prefix lmod)
source $LMOD/init/profile

# Compiler/MPI combination
export HPC_COMPILER="gnu/11.2.0_3"
export HPC_MPI="mpich/3.3.2"
export HPC_PYTHON="python/3.9.11"
export HPC_COMPILER="gnu/11.3.0"
export HPC_MPI="openmpi/4.1.2"
export HPC_PYTHON="python/3.9.13"

# Build options
export USE_SUDO=N
Expand All @@ -19,17 +20,18 @@ export MAKE_VERBOSE=Y
export MAKE_CLEAN=N
export DOWNLOAD_ONLY=N
export STACK_EXIT_ON_FAIL=Y
export WGET="wget -nv --no-check-certificate "
export WGET="wget -nv "

# gfortran-10 needs the following
export STACK_FFLAGS="-fallow-argument-mismatch -fallow-invalid-boz"
export STACK_CXXFLAGS="-march=native"

export CC=/usr/local/bin/gcc
export FC=/usr/local/bin/gfortran
export CXX=/usr/local/bin/g++
BREW=$(brew --prefix)

export SERIAL_CC=/usr/local/bin/gcc
export SERIAL_FC=/usr/local/bin/gfortran
export SERIAL_CXX=/usr/local/bin/g++
export CC=$BREW/bin/gcc
export FC=$BREW/bin/gfortran
export CXX=$BREW/bin/g++

export SERIAL_CC=$BREW/bin/gcc
export SERIAL_FC=$BREW/bin/gfortran
export SERIAL_CXX=$BREW/bin/g++
24 changes: 14 additions & 10 deletions config/config_mac_m1_gnu.sh → config/config_macos_gnu.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/bash

# Use Lmod for modules definition
source /opt/homebrew/opt/lmod/init/profile
LMOD=$(brew --prefix lmod)
source $LMOD/init/profile

# Compiler/MPI combination
export HPC_COMPILER="gnu/11.2.0_3"
export HPC_COMPILER="gnu/11.3.0"
export HPC_MPI="openmpi/4.1.2"
export HPC_PYTHON="python/3.10.2"
export HPC_PYTHON="python/3.9.13"

# Build options
export USE_SUDO=N
Expand All @@ -19,17 +20,20 @@ export MAKE_VERBOSE=Y
export MAKE_CLEAN=N
export DOWNLOAD_ONLY=N
export STACK_EXIT_ON_FAIL=Y
export WGET="wget -nv --no-check-certificate "
export WGET="wget -nv "

#
# gfortran-10 needs the following
export STACK_FFLAGS="-fallow-argument-mismatch -fallow-invalid-boz"
export STACK_CXXFLAGS="-march=native"

export CC=/opt/homebrew/bin/gcc
export FC=/opt/homebrew/bin/gfortran
export CXX=/opt/homebrew/bin/g++
BREW=$(brew --prefix)

export SERIAL_CC=/opt/homebrew/bin/gcc
export SERIAL_FC=/opt/homebrew/bin/gfortran
export SERIAL_CXX=/opt/homebrew/bin/g++
export CC=$BREW/bin/gcc
export FC=$BREW/bin/gfortran
export CXX=$BREW/bin/g++

export SERIAL_CC=$BREW/bin/gcc
export SERIAL_FC=$BREW/bin/gfortran
export SERIAL_CXX=$BREW/bin/g++

8 changes: 8 additions & 0 deletions libs/build_libpng.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ URL="https://github.com/glennrp/libpng"
[[ ${DOWNLOAD_ONLY} =~ [yYtT] ]] && exit 0
[[ -d $software ]] && cd $software || ( echo "$software does not exist, ABORT!"; exit 1 )
sourceDir=$PWD

host=$(uname -s)
arch=$(uname -m)

if [[ $host == "Darwin" ]] && [[ $arch == "arm64" ]]; then
sed -i -e '/set(PNGLIB_VERSION*/a\'$'\n''set(PNG_ARM_NEON off CACHE INTERNAL "")'$'\n' ./CMakeLists.txt
fi

[[ -d build ]] && rm -rf build
mkdir -p build && cd build

Expand Down
56 changes: 36 additions & 20 deletions stack/stack_mac_gnu.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
gnu:
build: NO
version: 11.2.0_3
build: YES
version: 11.3.0

mpi:
build: YES
flavor: mpich
version: 3.3.2
flavor: openmpi
version: 4.1.2

cmake:
build: NO
Expand All @@ -21,7 +21,7 @@ zlib:
version: 1.2.11

libpng:
build: NO
build: YES
version: 1.6.37

szip:
Expand Down Expand Up @@ -55,11 +55,10 @@ netcdf:
version_c: 4.7.4
version_f: 4.5.4
version_cxx: 4.3.1
disable_cxx: YES

nccmp:
build: YES
version: 1.8.9.0
version: 1.9.1.0

nco:
build: YES
Expand All @@ -77,15 +76,15 @@ pio:

esmf:
build: YES
version: ESMF_8_2_0
install_as: 8.2.0
version: v8.3.0b09
install_as: 8.3.0b09
shared: YES
enable_pnetcdf: NO
debug: NO

fms:
build: YES
version: 2021.04
version: 2022.01
repo: noaa-gfdl
cmake_opts: "-DGFS_PHYS=ON -D64BIT=ON -DENABLE_QUAD_PRECISION=OFF "

Expand Down Expand Up @@ -204,8 +203,8 @@ wrf_io:

bufr:
build: YES
version: bufr_v11.5.0
install_as: 11.5.0
version: bufr_v11.7.0
install_as: 11.7.0
python: YES
is_nceplib: YES

Expand All @@ -231,8 +230,8 @@ grib_util:

ncio:
build: YES
version: v1.0.0
install_as: 1.0.0
version: v1.1.2
install_as: 1.1.2
is_nceplib: YES

ncdiag:
Expand All @@ -242,14 +241,18 @@ ncdiag:
is_nceplib: YES

boost:
build: YES
build: NO
version: 1.68.0
level: headers-only

eigen:
build: YES
version: 3.3.7

gsl:
build: YES
version: 2.7.1

gsl_lite:
build: YES
version: 0.37.0
Expand Down Expand Up @@ -305,6 +308,7 @@ atlas:
madis:
build: YES
version: 4.3
STACK_madis_FFLAGS=" -fallow-argument-mismatch -fallow-invalid-boz"

esma_cmake:
build: YES
Expand All @@ -319,7 +323,7 @@ cmakemodules:
gftl_shared:
build: YES
repo: Goddard-Fortran-Ecosystem
version: v1.3.6
version: v1.5.0

yafyaml:
build: YES
Expand All @@ -329,25 +333,37 @@ yafyaml:
mapl:
build: YES
repo: GEOS-ESM
version: v2.12.2
version: v2.22.0
esmf_version: 8.3.0b09

geos:
build: YES
build: NO
version: 3.8.1

libtiff:
build: YES
build: NO
version: 4.0.3

sqlite:
build: YES
build: NO
version: 3.32.3

proj:
build: YES
version: 7.1.0
cmake_opts: "-DENABLE_CURL=OFF -DBUILD_PROJSYNC=OFF"

met:
build: YES
repo: DTCenter
release_date: 20220516
version: 10.1.2

metplus:
build: YES
repo: DTCenter
version: 4.1.3

miniconda3:
build: NO
version: 4.6.14
Expand Down
Loading

0 comments on commit 42db447

Please sign in to comment.