Skip to content
Snippets Groups Projects
Commit 4a3e2165 authored by Antoine Cyril David Hoffmann's avatar Antoine Cyril David Hoffmann :seedling:
Browse files

Include a folder for saving useful scripts

parent 08fa3efb
No related branches found
No related tags found
No related merge requests found
......@@ -41,4 +41,5 @@ Gallery/
.vscode/settings.json
*figure*
*results*
out*
out*
!scripts/*
&BASIC
nrun = 100000000
dt = 0.01
tmax = 500
maxruntime = 60 ! 1h 14400 !4h
/
&GRID
pmaxe = 6
jmaxe = 3
pmaxi = 6
jmaxi = 3
Nx = 200
Lx = 120
Ny = 32
Ly = 60
Nz = 1
SG = .f.
/
&GEOMETRY
geom = 'Z-pinch'
q0 = 0
shear = 0
eps = 0
/
&OUTPUT_PAR
nsave_0d = 10
nsave_1d = -1
nsave_2d = -1
nsave_3d = 100
nsave_5d = 10000
write_doubleprecision = .t.
write_gamma = .t.
write_hf = .t.
write_phi = .t.
write_Na00 = .t.
write_Napj = .t.
write_Sapj = .f.
write_dens = .t.
write_temp = .t.
job2load = -1
/
&MODEL_PAR
! Collisionality
CLOS = 0
NL_CLOS = 0
LINEARITY = 'nonlinear'
KIN_E = .t.
mu_x = 1.0
mu_y = 1.0
N_HD = 4
mu_z = 0.0
mu_p = 0
mu_j = 0
nu = 0.01
tau_e = 1
tau_i = 1
sigma_e = 0.023338
sigma_i = 1
q_e = -1
q_i = 1
K_Ne = 1.7
K_Ni = 1.7
K_Te = 0.425
K_Ti = 0.425
GradB = 1
CurvB = 1
lambdaD = 0
/
&COLLISION_PAR
collision_model = 'LD'
gyrokin_CO = .true.
interspecies = .true.
mat_file = 'LDGK_P10_J5_dk_5e-2_km_5_NFLR_30.h5'
collision_kcut = 1.8
/
&INITIAL_CON
INIT_OPT = 'phi'
ACT_ON_MODES = 'donothing'
init_background = 0
init_noiselvl = 0.001
iseed = 42
/
&TIME_INTEGRATION_PAR
numerical_scheme = 'RK4'
/
#! /bin/bash
#This script automatizes the launch of multiple job with chain dependency.
nu_=0.01
dnu=0.01
Tm_=2000
dTm=2000
# First submit
lastji=$(sbatch submit_00.cmd)
lastjid=${lastji##* }
echo $lastji
#echo $lastjid
for i in {1..1}; do
# Setup indices of job id (current and previous one)
im1=$(awk "BEGIN {print $i-1}")
idm1=$(printf '%02d' $im1)
id=$(printf '%02d' $i)
# Create new submit file from older one
awk -v "ID=$id" '{
if (NR == 8) print "#SBATCH --error=err_"ID".txt";
else if (NR == 9) print "#SBATCH --output=out_"ID".txt";
else if (NR == 12) print "srun --cpu-bind=cores ./gyacomo 2 24 1 "ID;
else print $0}' submit_$idm1.cmd > submit_$id.cmd
# Create new fort file from older one
awk -v "NU=$nu_" -v "TM=$Tm_" -v "J2L=$im1" '{
if (NR == 04) print " tmax = "TM;
else if (NR == 40) print " job2load = "J2L;
else if (NR == 54) print " nu = "NU;
else print $0}' fort_$idm1.90 > fort_$id.90
# Retrieve last jobid and launch next job with dep
lastji=$(sbatch --dependency=afterok:$lastjid submit_0$i.cmd)
lastjid=${lastji##* }
echo $lastjid
# Increment variables
nu_=$(awk "BEGIN {print $nu_+$dnu}")
Tm_=$(awk "BEGIN {print $Tm_+$dTm}")
done
#!/bin/bash
#SBATCH --job-name=test_pipe
#SBATCH --time=00:02:00
#SBATCH --nodes=1
#SBATCH --cpus-per-task=1
#SBATCH --ntasks-per-node=48
#SBATCH --mem=64GB
#SBATCH --error=err_00.txt
#SBATCH --output=out_00.txt
#SBATCH --account=FUA36_TSVVT422
#SBATCH --partition=skl_fua_dbg
srun --cpu-bind=cores ./gyacomo 2 24 1 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment