external statements will not work if interfaces exist

we're currently providing a patch for PETSc with interfaces for all
functions that we use
This commit is contained in:
Martin Diehl 2018-09-21 08:25:35 +02:00
parent ff241ae4a6
commit 180105d3ce
11 changed files with 2 additions and 63 deletions

View File

@ -118,11 +118,8 @@ program DAMASK_FEM
external :: &
MPI_abort, &
DMGetDimension, &
DMGetLabelSize, &
DMGetLabelIdIS, &
ISDestroy, &
quit
!--------------------------------------------------------------------------------------------------
! init DAMASK (all modules)
call CPFEM_initAll(el = 1_pInt, ip = 1_pInt)

View File

@ -88,9 +88,7 @@ subroutine DAMASK_interface_init()
dateAndTime ! type default integer
PetscErrorCode :: ierr
external :: &
quit,&
PETScErrorF, & ! is called in the CHKERRQ macro
PETScInitialize
quit
open(6, encoding='UTF-8') ! for special characters in output

View File

@ -151,7 +151,6 @@ program DAMASK_spectral
external :: &
quit
!--------------------------------------------------------------------------------------------------
! init DAMASK (all modules)
call CPFEM_initAll(el = 1_pInt, ip = 1_pInt)
@ -659,9 +658,6 @@ subroutine quit(stop_id)
PetscErrorCode :: ierr = 0
logical :: ErrorInQuit
external :: &
PETScFinalize
call PETScFinalize(ierr)
if (ierr /= 0) write(6,'(a)') ' Error in PETScFinalize'
#ifdef _OPENMP

View File

@ -62,7 +62,6 @@ module FEM_mech
FEM_mech_solution ,&
FEM_mech_forward, &
FEM_mech_destroy
external :: PETScerrorf
contains
!--------------------------------------------------------------------------------------------------

View File

@ -121,7 +121,6 @@ use PETScis
COMPONENT_MECH_Z_ID, &
COMPONENT_THERMAL_T_ID
external :: PETScErrorF
contains
!--------------------------------------------------------------------------------------------------

View File

@ -192,8 +192,6 @@ subroutine numerics_init
tag ,&
line
!$ character(len=6) DAMASK_NumThreadsString ! environment variable DAMASK_NUM_THREADS
external :: &
PETScErrorF ! is called in the CHKERRQ macro
#ifdef PETSc
call MPI_Comm_rank(PETSC_COMM_WORLD,worldrank,ierr);CHKERRQ(ierr)

View File

@ -50,8 +50,6 @@ module spectral_damage
spectral_damage_init, &
spectral_damage_solution, &
spectral_damage_forward
external :: &
PETScErrorF ! is called in the CHKERRQ macro
contains
@ -85,11 +83,6 @@ subroutine spectral_damage_init()
Vec :: uBound, lBound
PetscErrorCode :: ierr
character(len=100) :: snes_type
external :: &
SNESSetOptionsPrefix, &
SNESGetType, &
DMDAGetCorners, &
DMDASNESSetFunctionLocal
write(6,'(/,a)') ' <<<+- spectral_damage init -+>>>'
write(6,'(/,a)') ' Shanthraj et al., Handbook of Mechanics of Materials, volume in press, '
@ -194,11 +187,6 @@ type(tSolutionState) function spectral_damage_solution(timeinc,timeinc_old,loadC
PetscErrorCode :: ierr
SNESConvergedReason :: reason
external :: &
VecMin, &
VecMax, &
SNESSolve
spectral_damage_solution%converged =.false.
!--------------------------------------------------------------------------------------------------

View File

@ -66,8 +66,6 @@ module spectral_mech_basic
basic_init, &
basic_solution, &
basic_forward
external :: &
PETScErrorF ! is called in the CHKERRQ macro
contains
@ -119,11 +117,6 @@ subroutine basic_init
integer(pInt) :: proc
character(len=1024) :: rankStr
external :: &
SNESSetOptionsPrefix, &
SNESSetConvergenceTest, &
DMDASNESSetFunctionLocal
write(6,'(/,a)') ' <<<+- DAMASK_spectral_solverBasic init -+>>>'
write(6,'(/,a)') ' Shanthraj et al., International Journal of Plasticity, 66:3145, 2015'
write(6,'(a,/)') ' https://doi.org/10.1016/j.ijplas.2014.02.006'
@ -246,9 +239,6 @@ type(tSolutionState) function basic_solution(incInfoIn,timeinc,timeinc_old,stres
PetscErrorCode :: ierr
SNESConvergedReason :: reason
external :: &
SNESsolve
incInfo = incInfoIn
!--------------------------------------------------------------------------------------------------

View File

@ -73,8 +73,6 @@ module spectral_mech_Polarisation
Polarisation_init, &
Polarisation_solution, &
Polarisation_forward
external :: &
PETScErrorF ! is called in the CHKERRQ macro
contains
@ -130,11 +128,6 @@ subroutine Polarisation_init
integer(pInt) :: proc
character(len=1024) :: rankStr
external :: &
SNESSetOptionsPrefix, &
SNESSetConvergenceTest, &
DMDASNESsetFunctionLocal
write(6,'(/,a)') ' <<<+- DAMASK_spectral_solverPolarisation init -+>>>'
write(6,'(/,a)') ' Shanthraj et al., International Journal of Plasticity, 66:3145, 2015'
write(6,'(a,/)') ' https://doi.org/10.1016/j.ijplas.2014.02.006'
@ -272,9 +265,6 @@ type(tSolutionState) function Polarisation_solution(incInfoIn,timeinc,timeinc_ol
PetscErrorCode :: ierr
SNESConvergedReason :: reason
external :: &
SNESSolve
incInfo = incInfoIn
!--------------------------------------------------------------------------------------------------

View File

@ -50,8 +50,6 @@ module spectral_thermal
spectral_thermal_init, &
spectral_thermal_solution, &
spectral_thermal_forward
external :: &
PETScErrorF ! is called in the CHKERRQ macro
contains
@ -88,11 +86,6 @@ subroutine spectral_thermal_init
PetscScalar, dimension(:,:,:), pointer :: x_scal
PetscErrorCode :: ierr
external :: &
SNESsetOptionsPrefix, &
DMDAgetCorners, &
DMDASNESsetFunctionLocal
write(6,'(/,a)') ' <<<+- spectral_thermal init -+>>>'
write(6,'(/,a)') ' Shanthraj et al., Handbook of Mechanics of Materials, volume in press,'
write(6,'(/,a)') ' chapter Spectral Solvers for Crystal Plasticity and Multi-Physics Simulations. Springer, 2018'
@ -196,11 +189,6 @@ type(tSolutionState) function spectral_thermal_solution(timeinc,timeinc_old,load
PetscErrorCode :: ierr
SNESConvergedReason :: reason
external :: &
VecMin, &
VecMax, &
SNESSolve
spectral_thermal_solution%converged =.false.
!--------------------------------------------------------------------------------------------------

View File

@ -146,8 +146,6 @@ module spectral_utilities
FIELD_DAMAGE_ID
private :: &
utilities_getFreqDerivative
external :: &
PETScErrorF ! is called in the CHKERRQ macro
contains
@ -209,8 +207,6 @@ subroutine utilities_init()
scalarSize = 1_C_INTPTR_T, &
vecSize = 3_C_INTPTR_T, &
tensorSize = 9_C_INTPTR_T
external :: &
PetscOptionsInsertString
write(6,'(/,a)') ' <<<+- spectral_utilities init -+>>>'
write(6,'(/,a)') ' Eisenlohr et al., International Journal of Plasticity, 46:3753, 2013'