-
Notifications
You must be signed in to change notification settings - Fork 7
Scalar-Tensor theory update draft PR #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 12 commits
e792561
cab735e
13ace6b
37beff0
68ee56e
3d9bc1e
6a67033
f885598
828bff4
6c893f4
c1e0fb5
41e386f
b0a005e
38a9d8c
f4042bb
76855c0
31cdcae
65817f2
cee587c
8555d9d
1d37bb7
88fbfaf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,7 @@ | |
|
|
||
| .. autosummary:: | ||
|
|
||
| ~FamilyData.extra | ||
| ~FamilyData.lambdas | ||
| ~FamilyData.log10pcs | ||
| ~FamilyData.masses | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,7 @@ | |
|
|
||
| ~TOVSolution.M | ||
| ~TOVSolution.R | ||
| ~TOVSolution.extra | ||
| ~TOVSolution.k2 | ||
|
|
||
|
|
||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| seed: 44 | ||
| dry_run: false | ||
| validate_only: false | ||
| eos: | ||
| type: metamodel_cse | ||
| ndat_metamodel: 100 | ||
| nmax_nsat: 25.0 | ||
| nb_CSE: 8 | ||
| crust_name: DH | ||
| tov: | ||
| type: scalar_tensor | ||
| min_nsat_TOV: 0.75 | ||
| ndat_TOV: 100 | ||
| nb_masses: 100 | ||
| prior: | ||
| specification_file: prior.prior | ||
| likelihoods: | ||
| - type: constraints_eos | ||
| enabled: true | ||
| - type: chieft | ||
| enabled: true | ||
| low_filename: ../../../../jesterTOV/inference/data/chiEFT/2402.04172/low.dat | ||
| high_filename: ../../../../jesterTOV/inference/data/chiEFT/2402.04172/high.dat | ||
| nb_n: 100 | ||
| sampler: | ||
| type: smc-rw | ||
| n_particles: 2000 | ||
| n_mcmc_steps: 10 | ||
| target_ess: 0.9 | ||
| random_walk_sigma: 0.1 | ||
| output_dir: ./outdir/ | ||
| postprocessing: | ||
| enabled: true | ||
| make_cornerplot: false | ||
| make_massradius: true | ||
| make_pressuredensity: true | ||
| debug_nans: true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| E_sat = UniformPrior(-16.1, -15.9, parameter_names=["E_sat"]) | ||
| K_sat = UniformPrior(150.0, 300.0, parameter_names=["K_sat"]) | ||
| Q_sat = UniformPrior(-500.0, 1100.0, parameter_names=["Q_sat"]) | ||
| Z_sat = UniformPrior(-2500.0, 1500.0, parameter_names=["Z_sat"]) | ||
| E_sym = UniformPrior(28.0, 45.0, parameter_names=["E_sym"]) | ||
| L_sym = UniformPrior(10.0, 200.0, parameter_names=["L_sym"]) | ||
| K_sym = UniformPrior(-400.0, 200.0, parameter_names=["K_sym"]) | ||
| Q_sym = UniformPrior(-1000.0, 1500.0, parameter_names=["Q_sym"]) | ||
| Z_sym = UniformPrior(-2000.0, 1500.0, parameter_names=["Z_sym"]) | ||
| nbreak = UniformPrior(0.16, 0.32, parameter_names=["nbreak"]) | ||
| beta_ST = UniformPrior(-6, 0, parameter_names=["beta_ST"]) | ||
| phi_c = UniformPrior(0.999, 1, parameter_names=["phi_c"]) | ||
| phi_inf_tgt = UniformPrior(0.999e-3, 1e-3, parameter_names=["phi_inf_tgt"]) |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,28 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #!/bin/bash -l | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #Set job requirements | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #SBATCH -N 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #SBATCH -n 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #SBATCH -p gpu_h100 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #SBATCH -t 10:00:00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #SBATCH --gpus-per-node=1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #SBATCH --cpus-per-gpu=1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #SBATCH --mem-per-gpu=40G | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #SBATCH --output="./outdir/log_smc_rw.out" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #SBATCH --job-name="SMC-RW-chiEFT" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| now=$(date) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "$now" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Loading modules | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # module load 2024 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # module load Python/3.10.4-GCCcore-11.3.0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| source /home/twouters2/projects/jester_review/jester/.venv/bin/activate | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Display GPU name | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| nvidia-smi --query-gpu=name --format=csv,noheader | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "==========================================" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "=== Running jester inference (SMC-RW) ===" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "==========================================" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run_jester_inference config.yaml | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+19
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make the example independent of one workstation and one current working directory. The absolute virtualenv path on Line 19 only exists on one machine, and Suggested change+SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
+REPO_ROOT="$(cd -- "$SCRIPT_DIR/../../../../" && pwd)"
+cd "$SCRIPT_DIR"
+
- source /home/twouters2/projects/jester_review/jester/.venv/bin/activate
+JESTER_VENV="${JESTER_VENV:-$REPO_ROOT/.venv}"
+if [[ ! -f "$JESTER_VENV/bin/activate" ]]; then
+ echo "Virtualenv not found: $JESTER_VENV" >&2
+ exit 1
+fi
+source "$JESTER_VENV/bin/activate"
@@
-run_jester_inference config.yaml
+run_jester_inference config.yaml📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| """Pydantic models for TOV solver configuration.""" | ||
|
|
||
| from typing import Annotated, Literal, Union | ||
| from pydantic import ConfigDict, Discriminator, Field | ||
| from pydantic import ConfigDict, BaseModel, ConfigDict, Discriminator, Field | ||
|
|
||
| from ._base import JesterBaseModel | ||
|
|
||
|
|
@@ -56,6 +56,31 @@ class GRTOVConfig(BaseTOVConfig): | |
| type: Literal["gr"] = "gr" # type: ignore[override] # Literal["gr"] ⊂ str | ||
|
|
||
|
|
||
| class ScalarTensorTOVConfig(BaseTOVConfig): | ||
| """Configuration for the Scalar-Tensor TOV solver. | ||
|
|
||
| Attributes | ||
| ---------- | ||
| type : Literal["scalar_tensor"] | ||
| TOV solver type identifier | ||
| beta_ST : float | ||
| Scalar-tensor coupling parameter beta_ST (default: 0.0) | ||
| phi_inf_tgt : float | ||
| Target asymptotic scalar field at infinity (default: 1e-3) | ||
| phi_c : float | ||
| Central scalar field value (default: 1.0) | ||
| """ | ||
|
|
||
| type: Literal["scalar_tensor"] = "scalar_tensor" # type: ignore[override] | ||
|
|
||
| beta_ST: float = Field( | ||
| default=0.0, description="Scalar-tensor coupling parameter beta_ST" | ||
| ) | ||
| phi_inf_tgt: float = Field( | ||
| default=1e-3, description="Target asymptotic scalar field at infinity" | ||
| ) | ||
| phi_c: float = Field(default=1.0, description="Central scalar field value") | ||
|
Comment on lines
+80
to
+86
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "### fetch_params definitions"
rg -n -A20 -B5 'def fetch_params\(' jesterTOV
echo
echo "### transform-side TOV parameter assembly"
sed -n '345,370p' jesterTOV/inference/transforms/transform.py
echo
echo "### scalar-tensor config schema"
sed -n '59,105p' jesterTOV/inference/config/schemas/tov.py
echo
echo "### scalar-tensor solver parameter consumption"
sed -n '626,672p' jesterTOV/tov/scalar_tensor.py
echo
echo "### inference-side references to the scalar-tensor parameter names"
rg -n -C3 '\b(beta_ST|phi_inf_tgt|phi_c)\b' jesterTOV/inferenceRepository: nuclear-multimessenger-astronomy/jester Length of output: 8364 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "### ScalarTensorTOVSolver.get_required_parameters() implementation"
rg -n -A10 'class ScalarTensorTOVSolver' jesterTOV/tov/scalar_tensor.py | head -50
echo
echo "### Full get_required_parameters for ScalarTensorTOVSolver"
sed -n '673,690p' jesterTOV/tov/scalar_tensor.py
echo
echo "### How run_inference.py uses the config and passes params to the solver"
rg -n -B5 -A15 'self.tov_solver' jesterTOV/inference/run_inference.py | head -80
echo
echo "### Config instantiation and schema usage in transforms"
rg -n -B3 -A10 'TOVConfig\|ScalarTensorTOVConfig' jesterTOV/inference/transforms/transform.py | head -60
echo
echo "### Parameter prior handling and merging"
rg -n -B5 -A10 'def setup_transforms' jesterTOV/inference/run_inference.py | head -60Repository: nuclear-multimessenger-astronomy/jester Length of output: 816 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "### Check if TOV solver is instantiated from config in run_inference"
rg -n 'tov_solver\|TOVSolver' jesterTOV/inference/run_inference.py | head -40
echo
echo "### Look for where solver config values would be merged into params"
rg -n -B5 -A10 'class.*Transform' jesterTOV/inference/transforms/transform.py | head -80
echo
echo "### Check setup_transforms or __init__ in Transform"
sed -n '1,150p' jesterTOV/inference/transforms/transform.py
echo
echo "### Check how params dict is built from prior"
rg -n -B3 -A8 'params.*prior\|prior.*params' jesterTOV/inference/run_inference.pyRepository: nuclear-multimessenger-astronomy/jester Length of output: 151 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "### Examine run_inference.py structure"
wc -l jesterTOV/inference/run_inference.py
head -100 jesterTOV/inference/run_inference.py
echo
echo "### Look for Transform instantiation"
grep -n 'Transform' jesterTOV/inference/run_inference.py
echo
echo "### Examine Transform __init__"
sed -n '1,250p' jesterTOV/inference/transforms/transform.pyRepository: nuclear-multimessenger-astronomy/jester Length of output: 12999 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "### _create_tov_solver implementation"
sed -n '250,450p' jesterTOV/inference/transforms/transform.py
echo
echo "### forward method and how params are used"
sed -n '300,380p' jesterTOV/inference/transforms/transform.py
echo
echo "### Check if config values are extracted and merged into params anywhere"
rg -n -B3 -A8 'tov_config\|ScalarTensorTOVConfig' jesterTOV/inference/transforms/transform.pyRepository: nuclear-multimessenger-astronomy/jester Length of output: 9984 🏁 Script executed: #!/bin/bash
set -euo pipefixo pipefail
echo "### Check how fixed_params flow through to forward()"
sed -n '180,250p' jesterTOV/inference/base.py
echo
echo "### Check if tov_config values are ever used after _create_tov_solver"
rg -n 'tov_config\|tov_solver' jesterTOV/inference/transforms/transform.py | tail -40
echo
echo "### Verify the gap: config passed but not merged"
sed -n '235,260p' jesterTOV/inference/transforms/transform.pyRepository: nuclear-multimessenger-astronomy/jester Length of output: 136 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "### Check how fixed_params flow through to forward()"
sed -n '180,250p' jesterTOV/inference/base.py
echo
echo "### Check if tov_config values are ever used after _create_tov_solver"
rg -n 'tov_config\|tov_solver' jesterTOV/inference/transforms/transform.py | tail -40
echo
echo "### Verify the gap: config passed but not merged"
sed -n '235,260p' jesterTOV/inference/transforms/transform.pyRepository: nuclear-multimessenger-astronomy/jester Length of output: 223 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "### Find base.py location"
fd 'base\.py' jesterTOV/inference
echo
echo "### Check from_config method in transform.py more carefully"
sed -n '200,260p' jesterTOV/inference/transforms/transform.py
echo
echo "### Critical: After _create_tov_solver returns, are tov_config values used?"
sed -n '219,235p' jesterTOV/inference/transforms/transform.py
echo
echo "### Look for where params dict gets augmented with config defaults"
rg -n 'fixed_params\|tov_config' jesterTOV/inference/transforms/transform.pyRepository: nuclear-multimessenger-astronomy/jester Length of output: 2857 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "### Trace: _create_tov_solver receives tov_config but what happens to its field values?"
sed -n '264,290p' jesterTOV/inference/transforms/transform.py
echo
echo "### The critical question: are tov_config field values EVER stored or merged anywhere?"
grep -n 'beta_ST\|phi_inf_tgt\|phi_c' jesterTOV/inference/transforms/transform.py
echo
echo "### How does run_inference.py call from_config?"
rg -n -B5 -A10 'from_config' jesterTOV/inference/run_inference.py | head -60
echo
echo "### What does the prior file provide? Are beta_ST etc. expected to be sampled?"
rg -n 'beta_ST\|phi_inf_tgt\|phi_c' jesterTOV/inferenceRepository: nuclear-multimessenger-astronomy/jester Length of output: 1037 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "### Check AnisotropyTOVConfig to see the pattern"
sed -n '85,110p' jesterTOV/inference/config/schemas/tov.py
echo
echo "### How are AnisotropyTOVSolver params handled in _create_tov_solver?"
sed -n '264,295p' jesterTOV/inference/transforms/transform.py
echo
echo "### CRITICAL: Check if config solver-specific params should be passed to solver __init__"
rg -n 'class.*TOVSolver' jesterTOV/tov/
echo
echo "### Check AnisotropyTOVSolver __init__ for reference"
rg -n -A15 'class AnisotropyTOVSolver' jesterTOV/tov/anisotropy.py | head -40
echo
echo "### Check ScalarTensorTOVSolver __init__"
rg -n -A15 'class ScalarTensorTOVSolver' jesterTOV/tov/scalar_tensor.py | head -40Repository: nuclear-multimessenger-astronomy/jester Length of output: 3707 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "### Final verification: Does AnisotropyTOVSolver.__init__ exist and take no params?"
rg -n -A20 'class AnisotropyTOVSolver' jesterTOV/tov/anisotropy.py | head -30
echo
echo "### Does ScalarTensorTOVSolver have __init__?"
sed -n '614,680p' jesterTOV/tov/scalar_tensor.py | grep -A10 '__init__\|def solve'
echo
echo "### Full AnisotropyTOVConfig docstring - note it says params come from PRIOR"
sed -n '85,102p' jesterTOV/inference/config/schemas/tov.py
echo
echo "### Compare: ScalarTensorTOVConfig docstring says fields are here with defaults"
sed -n '59,83p' jesterTOV/inference/config/schemas/tov.pyRepository: nuclear-multimessenger-astronomy/jester Length of output: 3047 These scalar-tensor config fields are defined but not wired into
In This differs from
Either way, add validation in 🤖 Prompt for AI Agents |
||
|
|
||
| class AnisotropyTOVConfig(BaseTOVConfig): | ||
| """Configuration for the post-TOV solver with beyond-GR corrections. | ||
|
|
||
|
|
@@ -71,8 +96,8 @@ class AnisotropyTOVConfig(BaseTOVConfig): | |
|
|
||
| type: Literal["anisotropy"] = "anisotropy" # type: ignore[override] # Literal["anisotropy"] ⊂ str | ||
|
|
||
|
|
||
| # TOVConfig is a discriminated union of all available TOV solver configs. | ||
| TOVConfig = Annotated[ | ||
| Union[GRTOVConfig, AnisotropyTOVConfig], | ||
| Union[GRTOVConfig, AnisotropyTOVConfig, ScalarTensorTOVConfig], | ||
| Discriminator("type"), | ||
| ] | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -21,6 +21,7 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SpectralEOSConfig, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| BaseTOVConfig, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GRTOVConfig, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ScalarTensorTOVConfig, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| AnisotropyTOVConfig, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| from jesterTOV.inference.likelihoods.constraints import check_all_constraints | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -283,12 +284,12 @@ def _create_tov_solver(config: BaseTOVConfig) -> TOVSolverBase: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| """ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if isinstance(config, GRTOVConfig): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return GRTOVSolver() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| elif isinstance(config, ScalarTensorTOVConfig): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| from jesterTOV.tov.scalar_tensor import ScalarTensorTOVSolver | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return ScalarTensorTOVSolver() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Scalar-tensor config values are dropped in this path.
One way to wire the config through def from_config(
cls,
eos_config: BaseEOSConfig,
tov_config: BaseTOVConfig,
keep_names: list[str] | None = None,
max_nbreak_nsat: float | None = None,
fixed_params: dict[str, float] | None = None,
) -> "JesterTransform":
@@
- # Create transform
+ effective_fixed_params = dict(fixed_params or {})
+ if isinstance(tov_config, ScalarTensorTOVConfig):
+ effective_fixed_params.setdefault("beta_ST", tov_config.beta_ST)
+ effective_fixed_params.setdefault("phi_inf_tgt", tov_config.phi_inf_tgt)
+ effective_fixed_params.setdefault("phi_c", tov_config.phi_c)
+
+ # Create transform
return cls(
eos=eos,
tov_solver=tov_solver,
keep_names=keep_names,
ndat_TOV=tov_config.ndat_TOV,
min_nsat_TOV=tov_config.min_nsat_TOV,
- fixed_params=fixed_params,
+ fixed_params=effective_fixed_params,
)📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| elif isinstance(config, AnisotropyTOVConfig): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| from jesterTOV.tov.anisotropy import AnisotropyTOVSolver | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return AnisotropyTOVSolver() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| raise ValueError(f"Unknown TOV solver type: {type(config).__name__}") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Does Slurm automatically create the parent directory for a#SBATCH--output path, or must that directory already exist before job submission?💡 Result:
Slurm does not create missing parent directories for
#SBATCH --output=...(or--error). The target directory must already exist and be writable at submit/run time; otherwise Slurm can’t open the file and the job will typically fail (often with an error like “No such file or directory”). (hpc-wiki.info)Citations:
Create the output directory or use a path that is guaranteed to exist.
Slurm does not automatically create missing parent directories for
#SBATCH --output. If./outdirdoes not exist before job submission, Slurm will fail to open the log file and the job will fail. Either create the directory before submission or place the log file in a location that is guaranteed to exist.Suggested change
📝 Committable suggestion
🤖 Prompt for AI Agents