Skip to content

Commit

Permalink
Update kestrel run scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
paulf81 committed Nov 26, 2024
1 parent 1503bd8 commit 1058576
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 7 deletions.
14 changes: 7 additions & 7 deletions example_case_folders/01_amr_wind_only/sbatch_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
# #SBATCH --qos=high # Uncomment for higher prioirty

# A lot of modules and conda stuff
source /nopt/nrel/apps/anaconda/5.3/etc/profile.d/conda.sh
module use /not/nrel/apps/modules/default/modulefiles
# source /nopt/nrel/apps/anaconda/5.3/etc/profile.d/conda.sh
# module use /not/nrel/apps/modules/default/modulefiles
module purge
module load conda
export PREFIX=~/.conda-envs/hercules
export PATH=$PREFIX/bin:$PATH
export FI_PROVIDER_PATH=$PREFIX/lib/libfabric/prov
export LD_LIBRARY_PATH=$PREFIX/lib/libfabric:$PREFIX/lib/release_mt:$LD_LIBRARY_PATH
source activate hercules
# export PREFIX=~/.conda-envs/hercules
# export PATH=$PREFIX/bin:$PATH
# export FI_PROVIDER_PATH=$PREFIX/lib/libfabric/prov
# export LD_LIBRARY_PATH=$PREFIX/lib/libfabric:$PREFIX/lib/release_mt:$LD_LIBRARY_PATH
conda activate hercules
module load helics/3.4.0-gcc10.1.0-open-mpi
module load netcdf-c/4.9.2-openmpi-gcc

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/bin/bash
#SBATCH --job-name=hercules
#SBATCH --time=1:00:00
#SBATCH --nodes=1
#SBATCH --account=ssc
# #SBATCH --qos=high # Uncomment for higher prioirty

# Kill any active helics jobs
source ../find_and_kill_helics

# Source the Conda initialization script
module purge
module load conda
conda activate hercules

# Versions:
# helics/3.1.0-cray-mpich-intel
# helics/3.4.0-cray-mpich-intel
# helics/3.4.0-gcc10.1.0-open-mpi

# Set up helics and netcdf
module load helics/3.4.0-cray-mpich-intel
# module load netcdf-c/4.9.2-openmpi-gcc

# Clean up existing outputs
if [ -d outputs ]; then rm -r outputs; fi
mkdir -p outputs

# Generate floris standin data
python ../../hercules/tools/generate_amr_standin_data.py floris_standin_data.csv

# Set the helics port to use:
export HELICS_PORT=32000

helics_broker -t zmq -f 2 --loglevel="debug" --local_port=$HELICS_PORT &
python hercules_runscript_CLcontrol.py hercules_input_000.yaml >> outputs/loghercules_cl 2>&1 &
python floris_runscript.py amr_input.inp floris_standin_data.csv >> outputs/logfloris_cl 2>&1

# Clean up helics output if there
# Search for a file that begins with the current year
# And ends with csv
# If the file exists, move to outputs folder
current_year=$(date +"%Y")
for file in ${current_year}*.csv; do
if [ -f "$file" ]; then
mv "$file" outputs/
fi
done

# If everything is successful
echo "Finished running hercules"
exit 0

0 comments on commit 1058576

Please sign in to comment.