On Fri, Oct 23, 2026 at 10:10 AM Miguel Molinos <[email protected]> wrote:

> My guess is: right now OpenMP is used just for the RHS assembly, and
> perhaps this part is cheap compared to the other stages of the solution
> process such internal interactions of gmres, vector multiplications,...
>

I think that is likely not true. However, there needs to be a methodology
to asses this.

First, you need to establish what the performance bottleneck is. I will bet
everything that I own that you are
limited by memory bandwidth. All the operations you describe above (stencil
computation, vector operators, sparse matrix multiplication) are
bandwidth limited.

Second, you want to be clear about what you are trying to understand. It
appears you want to understand the flop rate. For this you can use a
roofline analysis. You take the bandwidth and the arithmetic intensity of
the algorithm, and you can predict the flop rate with high accuracy.

Third, there are implications of identifying the the bottleneck. Once you
have saturated the memory bandwidth on a node, adding more
threads/processes will not produce any speedup (and sometimes a little
slowdown due to contention). You can see how many threads it takes to do
this by running STREAMS (in PETSc this is 'make streams'). I suspect that
very few of the OpenMP threads are doing anything useful because memory
bandwidth is already saturated.

  Thanks,

      Matt


> Miguel
>
> On Oct 23, 2026, at 4:03 PM, Matthew Knepley <[email protected]> wrote:
>
> On Fri, Oct 23, 2026 at 9:25 AM Miguel Molinos <[email protected]> wrote:
>
>> Hi Matt,
>>
>> MareNostrum is based on SLURM too. I think the problem is not in the
>> resource allocation, but in the code itself.
>>
>
> Okay, you asked for 50 tasks, so you got exactly what you asked for from
> MPI. I am guessing that you also got the number of OpenMP threads that you
> asked for. Why do think think something went wrong?
>
>   Thanks,
>
>      Matt
>
>
>> Miguel
>>
>> #!/bin/bash
>>
>> # Nombre del trabajo
>> #SBATCH --job-name=Bicrystal-FeHx-S5-310-001
>>
>> # Directorio de trabajo
>> #SBATCH --chdir=.
>>
>> # Archivo de salida
>> #SBATCH --output=batch-%x-%j.out
>>
>> # Archivo de errores
>> #SBATCH --error=batch-%x-%j.err
>>
>> # Partición a utilizar
>> #SBATCH --partition=standard
>>
>> # Tiempo máximo de ejecución (horas:minutos:segundos)
>> #SBATCH --time=24:00:00
>>
>> # Número total de tareas MPI
>> #SBATCH —ntasks=50
>>
>> # Número máximo de CPUs por task
>> #SBATCH --cpus-per-task=20
>>
>> On Oct 23, 2026, at 3:05 PM, Matthew Knepley <[email protected]> wrote:
>>
>> SLURM
>>
>>
>>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
> https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!f8sDByUyOdA93Po7wUULGhCZ_fxB-TUC1GcilNHAmjyj9uBEij6vchhIR8EiNUVlbTaPRL2DSJfIowTs5SU0$
>  
> <https://urldefense.com/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!D9dNQwwGXtA!WAriVjoktYxUyxk1eJ27HLZQ09P7D7XHOFxJMTI6SVXSSp1X3uac9_nvDLdC2WC6rZHgcb2dg_KHazY$
>  >
>
>
>

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!f8sDByUyOdA93Po7wUULGhCZ_fxB-TUC1GcilNHAmjyj9uBEij6vchhIR8EiNUVlbTaPRL2DSJfIowTs5SU0$
  
<https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!f8sDByUyOdA93Po7wUULGhCZ_fxB-TUC1GcilNHAmjyj9uBEij6vchhIR8EiNUVlbTaPRL2DSJfIo67n7FFa$
 >

Reply via email to