Skip to content

Commit

Permalink
Make script more helpful
Browse files Browse the repository at this point in the history
  • Loading branch information
skailasa committed Oct 24, 2024
1 parent c854a2d commit a062d31
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions hpc/archer2/grid_search.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ export SRUN_CPUS_PER_TASK=$SLURM_CPUS_PER_TASK
n_points=1000000 # points per MPI process
n_tasks=8
global_depth=1 # Number of local roots matches the number of MPI processes, therefore the number of NUMA regions
local_depth=(3 4 5 6)
n_samples=(100 1000 5000)
block_size=(16 32 64 128 256)
n_threads=(2 4 8 16) # See if bandwidth saturates with different threading parameters for Rayon thread pool
local_depth=(5 6)
n_samples=(100 1000)
block_size=(128 256)
n_threads=(2 16) # See if bandwidth saturates with different threading parameters for Rayon thread pool
export OMP_NUM_THREADS=1 # Need to set to 1 to avoid oversubsciption between Rayon and OpenMP

# Create a CSV output file for analysis
Expand All @@ -60,23 +60,27 @@ echo "
runtime, p2m, m2m, l2l, m2l, p2p, \
source_tree, target_tree, source_domain, target_domain, layout, \
ghost_exchange_v, ghost_exchange_u, gather_global_fmm, scatter_global_fmm, \
source_to_target_data, source_data, target_data, global_fmm, ghost_fmm_v, ghost_fmm_u
source_to_target_data, source_data, target_data, global_fmm, ghost_fmm_v, ghost_fmm_u \
n_points, n_tasks, global_depth, local_depth, n_samples, block_size, n_threads
" >> ${OUTPUT}

# Perform grid search
for i in ${!local_depth[@]}; do
for j in ${!n_samples[@]}; do
for k in ${!block_size[@]}; do
for l in ${!n_threads[@]}; do
srun --ntasks=$n_tasks --cpus-per-task=16 --distribution=block:block --hint=nomultithread \

runtime_output=$(srun --ntasks=$n_tasks --cpus-per-task=16 --distribution=block:block --hint=nomultithread \
${WORK}/grid_search_mpi --n-points $n_points \
--expansion-order 3 \
--prune-empty \
--global-depth $global_depth \
--local-depth ${local_depth[$i]} \
--n-samples ${n_samples[$j]} \
--block-size ${block_size[$k]} \
--n-threads ${n_threads[$l]} >> ${OUTPUT}
--n-threads ${n_threads[$l]})

echo "$runtime_output, $n_points, $n_tasks, $global_depth, ${local_depth[$i]}, ${n_samples[$j]}, ${block_size[$k]}, ${n_threads[$l]}" >> ${OUTPUT}
done
done
done
Expand Down

0 comments on commit a062d31

Please sign in to comment.