Skip to content
Merged
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
2 changes: 0 additions & 2 deletions include/ConfigParser/config_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class ConfigParser
int verbose() const;
bool paraview() const;
int maxOpenMPThreads() const;
double threadReductionFactor() const;
bool DirBC_Interior() const;
StencilDistributionMethod stencilDistributionMethod() const;
bool cacheDensityProfileCoefficients() const;
Expand Down Expand Up @@ -68,7 +67,6 @@ class ConfigParser
bool paraview_;
// Parallelization and threading settings
int max_omp_threads_;
double thread_reduction_factor_;
// Numerical method setup
bool DirBC_Interior_;
StencilDistributionMethod stencil_distribution_method_;
Expand Down
8 changes: 1 addition & 7 deletions include/GMGPolar/gmgpolar.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,12 @@ class GMGPolar
void paraview(bool paraview);

/* ---------------------------------------------------------------------- */
/* Parallelization & threading */
/* Parallelization */
/* ---------------------------------------------------------------------- */
// Maximum number of OpenMP threads to use.
int maxOpenMPThreads() const;
void maxOpenMPThreads(int max_omp_threads);

// Thread reduction factor on coarser grids (e.g., 0.5 halves threads each level).
double threadReductionFactor() const;
void threadReductionFactor(double thread_reduction_factor);

/* ---------------------------------------------------------------------- */
/* Numerical method options */
/* ---------------------------------------------------------------------- */
Expand Down Expand Up @@ -208,7 +204,6 @@ class GMGPolar
bool paraview_;
// Parallelization and threading settings
int max_omp_threads_;
double thread_reduction_factor_;
// Numerical method setup
bool DirBC_Interior_;
StencilDistributionMethod stencil_distribution_method_;
Expand All @@ -234,7 +229,6 @@ class GMGPolar
/* Multigrid levels */
int number_of_levels_;
std::vector<Level> levels_;
std::vector<int> threads_per_level_;

/* ---------------------- */
/* Interpolation operator */
Expand Down
4 changes: 1 addition & 3 deletions scripts/comparison/run_gmgpolar_2.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ paraview=0
# OpenMP settings:
# Maximum number of threads OpenMP can use for parallel execution
maxOpenMPThreads=32
# Factor to reduce the number of threads OpenMP uses (e.g., 1.0 means no reduction)
threadReductionFactor=1.0

# Stencil distribution method:
# 0 - CPU "Take": Each node independently applies the stencil
Expand Down Expand Up @@ -138,4 +136,4 @@ else
exit 1
fi

./../../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads $maxOpenMPThreads --threadReductionFactor $threadReductionFactor --stencilDistributionMethod $stencilDistributionMethod --cacheDensityProfileCoefficients $cacheDensityProfileCoefficients --cacheDomainGeometry $cacheDomainGeometry --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --geometry $geometry --kappa_eps $kappa_eps --delta_e $delta_e --problem $problem --alpha_coeff $alpha_coeff --alpha_jump $alpha_jump --beta_coeff $beta_coeff --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance
./../../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads $maxOpenMPThreads --stencilDistributionMethod $stencilDistributionMethod --cacheDensityProfileCoefficients $cacheDensityProfileCoefficients --cacheDomainGeometry $cacheDomainGeometry --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --geometry $geometry --kappa_eps $kappa_eps --delta_e $delta_e --problem $problem --alpha_coeff $alpha_coeff --alpha_jump $alpha_jump --beta_coeff $beta_coeff --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance
14 changes: 6 additions & 8 deletions scripts/performance_likwid/start_likwid_benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ paraview=0
# OpenMP settings:
# Maximum number of threads OpenMP can use for parallel execution
maxOpenMPThreads=$cores # Iterate over 1:2:maxOpenMPThreads
# Factor to reduce the number of threads OpenMP uses (e.g., 1.0 means no reduction)
threadReductionFactor=1.0

# Stencil distribution method:
# 0 - CPU "Take": Each node independently applies the stencil
Expand Down Expand Up @@ -172,8 +170,8 @@ echo "for m in \${core_list[@]}; do" >> run_COMPACT_FLOPS_DP_likwid.sh
echo " let mminus1=m-1" >> run_COMPACT_FLOPS_DP_likwid.sh
echo ' output_file="data/COMPACT_FLOPS_DP_${m}.txt"' >> run_COMPACT_FLOPS_DP_likwid.sh
echo " # for testing that pin works correctly, potentially use likwid-pin beforehand" >> run_COMPACT_FLOPS_DP_likwid.sh
echo " # srun --cpus-per-task=$((cores)) likwid-pin -C E:N:\$m ./../../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads \$m --threadReductionFactor $threadReductionFactor --stencilDistributionMethod $stencilDistributionMethod --cacheDensityProfileCoefficients $cacheDensityProfileCoefficients --cacheDomainGeometry $cacheDomainGeometry --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --geometry $geometry --kappa_eps $kappa_eps --delta_e $delta_e --problem $problem --alpha_coeff $alpha_coeff --alpha_jump $alpha_jump --beta_coeff $beta_coeff --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance" >> run_COMPACT_FLOPS_DP_likwid.sh
echo " srun --cpus-per-task=$((cores)) likwid-perfctr -f -m -C E:N:\$m -g FLOPS_DP -o \$output_file ./../../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads \$m --threadReductionFactor $threadReductionFactor --stencilDistributionMethod $stencilDistributionMethod --cacheDensityProfileCoefficients $cacheDensityProfileCoefficients --cacheDomainGeometry $cacheDomainGeometry --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --geometry $geometry --kappa_eps $kappa_eps --delta_e $delta_e --problem $problem --alpha_coeff $alpha_coeff --alpha_jump $alpha_jump --beta_coeff $beta_coeff --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance" >> run_COMPACT_FLOPS_DP_likwid.sh
echo " # srun --cpus-per-task=$((cores)) likwid-pin -C E:N:\$m ./../../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads \$m --stencilDistributionMethod $stencilDistributionMethod --cacheDensityProfileCoefficients $cacheDensityProfileCoefficients --cacheDomainGeometry $cacheDomainGeometry --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --geometry $geometry --kappa_eps $kappa_eps --delta_e $delta_e --problem $problem --alpha_coeff $alpha_coeff --alpha_jump $alpha_jump --beta_coeff $beta_coeff --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance" >> run_COMPACT_FLOPS_DP_likwid.sh
echo " srun --cpus-per-task=$((cores)) likwid-perfctr -f -m -C E:N:\$m -g FLOPS_DP -o \$output_file ./../../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads \$m --stencilDistributionMethod $stencilDistributionMethod --cacheDensityProfileCoefficients $cacheDensityProfileCoefficients --cacheDomainGeometry $cacheDomainGeometry --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --geometry $geometry --kappa_eps $kappa_eps --delta_e $delta_e --problem $problem --alpha_coeff $alpha_coeff --alpha_jump $alpha_jump --beta_coeff $beta_coeff --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance" >> run_COMPACT_FLOPS_DP_likwid.sh
echo "done;" >> run_COMPACT_FLOPS_DP_likwid.sh
### ----------------------------------------- ###

Expand Down Expand Up @@ -205,8 +203,8 @@ echo "for m in \${core_list[@]}; do" >> run_COMPACT_MEM_DP_likwid.sh
echo " let mminus1=m-1" >> run_COMPACT_MEM_DP_likwid.sh
echo ' output_file="data/COMPACT_MEM_DP_${m}.txt"' >> run_COMPACT_MEM_DP_likwid.sh
echo " # for testing that pin works correctly, potentially use likwid-pin beforehand" >> run_COMPACT_MEM_DP_likwid.sh
echo " # srun --cpus-per-task=$((cores)) likwid-pin -C E:N:\$m ./../../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads \$m --threadReductionFactor $threadReductionFactor --stencilDistributionMethod $stencilDistributionMethod --cacheDensityProfileCoefficients $cacheDensityProfileCoefficients --cacheDomainGeometry $cacheDomainGeometry --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --geometry $geometry --kappa_eps $kappa_eps --delta_e $delta_e --problem $problem --alpha_coeff $alpha_coeff --alpha_jump $alpha_jump --beta_coeff $beta_coeff --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance" >> run_COMPACT_MEM_DP_likwid.sh
echo " srun --cpus-per-task=$((cores)) likwid-perfctr -f -m -C E:N:\$m -g MEM_DP -o \$output_file ./../../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads \$m --threadReductionFactor $threadReductionFactor --stencilDistributionMethod $stencilDistributionMethod --cacheDensityProfileCoefficients $cacheDensityProfileCoefficients --cacheDomainGeometry $cacheDomainGeometry --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --geometry $geometry --kappa_eps $kappa_eps --delta_e $delta_e --problem $problem --alpha_coeff $alpha_coeff --alpha_jump $alpha_jump --beta_coeff $beta_coeff --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance" >> run_COMPACT_MEM_DP_likwid.sh
echo " # srun --cpus-per-task=$((cores)) likwid-pin -C E:N:\$m ./../../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads \$m --stencilDistributionMethod $stencilDistributionMethod --cacheDensityProfileCoefficients $cacheDensityProfileCoefficients --cacheDomainGeometry $cacheDomainGeometry --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --geometry $geometry --kappa_eps $kappa_eps --delta_e $delta_e --problem $problem --alpha_coeff $alpha_coeff --alpha_jump $alpha_jump --beta_coeff $beta_coeff --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance" >> run_COMPACT_MEM_DP_likwid.sh
echo " srun --cpus-per-task=$((cores)) likwid-perfctr -f -m -C E:N:\$m -g MEM_DP -o \$output_file ./../../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads \$m --stencilDistributionMethod $stencilDistributionMethod --cacheDensityProfileCoefficients $cacheDensityProfileCoefficients --cacheDomainGeometry $cacheDomainGeometry --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --geometry $geometry --kappa_eps $kappa_eps --delta_e $delta_e --problem $problem --alpha_coeff $alpha_coeff --alpha_jump $alpha_jump --beta_coeff $beta_coeff --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance" >> run_COMPACT_MEM_DP_likwid.sh
echo "done;" >> run_COMPACT_MEM_DP_likwid.sh
### --------------------------------------- ###

Expand Down Expand Up @@ -250,7 +248,7 @@ for m in ${core_list[@]}; do
core_set=$(IFS=,; echo "${list[*]}")

output_file="data/SPREAD_FLOPS_DP_${m}.txt"
echo "srun --cpus-per-task=$((cores)) likwid-perfctr -f -m -C N:$core_set -g FLOPS_DP -o $output_file ./../../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads $m --threadReductionFactor $threadReductionFactor --stencilDistributionMethod $stencilDistributionMethod --cacheDensityProfileCoefficients $cacheDensityProfileCoefficients --cacheDomainGeometry $cacheDomainGeometry --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --geometry $geometry --kappa_eps $kappa_eps --delta_e $delta_e --problem $problem --alpha_coeff $alpha_coeff --alpha_jump $alpha_jump --beta_coeff $beta_coeff --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance" >> run_SPREAD_FLOPS_DP_likwid.sh
echo "srun --cpus-per-task=$((cores)) likwid-perfctr -f -m -C N:$core_set -g FLOPS_DP -o $output_file ./../../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads $m --stencilDistributionMethod $stencilDistributionMethod --cacheDensityProfileCoefficients $cacheDensityProfileCoefficients --cacheDomainGeometry $cacheDomainGeometry --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --geometry $geometry --kappa_eps $kappa_eps --delta_e $delta_e --problem $problem --alpha_coeff $alpha_coeff --alpha_jump $alpha_jump --beta_coeff $beta_coeff --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance" >> run_SPREAD_FLOPS_DP_likwid.sh
done
### --------------------------------- ###

Expand Down Expand Up @@ -293,7 +291,7 @@ for m in ${core_list[@]}; do
core_set=$(IFS=,; echo "${list[*]}")

output_file="data/SPREAD_MEM_DP_${m}.txt"
echo "srun --cpus-per-task=$((cores)) likwid-perfctr -f -m -C N:$core_set -g MEM_DP -o $output_file ./../../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads $m --threadReductionFactor $threadReductionFactor --stencilDistributionMethod $stencilDistributionMethod --cacheDensityProfileCoefficients $cacheDensityProfileCoefficients --cacheDomainGeometry $cacheDomainGeometry --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --geometry $geometry --kappa_eps $kappa_eps --delta_e $delta_e --problem $problem --alpha_coeff $alpha_coeff --alpha_jump $alpha_jump --beta_coeff $beta_coeff --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance" >> run_SPREAD_MEM_DP_likwid.sh
echo "srun --cpus-per-task=$((cores)) likwid-perfctr -f -m -C N:$core_set -g MEM_DP -o $output_file ./../../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads $m --stencilDistributionMethod $stencilDistributionMethod --cacheDensityProfileCoefficients $cacheDensityProfileCoefficients --cacheDomainGeometry $cacheDomainGeometry --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --geometry $geometry --kappa_eps $kappa_eps --delta_e $delta_e --problem $problem --alpha_coeff $alpha_coeff --alpha_jump $alpha_jump --beta_coeff $beta_coeff --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance" >> run_SPREAD_MEM_DP_likwid.sh
done
### ------------------------------- ###

Expand Down
3 changes: 0 additions & 3 deletions scripts/tutorial/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ paraview=0
# OpenMP settings:
# Maximum number of threads OpenMP can use for parallel execution
maxOpenMPThreads=32
# Factor to reduce the number of threads OpenMP uses (e.g., 1.0 means no reduction)
threadReductionFactor=1.0

# Stencil distribution method:
# 0 - CPU "Take": Each node independently applies the stencil
Expand Down Expand Up @@ -121,7 +119,6 @@ fi
--verbose $verbose \
--paraview $paraview \
--maxOpenMPThreads $maxOpenMPThreads \
--threadReductionFactor $threadReductionFactor \
--stencilDistributionMethod $stencilDistributionMethod \
--cacheDensityProfileCoefficients $cacheDensityProfileCoefficients \
--cacheDomainGeometry $cacheDomainGeometry \
Expand Down
Loading