Skip to content

Commit

Permalink
Add $WORKDIR to hpc_install.R
Browse files Browse the repository at this point in the history
In light of disucssion about how directories are structured on longleaf
split out the project path into a work directory. Still need to do the
same for rockfish, for now assuming work and user dirs are the same
there.
  • Loading branch information
TimothyWillard committed Oct 4, 2024
1 parent dd596ad commit 4ba381f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions build/hpc_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ if [[ $1 == "longleaf" ]]; then
# Setup general purpose user variables needed for Longleaf
USERO=$( echo $USER | awk '{ print substr($0, 1, 1) }' )
USERN=$( echo $USER | awk '{ print substr($0, 2, 1) }' )
USERDIR="/users/$USERO/$USERN/$USER"
USERDIR="/users/$USERO/$USERN/$USER/"
WORKDIR="/work/users/$USERO/$USERN/$USER/"

# Load required modules
module purge
Expand All @@ -16,6 +17,7 @@ if [[ $1 == "longleaf" ]]; then
elif [[ $1 == "rockfish" ]]; then
# Setup general purspose user variables needed for RockFish
USERDIR="/scratch4/struelo1/flepimop-code/$USER/"
WORKDIR=$USERDIR

# Load required modules
module purge
Expand Down Expand Up @@ -104,9 +106,9 @@ export FLEPI_STOCHASTIC_RUN=false
export FLEPI_RESET_CHIMERICS=TRUE
export TODAY=`date --rfc-3339='date'`

echo -n "Please set a project path (relative to '$USERDIR'): "
echo -n "Please set a project path (relative to '$WORKDIR'): "
read PROJECT_PATH
export PROJECT_PATH="$USERDIR/$PROJECT_PATH"
export PROJECT_PATH="$WORKDIR/$PROJECT_PATH"

echo -n "Please set a config path (relative to '$PROJECT_PATH'): "
read CONFIG_PATH
Expand Down

0 comments on commit 4ba381f

Please sign in to comment.