WIP: introducing separate module for parallelization

This commit is contained in:
Martin Diehl 2020-09-12 16:06:33 +02:00
parent 3f9e9a120a
commit a46b888cff
5 changed files with 39 additions and 3 deletions

View File

@ -75,7 +75,6 @@ contains
subroutine CPFEM_initAll
call DAMASK_interface_init
call prec_init
call IO_init
call config_init
call math_init

View File

@ -41,7 +41,6 @@ contains
subroutine CPFEM_initAll
call DAMASK_interface_init ! Spectral and FEM interface to commandline
call prec_init
call IO_init
call base64_init
#ifdef Mesh

View File

@ -19,6 +19,7 @@ module DAMASK_interface
use PETScSys
use prec
use parallelization
use system_routines
implicit none
@ -268,6 +269,8 @@ subroutine DAMASK_interface_init
call setSIGUSR1(.false.)
call setSIGUSR2(.false.)
call prec_init
call parallelization_init
end subroutine DAMASK_interface_init

View File

@ -26,6 +26,7 @@
#define PASTE(x,y) x ## y
#include "prec.f90"
#include "parallelization.f90"
module DAMASK_interface
use prec
@ -90,6 +91,9 @@ subroutine DAMASK_interface_init
endif
symmetricSolver = solverIsSymmetric()
call prec_init
call parallelization_init
end subroutine DAMASK_interface_init

31
src/parallelization.f90 Normal file
View File

@ -0,0 +1,31 @@
!--------------------------------------------------------------------------------------------------
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
!> @brief Inquires variables related to parallelization (openMP, MPI)
!--------------------------------------------------------------------------------------------------
module parallelization
use prec
#ifdef PETSc
#include <petsc/finclude/petscsys.h>
use petscsys
#endif
!$ use OMP_LIB
implicit none
private
public :: &
parallelization_init
contains
!--------------------------------------------------------------------------------------------------
!> @brief calls subroutines that reads material, numerics and debug configuration files
!--------------------------------------------------------------------------------------------------
subroutine parallelization_init
write(6,'(/,a)') ' <<<+- parallelization init -+>>>'; flush(6)
end subroutine parallelization_init
end module parallelization