OpenMP parallelized assembly
-
Feature description was added to the changelog -
Tests covering your feature were added? -
Any new feature or behavior change was documented?
- implemented for
- TH2M, TRM (via
AssemblyMixin
) - TRF (directly)
- further processes will follow in the future
- TH2M, TRM (via
- controlled by environment variable
OGS_ASM_THREADS
, not byOMP_NUM_THREADS
!
Roll out to other processes
AssemblyMixin
(preferred)
Option 1 – Use - also enables submesh residuum output
Option 2
...Process.h
In the +#include "ProcessLib/Assembly/ParallelVectorMatrixAssembler.h"
...
+ Assembly::ParallelVectorMatrixAssembler _pvma{*_jacobian_assembler};
- could also be pulled up to the generic
Process.h
/base classProcess
...Process.cpp
In the - GlobalExecutor::executeSelectedMemberDereferenced(
- _global_assembler, &VectorMatrixAssembler::assembleWithJacobian,
- _local_assemblers, pv.getActiveElementIDs(), dof_tables, t, dt, x, xdot,
- process_id, M, K, b, Jac);
+ _pvma.assembleWithJacobian(_local_assemblers, pv.getActiveElementIDs(),
+ dof_tables, t, dt, x, xdot, process_id, M, K, b,
+ Jac);
Edited by Dmitry Yu. Naumov