-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated rng seeding for better consistency. Added a bash script to ru…
…n all experiments
- Loading branch information
Showing
5 changed files
with
95 additions
and
42 deletions.
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
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,35 @@ | ||
#!/bin/bash | ||
|
||
echo "Determining the operating system..." | ||
os_name=$(uname) | ||
|
||
echo "Operating System detected: $os_name" | ||
|
||
# Determine the number of CPU threads based on the operating system | ||
if [ "$os_name" = "Linux" ]; then | ||
num_threads=$(nproc) | ||
elif [ "$os_name" = "Darwin" ]; then | ||
# Darwin is the operating system name for macOS | ||
num_threads=$(sysctl -n hw.ncpu) | ||
else | ||
echo "Unsupported Operating System. Defaulting to 1 thread." | ||
num_threads=1 | ||
fi | ||
|
||
echo "Number of CPU threads available: $num_threads" | ||
|
||
export JULIA_NUM_THREADS=$num_threads | ||
echo "Setting Julia to use $JULIA_NUM_THREADS threads" | ||
|
||
echo "Running Julia script with different arguments..." | ||
|
||
# Run with first argument "geo" | ||
julia1.9 examples/geothermal_example.jl both | ||
|
||
# Run with second argument "econ" | ||
julia1.9 examples/geothermal_example.jl geo | ||
|
||
# Run with third argument "both" | ||
julia1.9 examples/geothermal_example.jl econ | ||
|
||
echo "Script execution completed." |
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
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
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