Skip to content

Commit

Permalink
new modif
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaetan Facchinetti ([email protected]) committed Nov 7, 2024
1 parent 9049b30 commit eb8bcb0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/py21cmcast/runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,11 @@ def generate_slurm_script(job_name, nruns, output_dir, random_seed: int = None,
print("#!/bin/bash", file = file)
print("#", file = file)
print("#SBATCH --job-name=" + job_name.upper(), file = file)
print("#SBATCH --output=" + job_name.upper() + "log_%a.txt", file = file)
print("#SBATCH --output=" + job_name.upper() + "_log_%a.txt", file = file)
print("#", file = file)
print("#SBATCH --ntasks=1", file = file)
print("#SBATCH --cpus-per-task=8", file = file)
print("#SBATCH --time=02:00:00", file = file)
print("#SBATCH --time=01:30:00", file = file)
print("#SBATCH --mem=15000", file = file)
print("#", file = file)

Expand All @@ -283,7 +283,7 @@ def generate_slurm_script(job_name, nruns, output_dir, random_seed: int = None,

print("", file = file)
print("export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK", file = file)
print("FILES=(" + os.path.join(output_dir, job_name.upper() + "/*.config") + ")", file = file)
print("FILES=(" + os.path.join(os.path.abspath(output_dir), job_name.upper() + "/*.config") + ")", file = file)

print("", file = file)
print("srun python " + os.path.join(current_dir, "../21cmCAST/examples/run_lightcone.py") + " ${FILES[$SLURM_ARRAY_TASK_ID]} -nomp $SLURM_CPUS_PER_TASK -rs " + str(random_seed), file = file)
Expand Down

0 comments on commit eb8bcb0

Please sign in to comment.