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
Option 1 – Use AssemblyMixin (preferred)
- also enables submesh residuum output
Option 2
In the ...Process.h
+#include "ProcessLib/Assembly/ParallelVectorMatrixAssembler.h"
...
+ Assembly::ParallelVectorMatrixAssembler _pvma{*_jacobian_assembler};
- could also be pulled up to the generic
Process.h/base classProcess
In the ...Process.cpp
- 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 Dmitri Naumov