Skip to content

Commit 8aaaa28

Browse files
committed
Merge remote-tracking branch 'origin' into study_TGLFdb_update
2 parents 506384f + 1791a2c commit 8aaaa28

20 files changed

+1240
-633
lines changed

Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ version = "0.9.2"
55

66
[deps]
77
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
8+
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
89
BalanceOfPlantSurrogate = "001e48cb-5a1e-4e3c-a5d4-cdc3aa14f3de"
910
BoundaryPlasmaModels = "2da5b0d0-c5e5-4f14-9caf-62d0020df410"
1011
CHEASE = "40781a8e-f1bb-11ec-24ef-0f6bc40c1567"
@@ -79,6 +80,7 @@ WeaveExt = "Weave"
7980

8081
[compat]
8182
AbstractTrees = "0.4"
83+
ArgParse = "1.2.0"
8284
BalanceOfPlantSurrogate = "3"
8385
BoundaryPlasmaModels = "1"
8486
CHEASE = "1"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The figure below is a sneakpeak of the models implemented in FUSE:
1212

1313
Here are some key resources for getting started with FUSE:
1414

15+
* 📨 **[Sign up for more info](https://forms.gle/iQGYKWfgeNkw2fCZ7)**
1516
* 📚 **[Online documentation](https://fuse.help)**
1617
* 🎓 **[Intro tutorial](https://fuse.help/dev/tutorial.html)**
1718
* 🎤 **[Recent presentation](https://github.com/ProjectTorreyPines/FUSE_extra_files/raw/master/2025_D3D/SET_mar_2025.pdf)**

deploy/omega/base.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ local base_depot = envdir .. "/.julia"
1515
setenv("FUSE_HOME", basedir)
1616
setenv("FUSE_ENVIRONMENT", fuse_env)
1717

18+
-- Environment variables for data fetching
19+
setenv("FUSE_OMFIT_HOST", "localhost")
20+
setenv("FUSE_OMFIT_ROOT", "/fusion/projects/theory/fuse/d3d_data_fetching/OMFIT-source")
21+
setenv("FUSE_OMAS_ROOT", "/fusion/projects/theory/fuse/d3d_data_fetching/omas")
22+
23+
1824
-- We put the user depot first so their own packages get installed there,
1925
-- then the FUSE environment's depot after so it can find packages for the
2026
-- precompiled sysimage
@@ -33,4 +39,4 @@ setenv("JULIA_CPU_TARGET", "generic")
3339
prepend_path("JUPYTER_PATH", envdir .. "/.jupyter")
3440

3541
prepend_path("PATH", basedir .. "/miniconda3/bin")
36-
prepend_path("PATH", envdir)
42+
prepend_path("PATH", envdir)

deploy/perlmutter/base.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ else
3030
)
3131
end
3232

33+
-- Environment variables for data fetching
34+
setenv("FUSE_OMFIT_HOST", "localhost")
35+
setenv("FUSE_OMFIT_ROOT", "/global/common/software/m3739/perlmutter/OMFIT-CAKE")
36+
setenv("FUSE_OMAS_ROOT", "/global/common/software/m3739/perlmutter/FUSE_OMAS")
37+
setenv("FUSE_RESULT_ARCHIVE", pathJoin("/global/cfs/cdirs/m3739/FUSE/d3d-time-dependent", os.getenv("USER")))
38+
3339
-- The FUSE sysimage enviornment is the last place julia looks for packages
3440
-- when a user does `using <package>`, but this allows Julia to automatically
3541
-- find FUSE, Plots, and IJulia.

deploy/perlmutter/deploy.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
command -v module >/dev/null 2>&1 || source /usr/share/lmod/lmod/init/bash
33
module load julia/1.11.4
44

5+
# Set up OMFIT and OMAS which is needed for the DIII-D study
6+
export FUSE_OMFIT_HOST="localhost"
7+
export FUSE_OMFIT_ROOT="/global/common/software/m3739/perlmutter/OMFIT-CAKE"
8+
export FUSE_OMAS_ROOT="/global/common/software/m3739/perlmutter/FUSE_OMAS"
9+
510
basedir="/global/common/software/m3739/perlmutter/fuse"
611

712
fuse_env=`curl -s https://api.github.com/repos/ProjectTorreyPines/FUSE.jl/releases/latest | jq -r .name`

docs/src/cases_docs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pushfirst!(
2525
CurrentModule = FUSE
2626
```
2727
28-
FUSE comes with a set of pre-cookes used cases.
28+
FUSE comes with a set of pre-cooked use cases.
2929
The `case_parameters(:use_case, ...)` method returns the `ini` and `act` parameters for that specific `use_case`.
3030
These `ini` and `act` can then be further customized before running a FUSE simulation.
3131

docs/src/install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ For installation start your Julia interpreter by typing `julia` at the terminal,
6868
!!! note
6969
The WebIO jupyter-lab extension is needed for the [`Interact.jl`](https://github.com/JuliaGizmos/Interact.jl?tab=readme-ov-file#usage) package to work.
7070

71-
Make sure WebIO is working with `jupyter labextension list`.
71+
Make sure WebIO is working with `jupyter labextension list`. If it is working properly, you should see something like: webio-jupyterlab-provider v0.1.0 enabled OK (python, webio_jupyter_extension). This can also be checked with `jupyter nbextension list`, which should show something like: webio-jupyter-nbextension/nbextension enabled.
7272

73-
If the extension has compatibility issues, consider installing an older verision of Jupyter (eg. `conda install jupyterlab=3.6.7`).
73+
If the extension has compatibility issues, consider installing an older verision of Jupyter (eg. `conda install jupyterlab=3.6.7`). Also ensure that the WebIO and Interact packages are fully up-to-date, and restart the notebook session before testing that it works. Finally, it may be necessary to downgrade your system's version of Python - the recommended version for compatibility with Interact is 3.11.11.
7474

7575
1. Start a new Jupyter-lab session (this should open a web-browser page with Jupyter running)
7676

knowledge/how_to_use_fuse.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ Studies use a `sty` (study parameters) structure similar to `act` (actor paramet
820820

821821
```julia
822822
# Get study parameters - similar to case_parameters but for studies
823-
sty, act = FUSE.study_parameters(:TGLFdb)
823+
sty = FUSE.study_parameters(:TGLFdb)
824824

825825
# Common study parameters
826826
sty.server = "localhost" # Distributed computing server
@@ -841,7 +841,7 @@ sty.custom_tglf_models = ["sat3_em_d3d_azf-1_withnegD"] # Custom TGLF models to
841841
using Distributed
842842

843843
# 1. Setup study parameters
844-
sty, act = FUSE.study_parameters(:TGLFdb)
844+
sty = FUSE.study_parameters(:TGLFdb)
845845
sty.server = "localhost"
846846
sty.n_workers = 4
847847
sty.database_folder = "/path/to/database"
@@ -951,7 +951,7 @@ ylabel!("Probability")
951951

952952
```julia
953953
# Get study parameters for database generation
954-
sty, _ = FUSE.study_parameters(:DatabaseGenerator)
954+
sty = FUSE.study_parameters(:DatabaseGenerator)
955955

956956
# Configure distributed computing
957957
sty.server = "localhost"
@@ -1120,7 +1120,7 @@ ini.requirements.coil_stress_margin = 0.1 # 10% stress margin
11201120

11211121
```julia
11221122
# Get study parameters for multi-objective optimization
1123-
sty, _ = FUSE.study_parameters(:MultiObjectiveOptimizer)
1123+
sty = FUSE.study_parameters(:MultiObjectiveOptimizer)
11241124

11251125
# Configure distributed computing
11261126
sty.server = "localhost" # Can be "saga", "omega", or cluster name

src/FUSE.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ include("studies.jl")
178178
include(joinpath("studies", "database_generator.jl"))
179179
include(joinpath("studies", "multi_objective_optimization.jl"))
180180
include(joinpath("studies", "TGLF_database.jl"))
181+
include(joinpath("studies", "study_database.jl"))
181182
include(joinpath("studies", "experiment_postdictive.jl"))
182183

183184
#= ========= =#

0 commit comments

Comments
 (0)