Skip to content

Commit

Permalink
Update conda_macos to fix problems with Github Actions testing (CICE-…
Browse files Browse the repository at this point in the history
…Consortium#853)

* test ghactions

* update master to main in github actions
  • Loading branch information
apcraig committed Aug 10, 2023
1 parent 4cb296c commit 7e8dc5b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 12 deletions.
43 changes: 35 additions & 8 deletions .github/workflows/test-cice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: GHActions
on:
push:
branches:
- master
- main
- 'CICE*'
- 'ghactions*'
pull_request:
Expand All @@ -27,8 +27,12 @@ jobs:
matrix:
# os: [macos-latest, ubuntu-latest]
os: [macos-latest]
# os: [macos-13]
# os: [ubuntu-latest]
include:
# - os: macos-13
# envdef: macos
# minicond: Miniconda3-latest-MacOSX-x86_64.sh
- os: macos-latest
envdef: macos
minicond: Miniconda3-latest-MacOSX-x86_64.sh
Expand Down Expand Up @@ -98,10 +102,26 @@ jobs:
conda env create -f configuration/scripts/machines/environment.yml
- name: check conda env
run: |
conda activate cice && which mpicc && which mpifort && which make
conda activate cice && which clang && which gfortran && which mpicc && which mpifort && which make
clang --version
gfortran --version
mpifort --version
mpicc --version
make --version
# echo "mpifort -v:"
# mpifort -v
# echo "mpifort --showme:compile:"
# mpifort --showme:compile
# echo "mpifort --showme:link:"
# mpifort --showme:link
# echo "mpifort --showme:command:"
# mpifort --showme:command
# echo "mpifort --showme:libdirs:"
# mpifort --showme:libdirs
# echo "mpifort --showme:libs:"
# mpifort --showme:libs
# echo "mpifort --showme:incdirs:"
# mpifort --showme:incdirs
- name: check setup case
run: |
cd $HOME/cice
Expand All @@ -110,12 +130,19 @@ jobs:
run: |
cd $HOME/cice
./cice.setup -m conda -e ${{ matrix.envdef }} --test smoke --testid c0
# - name: compile case
# run: |
# cd $HOME/cice
# ./cice.setup -m conda -e ${{ matrix.envdef }} -c case1
# cd case1
# ./cice.build
- name: run hello world unit test
run: |
cd $HOME/cice
./cice.setup -m conda -e ${{ matrix.envdef }} --test unittest --pes 2x1 -s helloworld --testid hw01
cd *helloworld*hw01
./cice.build
./cice.run
- name: check cice compile
run: |
cd $HOME/cice
./cice.setup -m conda -e ${{ matrix.envdef }} -c case1 --pes 2x2 -s diag1
cd case1
./cice.build
- name: download input data
run: |
cd $HOME/cice-dirs/input
Expand Down
10 changes: 6 additions & 4 deletions configuration/scripts/machines/Macros.conda_macos
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ endif
# C and Fortran compilers and MPI wrappers
SCC := clang
SFC := gfortran
MPICC := mpicc
MPIFC := mpifort
#MPICC := mpicc
#MPIFC := mpifort
MPICC := clang
MPIFC := gfortran

ifeq ($(ICE_COMMDIR), mpi)
FC := $(MPIFC)
Expand All @@ -37,7 +39,7 @@ endif
LD:= $(FC)

# Location of the compiled Fortran modules (NetCDF)
MODDIR += -I$(CONDA_PREFIX)/include
MODDIR += -I$(CONDA_PREFIX)/include -I$(CONDA_PREFIX)/lib

# Location of the system C header files (required on recent macOS to compile makdep)
SDKPATH = $(shell xcrun --show-sdk-path)
Expand All @@ -49,7 +51,7 @@ else
endif

# Libraries to be passed to the linker
SLIBS := -L$(CONDA_PREFIX)/lib -lnetcdf -lnetcdff -llapack
SLIBS := -L$(CONDA_PREFIX)/lib -lnetcdf -lnetcdff -llapack -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi

# Necessary flag to compile with OpenMP support
ifeq ($(ICE_THREADED), true)
Expand Down

0 comments on commit 7e8dc5b

Please sign in to comment.