Skip to content

Commit 0907848

Browse files
Merge branch 'main' of github.com:ISSMteam/ISSM
2 parents caad0b5 + 3cb91ea commit 0907848

37 files changed

+155
-42
lines changed

.github/workflows/common-workflow.yml

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ on:
2121
additional_options:
2222
required: true
2323
type: string
24+
interface:
25+
required: true
26+
type: string
27+
python_version:
28+
required: false
29+
type: string
2430
env:
2531
ISSM_DIR: ${{ github.workspace }}
2632

@@ -38,7 +44,7 @@ jobs:
3844
uses: actions/cache@v3
3945
id: cache-externalpackages
4046
env:
41-
cache-name: cache-externalpackages-${{ inputs.build_type }}
47+
cache-name: cache-externalpackages-${{ inputs.build_type}}
4248
with:
4349
path: |
4450
${{ env.ISSM_DIR }}/externalpackages/
@@ -51,15 +57,34 @@ jobs:
5157
${{ inputs.ext_install_command }}
5258
5359
- name: Get MATLAB
60+
if: ${{inputs.interface == 'matlab'}}
5461
id: setup-matlab
5562
uses: matlab-actions/setup-matlab@v2
5663
with:
5764
release: R2023b
5865
cache: true
5966

67+
- name: Prepare python
68+
if: contains( inputs.interface, 'python')
69+
uses: actions/setup-python@v5
70+
id: setup-python
71+
with:
72+
python-version: ${{ inputs.python_version }}
73+
74+
- name: Install dependencies
75+
if: contains( inputs.interface, 'python')
76+
run: |
77+
sudo apt-get install libpython${{ inputs.python_version }}-dev
78+
sudo apt-get install python3-dev
79+
python -m pip install --upgrade pip
80+
sudo apt-get update && sudo apt-get install -y python-tk python3-tk
81+
python -m pip install numpy scipy matplotlib nose
82+
6083
- name: build ISSM
6184
run: |
6285
export MATLAB_ROOT=${{ steps.setup-matlab.outputs.matlabroot }}
86+
export PYTHON_ROOT=${{ env.pythonLocation }}
87+
export NUMPY_ROOT=${{ env.LD_LIBRARY_PATH }}/python3.11/site-packages/numpy
6388
${{ inputs.build_command}}
6489
6590
- name: Compile ISSM
@@ -99,13 +124,15 @@ jobs:
99124
shell: 'bash'
100125

101126
- name: Get MATLAB
127+
if: ${{inputs.interface == 'matlab'}}
102128
id: setup-matlab
103129
uses: matlab-actions/setup-matlab@v2
104130
with:
105131
release: R2023b
106132
cache: true
107133

108134
- name: Creating matlab_ci.m
135+
if: ${{inputs.interface == 'matlab'}}
109136
run: |
110137
cat > ${ISSM_DIR}/matlab_ci.m << EOF
111138
% Go to the test directory
@@ -122,11 +149,37 @@ jobs:
122149
cat ${ISSM_DIR}/matlab_ci.m
123150
124151
- name: Get run-matlab-command
152+
if: ${{inputs.interface == 'matlab'}}
125153
run: |
126154
wget -O /usr/local/bin/run-matlab-command https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2/glnxa64/run-matlab-command
127155
chmod +x /usr/local/bin/run-matlab-command
128156
129157
- name: Run MATLAB tests
158+
if: ${{inputs.interface == 'matlab'}}
130159
run: |
131160
source $ISSM_DIR/etc/environment.sh
132161
LD_PRELOAD=/lib/x86_64-linux-gnu/libstdc++.so.6:$ISSM_DIR/externalpackages/petsc/install/lib/libmpi.so:$ISSM_DIR/externalpackages/petsc/install/lib/libmpifort.so run-matlab-command "matlab_ci"
162+
163+
- name: Prepare python
164+
if: contains( inputs.interface, 'python')
165+
uses: actions/setup-python@v5
166+
id: setup-python
167+
with:
168+
python-version: ${{ inputs.python_version }}
169+
170+
- name: Install dependencies
171+
if: contains( inputs.interface, 'python')
172+
run: |
173+
python -m pip install --upgrade pip
174+
sudo apt-get update && sudo apt-get install -y python-tk python3-tk
175+
python -m pip install numpy scipy matplotlib nose netCDF4
176+
177+
- name: Run Python tests
178+
if: contains( inputs.interface, 'python')
179+
run: |
180+
export PYTHONPATH="${ISSM_DIR}/src/m/dev:${PYTHONPATH}"
181+
export PYTHONSTARTUP="${PYTHONPATH}/devpath.py"
182+
export PYTHONUNBUFFERED=1
183+
source $ISSM_DIR/etc/environment.sh
184+
cd $ISSM_DIR/test/NightlyRun
185+
LD_PRELOAD=/lib/x86_64-linux-gnu/libstdc++.so.6:$ISSM_DIR/externalpackages/petsc/install/lib/libmpi.so:$ISSM_DIR/externalpackages/petsc/install/lib/libmpifort.so ./runme.py --output=nightly --rank=1 --numprocs=1 --id {{matrix.test_cases}} --exclude Dakota 234 418 420

.github/workflows/ubuntu-basic.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ jobs:
1313
uses: ./.github/workflows/common-workflow.yml
1414
with:
1515
os: ubuntu-latest
16-
build_type: basic
16+
build_type: basic-matlab
17+
interface: matlab
1718
build_command: |
1819
source $ISSM_DIR/etc/environment.sh
1920
autoreconf -ivf
@@ -38,7 +39,7 @@ jobs:
3839
ext_install_command: |
3940
cd $ISSM_DIR/externalpackages/triangle && ./install-linux.sh
4041
cd $ISSM_DIR/externalpackages/m1qn3 && ./install-linux.sh
41-
cd $ISSM_DIR/externalpackages/petsc && ./install-3.21-linux.sh
42+
cd $ISSM_DIR/externalpackages/petsc && ./install-3.22-linux.sh
4243
cd $ISSM_DIR/externalpackages/semic && ./install.sh
4344
test_cases: '["101:399", "401:899"]'
4445
additional_options: " "

.github/workflows/ubuntu-codipack.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
with:
1515
os: ubuntu-latest
1616
build_type: codipack
17+
interface: matlab
1718
build_command: |
1819
source $ISSM_DIR/etc/environment.sh
1920
autoreconf -ivf
@@ -43,7 +44,7 @@ jobs:
4344
ext_install_command: |
4445
cd $ISSM_DIR/externalpackages/triangle && ./install-linux.sh
4546
cd $ISSM_DIR/externalpackages/m1qn3 && ./install-linux.sh
46-
cd $ISSM_DIR/externalpackages/petsc && ./install-3.20-linux.sh
47+
cd $ISSM_DIR/externalpackages/petsc && ./install-3.22-linux.sh
4748
cd $ISSM_DIR/externalpackages/gsl && ./install.sh
4849
cd $ISSM_DIR/externalpackages/codipack && ./install.sh
4950
cd $ISSM_DIR/externalpackages/medipack && ./install.sh
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Ubuntu Python
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
env:
9+
ISSM_DIR: ${{ github.workspace }}
10+
11+
jobs:
12+
build-test:
13+
uses: ./.github/workflows/common-workflow.yml
14+
with:
15+
os: ubuntu-latest
16+
build_type: basic-python-3.11
17+
interface: python
18+
python_version: 3.11
19+
build_command: |
20+
source $ISSM_DIR/etc/environment.sh
21+
autoreconf -ivf
22+
./configure --prefix=${ISSM_DIR} \
23+
--disable-static \
24+
--enable-development \
25+
--enable-debugging \
26+
--with-numthreads=4 \
27+
--with-python-version=3.11 \
28+
--with-python-dir=$PYTHON_ROOT \
29+
--with-python-numpy-dir=$NUMPY_ROOT \
30+
--with-fortran-lib="-L/usr/lib/x86_64-linux-gnu -lgfortran" \
31+
--with-mpi-include="${ISSM_DIR}/externalpackages/petsc/install/include" \
32+
--with-mpi-libflags="-L${ISSM_DIR}/externalpackages/petsc/install/lib -lmpi -lmpicxx -lmpifort" \
33+
--with-petsc-dir="${ISSM_DIR}/externalpackages/petsc/install" \
34+
--with-blas-lapack-dir="${ISSM_DIR}/externalpackages/petsc/install" \
35+
--with-metis-dir="${ISSM_DIR}/externalpackages/petsc/install" \
36+
--with-parmetis-dir="${ISSM_DIR}/externalpackages/petsc/install" \
37+
--with-scalapack-dir="${ISSM_DIR}/externalpackages/petsc/install" \
38+
--with-mumps-dir="${ISSM_DIR}/externalpackages/petsc/install" \
39+
--with-triangle-dir="${ISSM_DIR}/externalpackages/triangle/install" \
40+
--with-semic-dir="${ISSM_DIR}/externalpackages/semic/install" \
41+
--with-m1qn3-dir="${ISSM_DIR}/externalpackages/m1qn3/install"
42+
ext_install_command: |
43+
cd $ISSM_DIR/externalpackages/triangle && ./install-linux.sh
44+
cd $ISSM_DIR/externalpackages/m1qn3 && ./install-linux.sh
45+
cd $ISSM_DIR/externalpackages/petsc && ./install-3.22-linux.sh
46+
cd $ISSM_DIR/externalpackages/semic && ./install.sh
47+
test_cases: '["range(101,400)", "range(401, 900)"]'
48+
additional_options: " "
49+
secrets: inherit
50+
name: build-test-ubuntu-python

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Ice-sheet and Sea-level System Model - ISSM
22
[![Ubuntu Basic](https://github.com/ISSMteam/ISSM/actions/workflows/ubuntu-basic.yml/badge.svg)](https://github.com/ISSMteam/ISSM/actions/workflows/ubuntu-basic.yml)
33
[![Ubuntu CodiPack](https://github.com/ISSMteam/ISSM/actions/workflows/ubuntu-codipack.yml/badge.svg)](https://github.com/ISSMteam/ISSM/actions/workflows/ubuntu-codipack.yml)
4+
[![Ubuntu Python](https://github.com/ISSMteam/ISSM/actions/workflows/ubuntu-python.yml/badge.svg)](https://github.com/ISSMteam/ISSM/actions/workflows/ubuntu-python.yml)
45

56
## Description
67
ISSM is a large-scale thermo-mechanical 2D/3D parallelized multi-purpose finite-element software dedicated to ice sheet and sea-level modeling.
-1.16 MB
Binary file not shown.

externalpackages/adjoinablempi/install-linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -eu
66
rm -rf install src
77

88
# Download source
9-
#$ISSM_DIR/scripts/DownloadExternalPackage.sh 'https://issm.ess.uci.edu/files/externalpackages/adjoinablempi.tar.gz' 'adjoinablempi.tar.gz'
9+
$ISSM_DIR/scripts/DownloadExternalPackage.sh 'https://issm.ess.uci.edu/files/externalpackages/adjoinablempi.tar.gz' 'adjoinablempi.tar.gz'
1010

1111
# Unpack source
1212
tar -zxvf adjoinablempi.tar.gz

externalpackages/adjoinablempi/install-mac.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export CFLAGS=-Wno-error=implicit-function-declaration
1111
rm -rf install src
1212

1313
# Download source
14-
#$ISSM_DIR/scripts/DownloadExternalPackage.sh 'https://issm.ess.uci.edu/files/externalpackages/adjoinablempi.tar.gz' 'adjoinablempi.tar.gz'
14+
$ISSM_DIR/scripts/DownloadExternalPackage.sh 'https://issm.ess.uci.edu/files/externalpackages/adjoinablempi.tar.gz' 'adjoinablempi.tar.gz'
1515

1616
# Unpack source
1717
tar -zxvf adjoinablempi.tar.gz

externalpackages/adjoinablempi/install-pleaides-gcc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -eu
66
rm -rf install src
77

88
# Download source
9-
#$ISSM_DIR/scripts/DownloadExternalPackage.sh 'https://issm.ess.uci.edu/files/externalpackages/adjoinablempi.tar.gz' 'adjoinablempi.tar.gz'
9+
$ISSM_DIR/scripts/DownloadExternalPackage.sh 'https://issm.ess.uci.edu/files/externalpackages/adjoinablempi.tar.gz' 'adjoinablempi.tar.gz'
1010

1111
# Unpack source
1212
tar -zxf adjoinablempi.tar.gz

externalpackages/adjoinablempi/install-pleaides.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -eu
66
rm -rf install src
77

88
# Download source
9-
#$ISSM_DIR/scripts/DownloadExternalPackage.sh 'https://issm.ess.uci.edu/files/externalpackages/adjoinablempi.tar.gz' 'adjoinablempi.tar.gz'
9+
$ISSM_DIR/scripts/DownloadExternalPackage.sh 'https://issm.ess.uci.edu/files/externalpackages/adjoinablempi.tar.gz' 'adjoinablempi.tar.gz'
1010

1111
# Unpack source
1212
tar -zxf adjoinablempi.tar.gz

0 commit comments

Comments
 (0)