Skip to content

Commit

Permalink
Fix bug in input to conda_for_host and add izumi handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ekluzek committed Dec 2, 2024
1 parent 172236c commit 242a55f
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@

# Load or unload conda
conda_for_host() {
host=$0
type=$1
host=$1
type=$2
if [[ "$host" =~ derecho*.hpc.ucar.edu || "$host" =~ d*.hpc.ucar.edu ]] ; then
echo "Running on Derecho..." >&1
if [[ "$type" == "load" ]]; then
module load conda
else
module unload conda
fi
elif [[ "$host" =~ izumi.cgd.ucar.edu || "$host" =~ i*.cgd.ucar.edu ]] ; then
echo "Running on Izumi..." >&1
. /usr/share/Modules/init/sh
if [[ "$type" == "load" ]]; then
module load lang/anaconda
else
module unload lang/anaconda
fi
else
echo "Not a recognized host: $host" >&1
fi
Expand Down

0 comments on commit 242a55f

Please sign in to comment.