Skip to content

Commit

Permalink
Merge pull request #65 from ACCESS-NRI/update_env
Browse files Browse the repository at this point in the history
Try this
  • Loading branch information
rbeucher authored Feb 14, 2024
2 parents f1a3779 + 029c30d commit 1336ce2
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 31 deletions.
4 changes: 2 additions & 2 deletions environments/access-med/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@


### Optional config for custom deploy script
export VERSION_TO_MODIFY=0.4
export VERSION_TO_MODIFY=0.6
export STABLE_VERSION=0.3
export UNSTABLE_VERSION=0.4
export UNSTABLE_VERSION=0.6

### Version settings
export ENVIRONMENT=access-med
Expand Down
3 changes: 2 additions & 1 deletion environments/access-med/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ dependencies:
- objgraph ### Unlisted dependency of greenlet
- asyncssh
- gevent
- openmpi
- openmpi==4.1.5
- mpi4py
- esmf>=8.0.1=mpi_openmpi*
- esmpy>=8.0.1=mpi_openmpi*
Expand All @@ -71,6 +71,7 @@ dependencies:
- pip:
- railroad-diagrams ### Unlisted dependency of pip and pyparsing
- access-med-utils==0.1.6


# Julia (dependencies installed by separate script)
- julia
2 changes: 2 additions & 0 deletions environments/access-med/testconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ skip:
- esmf_regrid
- esmvaltool.diag_scripts
- med_diagnostics
- numba
- urllib3

# Preload these modules before testing to avoid weird python issues
preload:
Expand Down
15 changes: 0 additions & 15 deletions modules/access-med-are-unstable

This file was deleted.

18 changes: 10 additions & 8 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,16 @@ function inner() {

pushd "${ENV_INSTALLATION_PATH}"
### Get rid of stuff from packages we don't want
for dir in bin lib etc libexec include; do
pushd $dir
for i in $( rpm -qli "${rpms_to_remove[@]}" ); do
fn=$( basename $i )
[[ -f $fn ]] && rm $fn
[[ -d $fn ]] && rm -rf $fn
done
popd
for dir in bin lib etc libexec include; do
if [[ -d "${dir}" ]]; then
pushd $dir
for i in $( rpm -qli "${rpms_to_remove[@]}" ); do
fn=$( basename $i )
[[ -f $fn ]] && rm $fn
[[ -d $fn ]] && rm -rf $fn
done
popd
fi
done

### Replace things from apps
Expand Down
19 changes: 14 additions & 5 deletions scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,20 @@ function initialise_tmp_dirs() {
if [[ "${PBS_JOBFS}" ]]; then
relink_cmds=""
for dir in "$@"; do
relink_cmds="${relink_cmds}rm ~/${dir}; ln -s $( readlink ~/${dir} ) ~/${dir}; "
rm ~/"${dir}"
mkdir -p "${PBS_JOBFS}"/"${dir}"
ln -s "${PBS_JOBFS}"/"${dir}" ~
### Race condition
if [[ -h ~/"${dir}" ]]; then
relink_cmds="${relink_cmds}rm ~/${dir}; ln -s $( readlink ~/${dir} ) ~/${dir}; "
rm ~/"${dir}"
mkdir -p "${PBS_JOBFS}"/"${dir}"
ln -s "${PBS_JOBFS}"/"${dir}" ~
### Race condition
elif [[ -d ~/"${dir}" ]]; then
echo "Warning! ~/${dir} is a directory (not a symlink). This can significantly increase "
echo "installation time of conda environments."
else
relink_cmds="${relink_cmds}rm ~/${dir}; "
mkdir -p "${PBS_JOBFS}"/"${dir}"
ln -s "${PBS_JOBFS}"/"${dir}" ~
fi
done
trap "${relink_cmds}" EXIT
fi
Expand Down

0 comments on commit 1336ce2

Please sign in to comment.