Dear all,
I am running a simulation using a PETSc-based application parallelized with
hybrid OpenMP+MPI on MareNostrum 5. According to the HPC support team, my
submission script is correctly configured regarding MPI and OpenMP resource
allocation. However, performance monitoring shows that the application is only
utilizing roughly 50% of the assigned resources. Do you have any suggestions on
what might be causing this underutilization, or where in the code I should
begin investigating (e.g., thread binding, PETSc stage timing, or MPI
communication)?
Thanks,
Miguel
****************************************************************************************************************************************************************
*** WIDEN YOUR WINDOW TO 160 CHARACTERS. Use
'enscript -r -fCourier9' to print this document
***
****************************************************************************************************************************************************************
------------------------------------------------------------------ PETSc
Performance Summary:
------------------------------------------------------------------
./exe-I-equilibrium on a named gs26r2b09 with 50 processes, by upm038904 on
Wed Oct 21 12:19:47 2026
Using 20 OpenMP threads
Using PETSc Release Version 3.24.1, Oct 29, 2025
Max Max/Min Avg Total
Time (sec): 1.573e+02 1.000 1.573e+02
Objects: 0.000e+00 0.000 0.000e+00
Flops: 1.209e+08 1.261 1.091e+08 5.457e+09
Flops/sec: 7.688e+05 1.261 6.938e+05 3.469e+07
MPI Msg Count: 8.876e+04 1.009 8.873e+04 4.436e+06
MPI Msg Len (bytes): 5.581e+08 1.137 5.984e+03 2.655e+10
MPI Reductions: 1.431e+04 1.000
Flop counting convention: 1 flop = 1 real number operation of type
(multiply/divide/add/subtract)
e.g., VecAXPY() for real vectors of length N --> 2N
flops
and VecAXPY() for complex vectors of length N -->
8N flops
Summary of Stages: ----- Time ------ ----- Flop ------ --- Messages --- --
Message Lengths -- -- Reductions --
Avg %Total Avg %Total Count %Total
Avg %Total Count %Total
0: Main Stage: 1.5732e+02 100.0% 5.4573e+09 100.0% 4.436e+06 100.0%
5.984e+03 100.0% 1.429e+04 99.9%
------------------------------------------------------------------------------------------------------------------------
See the 'Profiling' chapter of the users' manual for details on interpreting
output.
Phase summary info:
Count: number of times phase was executed
Time and Flop: Max - maximum over all processes
Ratio - ratio of maximum to minimum over all processes
Mess: number of messages sent
AvgLen: average message length (bytes)
Reduct: number of global reductions
Global: entire computation
Stage: stages of a computation. Set stages with PetscLogStagePush() and
PetscLogStagePop().
%T - percent time in this phase %F - percent flop in this phase
%M - percent messages in this phase %L - percent message lengths in
this phase
%R - percent reductions in this phase
Total Mflop/s: 1e-6 * (sum of flop over all processes)/(max time over all
processes)
------------------------------------------------------------------------------------------------------------------------
Event Count Time (sec) Flop
--- Global --- --- Stage ---- Total
Max Ratio Max Ratio Max Ratio Mess AvgLen Reduct
%T %F %M %L %R %T %F %M %L %R Mflop/s
------------------------------------------------------------------------------------------------------------------------
--- Event Stage 0: Main Stage
PetscBarrier 48 1.0 8.1199e+00 63.2 0.00e+00 0.0 0.0e+00 0.0e+00
0.0e+00 2 0 0 0 0 2 0 0 0 0 0
BuildTwoSided 1318 1.0 2.7291e-01 2.2 0.00e+00 0.0 1.0e+06 4.0e+00
1.3e+03 0 0 23 0 9 0 0 23 0 9 0
BuildTwoSidedF 197 1.0 3.1702e-02 3.3 0.00e+00 0.0 1.6e+05 1.0e+01
2.0e+02 0 0 4 0 1 0 0 4 0 1 0
SFSetGraph 1265 1.0 1.6077e-01 1.1 0.00e+00 0.0 0.0e+00 0.0e+00
0.0e+00 0 0 0 0 0 0 0 0 0 0 0
SFSetUp 1121 1.0 5.9560e-01 1.1 0.00e+00 0.0 1.9e+06 1.6e+03
1.1e+03 0 0 43 12 8 0 0 43 12 8 0
SFPack 2599 1.0 3.4171e-02 1.4 0.00e+00 0.0 0.0e+00 0.0e+00
0.0e+00 0 0 0 0 0 0 0 0 0 0 0
SFUnpack 2599 1.0 1.0961e-02 1.3 1.15e+07 1.2 0.0e+00 0.0e+00
0.0e+00 0 10 0 0 0 0 10 0 0 0 49277
VecDot 2449 1.0 8.6906e-02 1.2 3.89e+07 1.3 0.0e+00 0.0e+00
2.9e+03 0 32 0 0 20 0 32 0 0 20 20118
VecMDot 660 1.0 9.0758e-02 3.2 1.18e+07 1.3 0.0e+00 0.0e+00
8.8e+02 0 10 0 0 6 0 10 0 0 6 5848
VecAXPY 1249 1.0 6.0733e-03 1.6 2.34e+07 1.3 0.0e+00 0.0e+00
0.0e+00 0 19 0 0 0 0 19 0 0 0 172958
VecAYPX 266 1.0 2.5176e-03 1.6 2.40e+06 1.3 0.0e+00 0.0e+00
0.0e+00 0 2 0 0 0 0 2 0 0 0 42867
VecAXPBYCZ 133 1.0 1.7418e-03 1.6 4.80e+06 1.3 0.0e+00 0.0e+00
0.0e+00 0 4 0 0 0 0 4 0 0 0 123923
VecWAXPY 939 1.0 5.7304e-03 1.3 5.67e+06 1.3 0.0e+00 0.0e+00
0.0e+00 0 5 0 0 0 0 5 0 0 0 44459
VecMAXPY 197 1.0 1.2020e-02 7.0 3.47e+06 1.3 0.0e+00 0.0e+00
0.0e+00 0 3 0 0 0 0 3 0 0 0 12942
VecPointwiseMult 973 1.0 9.1238e-03 1.6 8.70e+06 1.3 0.0e+00 0.0e+00
0.0e+00 0 7 0 0 0 0 7 0 0 0 42859
VecReciprocal 415 1.0 1.2483e-02 1.5 0.00e+00 0.0 0.0e+00 0.0e+00
0.0e+00 0 0 0 0 0 0 0 0 0 0 0
VecScatterBegin 2599 1.0 1.1745e-01 1.3 0.00e+00 0.0 2.2e+06 8.2e+03
0.0e+00 0 0 50 68 0 0 0 50 68 0 0
VecScatterEnd 2599 1.0 3.3725e+01 20.8 1.15e+07 1.2 0.0e+00 0.0e+00
0.0e+00 11 10 0 0 0 11 10 0 0 0 16
VecNormalize 47 1.0 2.2233e-03 1.6 9.19e+05 1.3 0.0e+00 0.0e+00
4.7e+01 0 1 0 0 0 0 1 0 0 0 18551
MatSolve 175 1.0 2.9665e-02 1.1 3.52e+07 1.3 0.0e+00 0.0e+00
1.1e+03 0 29 0 0 7 0 29 0 0 7 53338
MatAssemblyBegin 197 1.0 3.2790e-02 3.0 0.00e+00 0.0 1.6e+05 1.0e+01
2.0e+02 0 0 4 0 1 0 0 4 0 1 0
MatAssemblyEnd 197 1.0 2.3293e-02 1.1 0.00e+00 0.0 1.6e+05 4.0e+00
7.9e+02 0 0 4 0 5 0 0 4 0 6 0
MatGetRowIJ 1 1.0 2.3930e-06 3.9 0.00e+00 0.0 0.0e+00 0.0e+00
0.0e+00 0 0 0 0 0 0 0 0 0 0 0
MatZeroEntries 168 1.0 9.6583e-05 1.9 0.00e+00 0.0 0.0e+00 0.0e+00
0.0e+00 0 0 0 0 0 0 0 0 0 0 0
MatFDColorCreate 1 1.0 2.9822e-05 3.2 0.00e+00 0.0 0.0e+00 0.0e+00
0.0e+00 0 0 0 0 0 0 0 0 0 0 0
MatFDColorSetUp 1 1.0 5.5088e-02 1.0 0.00e+00 0.0 0.0e+00 0.0e+00
4.0e+00 0 0 0 0 0 0 0 0 0 0 0
MatGetSeqNZStrct 1 1.0 2.8731e-04 1.4 0.00e+00 0.0 0.0e+00 0.0e+00
2.0e+00 0 0 0 0 0 0 0 0 0 0 0
MatColoringApply 1 1.0 5.0847e-04 1.1 0.00e+00 0.0 4.9e+01 4.0e+00
3.0e+00 0 0 0 0 0 0 0 0 0 0 0
DMLocatePoints 96 1.0 2.2299e-01 3.5 0.00e+00 0.0 0.0e+00 0.0e+00
1.9e+02 0 0 0 0 1 0 0 0 0 1 0
DMView 2 1.0 1.3770e-04 2.3 0.00e+00 0.0 0.0e+00 0.0e+00
2.0e+00 0 0 0 0 0 0 0 0 0 0 0
DMSwarmMigrate 96 1.0 1.0944e+00 1.2 0.00e+00 0.0 4.9e+05 1.1e+04
1.3e+03 1 0 11 20 9 1 0 11 20 9 0
DMSwarmDETSetup 96 1.0 5.4896e-02 1.0 0.00e+00 0.0 3.2e+05 7.0e+00
1.2e+03 0 0 7 0 8 0 0 7 0 8 0
DMSwarmDExBegin 96 1.0 9.6735e-03 2.3 0.00e+00 0.0 4.1e+04 6.5e+04
0.0e+00 0 0 1 10 0 0 0 1 10 0 0
DMSwarmDExEnd 96 1.0 1.8936e-01 3.1 0.00e+00 0.0 4.1e+04 6.5e+04
0.0e+00 0 0 1 10 0 0 0 1 10 0 0
DMSwarmDESendCnt 96 1.0 5.5979e-03 1.6 0.00e+00 0.0 0.0e+00 0.0e+00
0.0e+00 0 0 0 0 0 0 0 0 0 0 0
DMSwarmDEPack 96 1.0 8.1025e-02 1.1 0.00e+00 0.0 8.2e+04 4.0e+00
0.0e+00 0 0 2 0 0 0 0 2 0 0 0
DMSwarmAddPnts 48 1.0 3.8707e-02 1.2 0.00e+00 0.0 0.0e+00 0.0e+00
0.0e+00 0 0 0 0 0 0 0 0 0 0 0
DMSwarmRmvPnts 507060 1.1 5.9494e-01 1.3 0.00e+00 0.0 0.0e+00 0.0e+00
0.0e+00 0 0 0 0 0 0 0 0 0 0 0
DMSwarmSetSizes 2 1.0 1.6045e-02 1.5 0.00e+00 0.0 0.0e+00 0.0e+00
0.0e+00 0 0 0 0 0 0 0 0 0 0 0
PCSetUp 149 1.0 2.9903e-04 1.4 0.00e+00 0.0 0.0e+00 0.0e+00
0.0e+00 0 0 0 0 0 0 0 0 0 0 0
PCApply 175 1.0 1.7808e-03 1.5 1.50e+06 1.3 0.0e+00 0.0e+00
0.0e+00 0 1 0 0 0 0 1 0 0 0 37774
KSPSetUp 16 1.0 2.9542e-05 3.2 0.00e+00 0.0 0.0e+00 0.0e+00
0.0e+00 0 0 0 0 0 0 0 0 0 0 0
KSPSolve 175 1.0 7.6372e-03 1.2 1.50e+06 1.3 0.0e+00 0.0e+00
1.8e+02 0 1 0 0 1 0 1 0 0 1 8808
SNESSolve 3 1.0 9.6359e-01 1.0 6.16e+06 1.3 2.7e+05 4.7e+03
1.3e+03 1 5 6 5 9 1 5 6 5 9 289
SNESSetUp 3 1.0 7.5797e-04 1.1 0.00e+00 0.0 0.0e+00 0.0e+00
2.4e+01 0 0 0 0 0 0 0 0 0 0 0
SNESFunctionEval 96 1.0 9.4803e-01 1.0 1.89e+06 1.2 2.7e+05 4.7e+03
2.7e+02 1 2 6 5 2 1 2 6 5 2 91
SNESLineSearch 31 1.0 6.1669e-01 1.0 2.17e+06 1.3 1.8e+05 4.7e+03
4.5e+02 0 2 4 3 3 0 2 4 3 3 160
TaoSolve 113 1.0 3.8533e+01 1.0 1.08e+08 1.3 1.1e+06 9.1e+03
3.3e+03 24 89 24 37 23 24 89 24 37 23 126
TaoObjGradEval 316 1.0 3.8403e+01 1.0 1.69e+07 1.2 1.1e+06 9.1e+03
6.3e+02 24 14 24 37 4 24 14 24 37 4 20
TaoLSApply 175 1.0 2.1710e+01 1.0 2.07e+07 1.2 6.9e+05 1.0e+04
7.8e+02 14 17 16 27 5 14 17 16 27 5 43
LMProdsUpdate 133 1.0 3.9412e-03 1.4 2.40e+06 1.3 0.0e+00 0.0e+00
1.3e+02 0 2 0 0 1 0 2 0 0 1 27382
MatLMVMUpdate 175 1.0 5.2129e-02 1.1 3.84e+07 1.3 0.0e+00 0.0e+00
6.9e+02 0 32 0 0 5 0 32 0 0 5 33124
SymBrdnRescale 133 1.0 4.2289e-02 1.0 3.12e+07 1.3 0.0e+00 0.0e+00
5.3e+02 0 26 0 0 4 0 26 0 0 4 33176
------------------------------------------------------------------------------------------------------------------------
Object Type Creations Destructions. Reports information only for
process 0.
--- Event Stage 0: Main Stage
Container 5 5
Viewer 24 24
Star Forest Graph 1229 1229
Index Set 1079482 1079482
IS L to G Mapping 25 2
Application Order 1 1
Vector 3905 3905
Matrix 642 642
Matrix FD Coloring 1 1
Matrix Coloring 1 1
Matrix Null Space 47 47
Distributed Mesh 6 6
Swarm Cell DM 1 1
Discrete System 6 6
Weak Form 6 6
Preconditioner 176 176
Krylov Solver 176 176
SNES 3 3
DMSNES 3 3
SNESLineSearch 4 4
Tao 90 90
TaoLineSearch 68 68
========================================================================================================================
Average time to get PetscTime(): 2.7e-08
Average time for MPI_Barrier(): 1.18248e-05
Average time for zero size MPI_Send(): 2.34106e-06
#PETSc Option Table entries:
#End of PETSc Option Table entries
Compiled without FORTRAN kernels
Compiled with full precision matrices (default)
sizeof(short) 2 sizeof(int) 4 sizeof(long) 8 sizeof(void*) 8
sizeof(PetscScalar) 8 sizeof(PetscInt) 4
Configure options: --PETSC_DIR=/apps/GPP/PETSC/SRC/petsc-3.24.1-ompi-gcc-omp
--prefix=/apps/GPP/PETSC/3.24.1/GCC12.3/OPENMPI/double/
--with-petsc-arch=linux-x86_64-opt --with-debugging=0 --with-scalar-type=real
--with-precision=double --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpifort
CFLAGS= CXXFLAGS= FCFLAGS= --with-scalapack=yes --download-scalapack=yes
--with-shared-libraries=1 --with-mpi=1 --with-cuda=0 --with-openmp
--with-threadsafety --with-openmp-kernels
-----------------------------------------
Libraries compiled on 2026-03-19 13:39:31 on glogin4
Machine characteristics:
Linux-5.14.0-284.30.1.el9_2.x86_64-x86_64-with-glibc2.34
Using PETSc directory: /apps/GPP/PETSC/3.24.1/GCC12.3/OPENMPI/double
Using PETSc arch:
-----------------------------------------
Using C compiler: mpicc -fPIC -g -O -fopenmp
Using Fortran compiler: mpifort -fPIC -Wall -ffree-line-length-none
-ffree-line-length-0 -Wno-lto-type-mismatch -Wno-unused-dummy-argument -g -O
-fopenmp -fopenmp
-----------------------------------------
Using include paths: -I/apps/GPP/PETSC/3.24.1/GCC12.3/OPENMPI/double/include
-----------------------------------------
Using C linker: mpicc
Using Fortran linker: mpifort
Using libraries: -Wl,-rpath,/apps/GPP/PETSC/3.24.1/GCC12.3/OPENMPI/double/lib
-L/apps/GPP/PETSC/3.24.1/GCC12.3/OPENMPI/double/lib -lpetsc
-Wl,-rpath,/apps/GPP/PETSC/3.24.1/GCC12.3/OPENMPI/double/lib
-L/apps/GPP/PETSC/3.24.1/GCC12.3/OPENMPI/double/lib
-Wl,-rpath,/gpfs/apps/MN5/GPP/OPENMPI/4.1.6/GCC/lib
-L/gpfs/apps/MN5/GPP/OPENMPI/4.1.6/GCC/lib
-Wl,-rpath,/gpfs/apps/MN5/GPP/GCC/12.3.0/lib/gcc/x86_64-linux-gnu/12
-L/gpfs/apps/MN5/GPP/GCC/12.3.0/lib/gcc/x86_64-linux-gnu/12
-Wl,-rpath,/gpfs/apps/MN5/GPP/GCC/12.3.0/lib/gcc
-L/gpfs/apps/MN5/GPP/GCC/12.3.0/lib/gcc
-Wl,-rpath,/apps/GPP/LAPACK/3.12.1/GCC/lib64
-L/apps/GPP/LAPACK/3.12.1/GCC/lib64 -Wl,-rpath,/apps/GPP/GCC/12.3.0/lib64
-L/apps/GPP/GCC/12.3.0/lib64 -Wl,-rpath,/gpfs/apps/MN5/GPP/GCC/12.3.0/lib64
-L/gpfs/apps/MN5/GPP/GCC/12.3.0/lib64 -Wl,-rpath,/apps/GPP/UCX/1.16.0/GCC/lib
-L/apps/GPP/UCX/1.16.0/GCC/lib -Wl,-rpath,/apps/GPP/GCC/12.3.0/lib
-L/apps/GPP/GCC/12.3.0/lib -Wl,-rpath,/gpfs/apps/MN5/GPP/GCC/12.3.0/lib
-L/gpfs/apps/MN5/GPP/GCC/12.3.0/lib -lscalapack -llapack -lblas -lm -lX11
-lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lm
-lgfortran -lm -lgcc_s -lquadmath -lstdc++ -lquadmath
-----------------------------------------