-
Notifications
You must be signed in to change notification settings - Fork 11
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
add build script for intel oneapi and gcc compiler separately #88
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Example bash script to install Pace to run bare-metal on Gaea's c4 cluster | ||
|
||
set -e -x | ||
|
||
# module load necessary system software | ||
module rm PrgEnv-intel | ||
module load PrgEnv-gnu | ||
module rm gcc | ||
module load gcc/12.2.0 | ||
module load boost/1.79.0 | ||
module load python/3.9 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we update the python version here too? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, updated to the python 3.11.7 |
||
|
||
export CC=`which gcc` | ||
export CXX=`which g++` | ||
export MPICC=`which mpicc` | ||
export MPICXX=`which mpicxx` | ||
export DACE_compiler_cpu_executable=${CXX} | ||
export GT4PY_EXTRA_COMPILE_ARGS="-O3 -ffast-math -fprefetch-loop-arrays -flto=thin -funroll-all-loops" | ||
export OPENMP_CPPFLAGS="-fopenmp -fopenmp-simd" | ||
export OPENMP_LDFLAGS="-fopenmp -fopenmp-simd" | ||
|
||
# clone Pace and update submodules | ||
git clone --recursive https://github.com/NOAA-GFDL/pace | ||
cd pace | ||
|
||
# create a conda environment for pace | ||
conda create -y --name my_name python=3.8 | ||
|
||
# enter the environment and update it | ||
conda activate my_name | ||
pip3 install --upgrade pip setuptools wheel | ||
|
||
# install the Pace dependencies, GT4Py, and Pace | ||
pip3 install -r requirements_dev.txt -c constraints.txt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
INSTALL_PREFIX=$1 | ||
ENVIRONMENT_NAME=$2 | ||
|
||
PACE_DIR=$(pwd)/../.. | ||
FV3NET_DIR=$INSTALL_PREFIX/fv3net | ||
|
||
# module load necessary system software | ||
module load conda | ||
module load intel_compilers/2021.3.0 | ||
|
||
export CC=`which icpx` | ||
export CXX=`which icpx` | ||
export MPICC=`which mpiicx` | ||
export MPICXX=`which mpiicpx` | ||
export DACE_compiler_cpu_executable=${CXX} | ||
export GT4PY_EXTRA_COMPILE_ARGS="-O3 -funroll-loops -qopt-prefetch=2 -align" | ||
export OPENMP_CPPFLAGS="-qopenmp -qopenmp-simd" | ||
export OPENMP_LDFLAGS="-qopenmp -qopenmp-simd" | ||
|
||
CONDA_PREFIX=$INSTALL_PREFIX/conda | ||
conda config --add pkgs_dirs $CONDA_PREFIX/pkgs | ||
conda config --add envs_dirs $CONDA_PREFIX/envs | ||
|
||
# enter the pace directory | ||
cd $PACE_DIR | ||
|
||
# create a conda environment with cartopy and its dependencies installed | ||
conda create -c conda-forge -y --name $ENVIRONMENT_NAME python=3.8 matplotlib==3.5.2 cartopy==0.18.0 | ||
|
||
# enter the environment and update it | ||
conda activate $ENVIRONMENT_NAME | ||
pip3 install --upgrade --no-cache-dir pip setuptools wheel | ||
|
||
# install the Pace dependencies, GT4Py, and Pace | ||
pip3 install --no-cache-dir -r requirements_dev.txt -c constraints.txt | ||
|
||
# clone fv3net | ||
git clone https://github.com/ai2cm/fv3net.git $FV3NET_DIR | ||
|
||
# install jupyter and ipyparallel | ||
pip3 install --no-cache-dir \ | ||
ipyparallel==8.4.1 \ | ||
jupyterlab==3.4.4 \ | ||
jupyterlab_code_formatter==1.5.2 \ | ||
isort==5.10.1 \ | ||
black==22.3.0 | ||
|
||
# install vcm | ||
python3 -m pip install $FV3NET_DIR/external/vcm |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of questions:
my_name
in general?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, let me test python 3.11.9, and update the script