9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-06-18 02:25:19 +02:00
qp2/src/utils/set_multiple_levels_omp.irp.f
2022-02-07 23:34:09 +01:00

27 lines
452 B
Fortran

subroutine set_multiple_levels_omp(activate)
BEGIN_DOC
! If true, activate OpenMP nested parallelism. If false, deactivate.
END_DOC
implicit none
logical, intent(in) :: activate
if (activate) then
call omp_set_max_active_levels(3)
IRP_IF SET_NESTED
call omp_set_nested(.True.)
IRP_ENDIF
else
call omp_set_max_active_levels(1)
IRP_IF SET_NESTED
call omp_set_nested(.False.)
IRP_ENDIF
end if
end