Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ int P::writeRestartAsFloat = false;
string P::loadBalanceAlgorithm = string("");
std::map<std::string, std::string> P::loadBalanceOptions;
uint P::rebalanceInterval = numeric_limits<uint>::max();

int P::mapOrderShift=0;
vector<string> P::outputVariableList;
vector<string> P::diagnosticVariableList;

Expand Down Expand Up @@ -214,6 +214,7 @@ vector<string> P::blurPassString;
vector<int> P::numPasses;

bool P::artificialPADiff;
int P::seed;
Realf P::PADcoefficient;
Realf P::PADCFL;
int P::PADvbins;
Expand Down Expand Up @@ -245,6 +246,8 @@ bool P::addParameters() {
typedef Readparameters RP;
// the other default parameters we read through the add/get interface
RP::add("io.diagnostic_write_interval", "Write diagnostic output every arg time steps", numeric_limits<uint>::max());
RP::add("map_order_shift","shift the map_order seed",0);
RP::add("map_order.seed","Scalar multiplier for map_order in vlasovmover",579450);

RP::addComposing(
"io.system_write_t_interval",
Expand Down Expand Up @@ -608,6 +611,8 @@ bool P::addParameters() {
void Parameters::getParameters() {
typedef Readparameters RP;
// get numerical values of the parameters
RP::get("map_order_shift",P::mapOrderShift);
RP::get("map_order.seed",P::seed);
RP::get("io.diagnostic_write_interval", P::diagnosticInterval);
RP::get("io.diagnostic_write_all_data_reducers", P::diagnosticWriteAllDROs);
RP::get("io.system_write_t_interval", P::systemWriteTimeInterval);
Expand Down Expand Up @@ -640,6 +645,9 @@ void Parameters::getParameters() {
// Checks for validity of io and restart parameters
int myRank;
MPI_Comm_rank(MPI_COMM_WORLD, &myRank);
if (myRank==MASTER_RANK) {
std::cout << "mapOrderShift=" << P::mapOrderShift << std::endl;
}
const string prefix = string("./");
if (access(&(P::restartWritePath[0]), W_OK) != 0) {
if (myRank == MASTER_RANK) {
Expand Down
2 changes: 2 additions & 0 deletions parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ struct Parameters {
static bool refineOnRestart;
static bool forceRefinement;
static bool shouldFilter;
static int seed;
static bool useAlpha1;
static Real alpha1RefineThreshold;
static Real alpha1CoarsenThreshold;
Expand Down Expand Up @@ -231,6 +232,7 @@ struct Parameters {
static std::vector<Realf> amrBoxCenterY;
static std::vector<Realf> amrBoxCenterZ;
static std::vector<int> amrBoxMaxLevel;
static int mapOrderShift;
static bool amrTransShortPencils; /*!< Use short or long pencils in AMR translation.*/
static std::vector<std::string> blurPassString;
static std::vector<int> numPasses;
Expand Down
328 changes: 154 additions & 174 deletions testpackage/run_tests.sh

Large diffs are not rendered by default.

64 changes: 42 additions & 22 deletions testpackage/small_test_carrington.sh
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@
#!/bin/bash
#SBATCH -t 01:30:00 # Run time (hh:mm:ss)
#SBATCH --job-name=ctestpackage
#SBATCH -t 00:30:00 # Run time (hh:mm:ss)
#SBATCH --job-name=repeat_test_acc
##SBATCH -A spacephysics
#SBATCH --constraint="carrington"
#SBATCH --constraint="amd"
# test short medium 20min1d 3d
#SBATCH -p short
#SBATCH --exclusive
#SBATCH --nodes=1
#SBATCH -c 4 # CPU cores per task
#SBATCH -n 16 # number of tasks
#SBATCH --mem-per-cpu=5G
#SBATCH --hint=multithread
##SBATCH --nodes=1
#SBATCH -c 1 # CPU cores per task
#SBATCH -n 1 # number of tasks
#SBATCH --array=0-9
#SBATCH --mem=10G
#SBATCH --no-requeue
##SBATCH --hint=multithread

# If 1, the reference vlsv files are generated
# if 0 then we check the v1 against reference files
create_verification_files=0

# folder for all reference data
reference_dir="/turso/group/spacephysics/vlasiator/testpackage/"
reference_dir="/home/siclasse/"
mainfolder="/home/siclasse/vlasiator_hile/vlasiator/testpackage/"
cd $SLURM_SUBMIT_DIR

bin="/proj/USERNAME/BINARYNAME"
diffbin="/turso/group/spacephysics/vlasiator/testpackage/vlsvdiff_DP_carrington"
diffbin="../vlsvdiff_DP"

#compare agains which revision
#reference_revision="CI_reference"
reference_revision="current"
reference_revision="rng_ref2"

source ../modules/carrington_gcc_openmpi.sh
# export UCX_NET_DEVICES=eth5,mlx5_0:1 # This is important for multi-node performance!
module purge
module load GCC/13.2.0
module load OpenMPI/4.1.6-GCC-13.2.0
module load PMIx/4.2.6-GCCcore-13.2.0
module load PAPI/7.1.0-GCCcore-13.2.0
module load Boost/1.83.0-GCC-13.2.0
module load xthi
export UCX_TLS=dc_mlx5
export UCX_NET_DEVICES=mlx5_0:1

Expand All @@ -37,17 +44,16 @@ export OMPI_MCA_pml='ucx'
export OMPI_MCA_mtl='^ofi'
#Carrington has 2 x 16 cores per node, plus hyperthreading
ht=2
t=$SLURM_CPUS_PER_TASK
export OMP_NUM_THREADS=$t

# t=$SLURM_CPUS_PER_TASK
# export OMP_NUM_THREADS=$t
#command for running stuff
run_command="srun --mpi=pmix_v3 -n $SLURM_NTASKS "
small_run_command="srun --mpi=pmix_v3 -n 1"
run_command="mpirun -n 1 "
small_run_command="mpirun -n 1 "
run_command_tools="mpirun -np 1 "

umask 007
# Launch the OpenMP job to the allocated compute node
echo "Running $exec on $SLURM_NTASKS mpi tasks, with $t threads per task on $SLURM_NNODES nodes ($ht threads per physical core)"
# echo "Running $exec on $SLURM_NTASKS mpi tasks, with $t threads per task on $SLURM_NNODES nodes ($ht threads per physical core)"

# Optional debug printouts
# srun -np 1 /appl/bin/hostinfo
Expand All @@ -58,5 +64,19 @@ echo "Running $exec on $SLURM_NTASKS mpi tasks, with $t threads per task on $SLU
source test_definitions_small.sh
wait
# Run tests
source run_tests.sh
wait
jobcount=$(($SLURM_ARRAY_TASK_MAX - $SLURM_ARRAY_TASK_MIN + 1))
index=$(($SLURM_ARRAY_TASK_ID - $SLURM_ARRAY_TASK_MIN))

# echo $index $jobcount $SLURM_ARRAY_TASK_COUNT $SLURM_ARRAY_TASK_ID
# echo $index
for n in $(seq $(($index * 50)) $((($index + 1) * 50 - 1))); do
echo "N=$n"
bin="/home/siclasse/vlasiator_hile/vlasiator/vlasiator --map_order_shift $n"
source run_tests.sh

wait
# mv logfile.txt logfile_$n.txt
cd $mainfolder
# cd $SLURM_SUBMIT_DIR
wait
done
4 changes: 2 additions & 2 deletions testpackage/test_definitions_small.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ index=1

# 1 basic multipeak acceleration test (fixed timestep)
test_name[${index}]="acctest_1_maxw_500k_100k_20kms_10deg"
comparison_vlsv[${index}]="fullf.0000000.vlsv fullf.0000001.vlsv fullf.0000002.vlsv fullf.0000020.vlsv"
comparison_vlsv[${index}]="fullf.0000020.vlsv" # fullf.0000001.vlsv fullf.0000002.vlsv fullf.0000020.vlsv"
comparison_phiprof[${index}]="phiprof_0.txt"
variable_names[${index}]="proton/vg_rho proton/vg_v proton/vg_v proton/vg_v proton"
variable_components[${index}]="0 0 1 2"
Expand Down Expand Up @@ -268,4 +268,4 @@ do
done

# Alternatively, set tests manually, e.g.
# run_tests=( 1 6 9 )
run_tests=( 1 )
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ParticlePopulations = proton
diagnostic_write_interval = 1
write_initial_state = 0

system_write_t_interval = 180
system_write_t_interval = 3600
system_write_file_name = fullf
system_write_distribution_stride = 1
system_write_distribution_xline_stride = 0
Expand Down Expand Up @@ -43,7 +43,7 @@ y_min = 0.0
y_max = 1.0e6
z_min = 0
z_max = 1.0e6
t_max = 3600
t_max = 3601
dt = 10.0

[proton_properties]
Expand All @@ -58,9 +58,9 @@ vy_min = -2.0e6
vy_max = +2.0e6
vz_min = -2.0e6
vz_max = +2.0e6
vx_length = 50
vy_length = 50
vz_length = 50
vx_length = 100
vy_length = 100
vz_length = 100
[proton_sparse]
minValue = 1.0e-16

Expand All @@ -71,9 +71,12 @@ periodic_z = yes

[MultiPeak]
#magnitude of 1.82206867e-10 gives a period of 360s, useful for testing...
Bx = 1.2e-10
By = 0.8e-10
Bz = 1.1135233442526334e-10
# Bx = 1.2e-10
# By = 0.8e-10
# Bz = 1.1135233442526334e-10
Bx = 0
By = 0
Bz = 1.82206867e-10
magXPertAbsAmp = 0
magYPertAbsAmp = 0
magZPertAbsAmp = 0
Expand Down
Loading
Loading