Last active
June 26, 2024 05:07
-
-
Save julesghub/a8bfd98734fcb88752300a156a60705c to your computer and use it in GitHub Desktop.
Underworld 2 & 3 Setonix baremetal run scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -l | |
# Installation script installing Underworld (baremetal) on Setonix | |
# A python virtual environment is made under your $PAWSEY_PROJECT directory, ie, | |
# /software/projects/$PAWSEY_PROJECT/setonix/venv/py311 | |
## installing latest uw2 on setonix | |
module load petsc/3.20.1-nocomplex py-pip/23.1.2-py3.11.6 py-h5py/3.8.0 | |
# Now create a python virtual directory | |
python -m venv /software/projects/$PAWSEY_PROJECT/setonix/venv/py311/ | |
# Activate and install all requirements (think I got them all) | |
source /software/projects/$PAWSEY_PROJECT/setonix/venv/py311/bin/activate | |
sg $PAWSEY_PROJECT -c "pip install wheel" | |
sg $PAWSEY_PROJECT -c "pip install badlands@git+https://github.com/badlands-model/badlands.git@c9b7f672ef84e0f5799b9bda74dbab14ac6c3eb4#subdirectory=badlands" | |
# install underworld branch to the virtual env | |
pip install --no-build-isolation git+https://github.com/underworldcode/[email protected] | |
export PIPVENV=`pip show underworld | grep "Location:" | cut -d ':' -f2 | xargs` | |
# check the install is as expected | |
export PYTHONPATH=$PIPVENV:$PYTHONPATH | |
python -c "import underworld as uw; print(uw.__version__)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aiohttp==3.9.3 | |
aiosignal==1.3.1 | |
anyio==4.3.0 | |
argon2-cffi==23.1.0 | |
argon2-cffi-bindings==21.2.0 | |
arrow==1.3.0 | |
async-timeout==4.0.3 | |
attrs==23.2.0 | |
beautifulsoup4==4.12.3 | |
bleach==6.1.0 | |
cffi==1.16.0 | |
defusedxml==0.7.1 | |
exceptiongroup==1.2.0 | |
fastjsonschema==2.19.1 | |
fqdn==1.5.1 | |
frozenlist==1.4.1 | |
idna==3.6 | |
isoduration==20.11.0 | |
Jinja2==3.1.3 | |
jsonpointer==2.4 | |
jsonschema==4.21.1 | |
jsonschema-specifications==2023.12.1 | |
jupyter-events==0.9.0 | |
jupyter_client==8.6.0 | |
jupyter_core==5.7.1 | |
jupyter_server==2.12.5 | |
jupyter_server_proxy==4.1.0 | |
jupyter_server_terminals==0.5.2 | |
jupyterlab_pygments==0.3.0 | |
lavavu==1.8.62 | |
MarkupSafe==2.1.5 | |
mistune==3.0.2 | |
meshplex @ git+https://github.com/kinnala/meshplex@09f25dc16501803685eea8b9a50d963a5e0169ee | |
multidict==6.0.5 | |
nbclient==0.9.0 | |
nbconvert==7.16.1 | |
nbformat==5.9.2 | |
overrides==7.7.0 | |
packaging==23.2 | |
pandocfilters==1.5.1 | |
Pint==0.23 | |
platformdirs==4.2.0 | |
prometheus_client==0.20.0 | |
ptyprocess==0.7.0 | |
pycparser==2.21 | |
Pygments==2.17.2 | |
python-dateutil==2.8.2 | |
python-json-logger==2.0.7 | |
PyYAML==6.0.1 | |
pyzmq==25.1.2 | |
referencing==0.33.0 | |
rfc3339-validator==0.1.4 | |
rfc3986-validator==0.1.1 | |
rpds-py==0.18.0 | |
Send2Trash==1.8.2 | |
simpervisor==1.0.0 | |
six==1.16.0 | |
sniffio==1.3.0 | |
soupsieve==2.5 | |
swig==4.2.0.post0 | |
terminado==0.18.0 | |
tinycss2==1.2.1 | |
tornado==6.4 | |
traitlets==5.14.1 | |
types-python-dateutil==2.8.19.20240106 | |
typing_extensions==4.9.0 | |
uri-template==1.3.0 | |
webcolors==1.13 | |
webencodings==0.5.1 | |
websocket-client==1.7.0 | |
wheel==0.42.0 | |
yarl==1.9.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -l | |
## User required input | |
#SBATCH --account=pawsey0407 | |
#SBATCH --job-name=bobthejob | |
#SBATCH --ntasks=3 | |
#SBATCH --time=00:20:00 | |
## Setup job conditions and run environment | |
#SBATCH --ntasks-per-node=64 # found this is needed ~Apr2023 | |
#SBATCH --cpus-per-task=1 # OMP_NUM_THREADS equivalent | |
# Note we avoid any inadvertent OpenMP threading by setting | |
export OMP_NUM_THREADS=1 | |
# load system packages: | |
module load petsc/3.21.2-zmhjwb7 py-pip/23.1.2-py3.11.6 py-h5py/3.8.0 | |
# Use the python virtual environment indirectly, provent mishaps | |
export UWENV=/software/projects/pawsey0407/setonix/venv/py311/ | |
source $UWENV/bin/activate | |
# MPI flags for connection | |
export MPICH_OFI_STARTUP_CONNECT=1 | |
export MPICH_OFI_VERBOSE=1 | |
export MPICH_OFI_SKIP_NIC_SYMMETRY_TEST=1 | |
## model name and execution | |
export model="mymod.py" | |
srun -n ${SLURM_NTASKS} python3 $model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Installation script installing Underworld (baremetal) on Setonix | |
# A python virtual environment is made under your $PAWSEY_PROJECT directory, ie, | |
# /software/projects/$PAWSEY_PROJECT/setonix/venv/py310 | |
## installing latest uw2 on setonix | |
module load spack/0.19.0 petsc/3.19.5-nocomplex py-h5py/3.7.0 | |
# old command to install custom petsc | |
#`spack project install -j24 [email protected] +fftw +mumps +hwloc ^[email protected] ^[email protected]` | |
# Now create a python virtual directory | |
python -m venv /software/projects/$PAWSEY_PROJECT/setonix/venv/py310/ | |
# Activate and install all requirements (think I got them all) | |
source /software/projects/$PAWSEY_PROJECT/setonix/venv/py310/bin/activate | |
sg $PAWSEY_PROJECT -c "pip install -r requirements.txt" | |
sg $PAWSEY_PROJECT -c "pip install badlands@git+https://github.com/badlands-model/badlands.git@c9b7f672ef84e0f5799b9bda74dbab14ac6c3eb4#subdirectory=badlands" | |
# install underworld branch to the virtual env | |
pip install --no-build-isolation git+https://github.com/underworldcode/underworld2 | |
### sg <projectcode> -c "" never works for me for UW | |
export PIPVENV=`pip show underworld | grep "Location:" | cut -d ':' -f2 | xargs` | |
# check the install is as expected | |
export PYTHONPATH=$PIPVENV:$PYTHONPATH | |
python -c "import underworld as uw; print(uw.__version__)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -l | |
## User required input | |
#SBATCH --account=pawsey0407 | |
#SBATCH --job-name=bobthejob | |
#SBATCH --ntasks=3 | |
#SBATCH --time=00:20:00 | |
## Setup job conditions and run environment | |
#SBATCH --ntasks-per-node=64 # found this is needed ~Apr2023 | |
#SBATCH --cpus-per-task=1 # OMP_NUM_THREADS equivalent | |
# Note we avoid any inadvertent OpenMP threading by setting | |
export OMP_NUM_THREADS=1 | |
# load system packages: | |
module load spack/0.19.0 petsc/3.19.5-nocomplex py-h5py/3.7.0 | |
# Use the python virtual environment indirectly, provent mishaps | |
export UWENV=/software/projects/pawsey0407/setonix/py310/ | |
export PATH=${UWENV}/bin/:$PATH | |
export PYTHONPATH=${UWENV}/lib/python3.10/site-packages/:$PYTHONPATH | |
# MPI flags for connection | |
export MPICH_OFI_STARTUP_CONNECT=1 | |
export MPICH_OFI_VERBOSE=1 | |
export MPICH_OFI_SKIP_NIC_SYMMETRY_TEST=1 | |
export OMP_NUM_THREADS=1 | |
## model name and execution | |
export model="mymod.py" | |
srun -n ${SLURM_NTASKS} python3 $model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# load system packages: py3.11, mpi, hdf5 | |
module load petsc/3.21.2-zmhjwb7 py-pip/23.1.2-py3.11.6 py-h5py/3.8.0 py-cython/3.0.4 | |
# path to virtual environment with petsc4py, underworld and dependencies. | |
export UWP_DIR=/software/projects/pawsey0407/setonix/venv/py311 | |
source $UWP_DIR/bin/activate | |
# The following doesn't work for loading the path | |
##export PYTHONPATH=$UWP_DIR/lib/python3.11/site-packages/:$PYTHONPATH | |
# To run test you'll need pytest | |
# pip install --user pytest | |
# if further python packages are needed activate and modify the virtual env. with | |
# source $UWP_DIR/bin/activate | |
# Note we avoid any inadvertent OpenMP threading by setting | |
export OMP_NUM_THREADS=1 | |
# download uw3 from github | |
#git clone https://github.com/underworldcode/underworld3.git | |
#git checkout <branchName> | |
#cd underworld3.git | |
#pip install . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment