destroying unused object causes problem with PETSc 3.9
not clear, why destroying at the end of the program is anyway needed, so removed it
This commit is contained in:
parent
3e476e6775
commit
5187ee25b6
|
@ -72,7 +72,6 @@ program DAMASK_spectral
|
||||||
DAMAGE_nonlocal_ID
|
DAMAGE_nonlocal_ID
|
||||||
use spectral_utilities, only: &
|
use spectral_utilities, only: &
|
||||||
utilities_init, &
|
utilities_init, &
|
||||||
utilities_destroy, &
|
|
||||||
tSolutionState, &
|
tSolutionState, &
|
||||||
tLoadCase, &
|
tLoadCase, &
|
||||||
cutBack, &
|
cutBack, &
|
||||||
|
@ -673,23 +672,12 @@ end program DAMASK_spectral
|
||||||
!> stderr. Exit code 3 signals no severe problems, but some increments did not converge
|
!> stderr. Exit code 3 signals no severe problems, but some increments did not converge
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine quit(stop_id)
|
subroutine quit(stop_id)
|
||||||
|
#include <petsc/finclude/petscsys.h>
|
||||||
use MPI
|
use MPI
|
||||||
use prec, only: &
|
use prec, only: &
|
||||||
pInt
|
pInt
|
||||||
use spectral_mech_Basic, only: &
|
|
||||||
BasicPETSC_destroy
|
|
||||||
use spectral_mech_Polarisation, only: &
|
|
||||||
Polarisation_destroy
|
|
||||||
use spectral_damage, only: &
|
|
||||||
spectral_damage_destroy
|
|
||||||
use spectral_thermal, only: &
|
|
||||||
spectral_thermal_destroy
|
|
||||||
use spectral_utilities, only: &
|
|
||||||
utilities_destroy
|
|
||||||
|
|
||||||
implicit none
|
|
||||||
|
|
||||||
#include <petsc/finclude/petscsys.h>
|
implicit none
|
||||||
integer(pInt), intent(in) :: stop_id
|
integer(pInt), intent(in) :: stop_id
|
||||||
integer, dimension(8) :: dateAndTime ! type default integer
|
integer, dimension(8) :: dateAndTime ! type default integer
|
||||||
integer(pInt) :: error = 0_pInt
|
integer(pInt) :: error = 0_pInt
|
||||||
|
@ -699,12 +687,6 @@ subroutine quit(stop_id)
|
||||||
external :: &
|
external :: &
|
||||||
PETScFinalize
|
PETScFinalize
|
||||||
|
|
||||||
call BasicPETSC_destroy()
|
|
||||||
call Polarisation_destroy()
|
|
||||||
call spectral_damage_destroy()
|
|
||||||
call spectral_thermal_destroy()
|
|
||||||
call utilities_destroy()
|
|
||||||
|
|
||||||
call PETScFinalize(ierr)
|
call PETScFinalize(ierr)
|
||||||
if (ierr /= 0) write(6,'(a)') ' Error in PETScFinalize'
|
if (ierr /= 0) write(6,'(a)') ' Error in PETScFinalize'
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
|
|
|
@ -49,8 +49,7 @@ module spectral_damage
|
||||||
public :: &
|
public :: &
|
||||||
spectral_damage_init, &
|
spectral_damage_init, &
|
||||||
spectral_damage_solution, &
|
spectral_damage_solution, &
|
||||||
spectral_damage_forward, &
|
spectral_damage_forward
|
||||||
spectral_damage_destroy
|
|
||||||
external :: &
|
external :: &
|
||||||
PETScErrorF ! is called in the CHKERRQ macro
|
PETScErrorF ! is called in the CHKERRQ macro
|
||||||
|
|
||||||
|
@ -383,19 +382,6 @@ subroutine spectral_damage_forward()
|
||||||
call MPI_Allreduce(MPI_IN_PLACE,mobility_ref,1,MPI_DOUBLE,MPI_SUM,PETSC_COMM_WORLD,ierr)
|
call MPI_Allreduce(MPI_IN_PLACE,mobility_ref,1,MPI_DOUBLE,MPI_SUM,PETSC_COMM_WORLD,ierr)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
end subroutine spectral_damage_forward
|
end subroutine spectral_damage_forward
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief destroy routine
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
subroutine spectral_damage_destroy()
|
|
||||||
|
|
||||||
implicit none
|
|
||||||
PetscErrorCode :: ierr
|
|
||||||
|
|
||||||
call VecDestroy(solution,ierr); CHKERRQ(ierr)
|
|
||||||
call SNESDestroy(damage_snes,ierr); CHKERRQ(ierr)
|
|
||||||
|
|
||||||
end subroutine spectral_damage_destroy
|
|
||||||
|
|
||||||
end module spectral_damage
|
end module spectral_damage
|
||||||
|
|
|
@ -524,5 +524,4 @@ pure function IIO_stringPos(string)
|
||||||
|
|
||||||
end function IIO_stringPos
|
end function IIO_stringPos
|
||||||
|
|
||||||
|
|
||||||
end module
|
end module
|
||||||
|
|
|
@ -67,8 +67,7 @@ module spectral_mech_basic
|
||||||
public :: &
|
public :: &
|
||||||
basicPETSc_init, &
|
basicPETSc_init, &
|
||||||
basicPETSc_solution, &
|
basicPETSc_solution, &
|
||||||
BasicPETSc_forward, &
|
BasicPETSc_forward
|
||||||
basicPETSc_destroy
|
|
||||||
external :: &
|
external :: &
|
||||||
PETScErrorF ! is called in the CHKERRQ macro
|
PETScErrorF ! is called in the CHKERRQ macro
|
||||||
|
|
||||||
|
@ -541,20 +540,4 @@ subroutine BasicPETSc_forward(guess,timeinc,timeinc_old,loadCaseTime,deformation
|
||||||
|
|
||||||
end subroutine BasicPETSc_forward
|
end subroutine BasicPETSc_forward
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief destroy routine
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
subroutine BasicPETSc_destroy()
|
|
||||||
use spectral_utilities, only: &
|
|
||||||
Utilities_destroy
|
|
||||||
|
|
||||||
implicit none
|
|
||||||
PetscErrorCode :: ierr
|
|
||||||
|
|
||||||
call VecDestroy(solution_vec,ierr); CHKERRQ(ierr)
|
|
||||||
call SNESDestroy(snes,ierr); CHKERRQ(ierr)
|
|
||||||
call DMDestroy(da,ierr); CHKERRQ(ierr)
|
|
||||||
|
|
||||||
end subroutine BasicPETSc_destroy
|
|
||||||
|
|
||||||
end module spectral_mech_basic
|
end module spectral_mech_basic
|
||||||
|
|
|
@ -73,8 +73,7 @@ module spectral_mech_Polarisation
|
||||||
public :: &
|
public :: &
|
||||||
Polarisation_init, &
|
Polarisation_init, &
|
||||||
Polarisation_solution, &
|
Polarisation_solution, &
|
||||||
Polarisation_forward, &
|
Polarisation_forward
|
||||||
Polarisation_destroy
|
|
||||||
external :: &
|
external :: &
|
||||||
PETScErrorF ! is called in the CHKERRQ macro
|
PETScErrorF ! is called in the CHKERRQ macro
|
||||||
|
|
||||||
|
@ -675,20 +674,4 @@ subroutine Polarisation_forward(guess,timeinc,timeinc_old,loadCaseTime,deformati
|
||||||
|
|
||||||
end subroutine Polarisation_forward
|
end subroutine Polarisation_forward
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief destroy routine
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
subroutine Polarisation_destroy()
|
|
||||||
use spectral_utilities, only: &
|
|
||||||
Utilities_destroy
|
|
||||||
|
|
||||||
implicit none
|
|
||||||
PetscErrorCode :: ierr
|
|
||||||
|
|
||||||
call VecDestroy(solution_vec,ierr); CHKERRQ(ierr)
|
|
||||||
call SNESDestroy(snes,ierr); CHKERRQ(ierr)
|
|
||||||
call DMDestroy(da,ierr); CHKERRQ(ierr)
|
|
||||||
|
|
||||||
end subroutine Polarisation_destroy
|
|
||||||
|
|
||||||
end module spectral_mech_Polarisation
|
end module spectral_mech_Polarisation
|
||||||
|
|
|
@ -49,8 +49,7 @@ module spectral_thermal
|
||||||
public :: &
|
public :: &
|
||||||
spectral_thermal_init, &
|
spectral_thermal_init, &
|
||||||
spectral_thermal_solution, &
|
spectral_thermal_solution, &
|
||||||
spectral_thermal_forward, &
|
spectral_thermal_forward
|
||||||
spectral_thermal_destroy
|
|
||||||
external :: &
|
external :: &
|
||||||
PETScErrorF ! is called in the CHKERRQ macro
|
PETScErrorF ! is called in the CHKERRQ macro
|
||||||
|
|
||||||
|
@ -390,19 +389,6 @@ subroutine spectral_thermal_forward()
|
||||||
call MPI_Allreduce(MPI_IN_PLACE,mobility_ref,1,MPI_DOUBLE,MPI_SUM,PETSC_COMM_WORLD,ierr)
|
call MPI_Allreduce(MPI_IN_PLACE,mobility_ref,1,MPI_DOUBLE,MPI_SUM,PETSC_COMM_WORLD,ierr)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
end subroutine spectral_thermal_forward
|
end subroutine spectral_thermal_forward
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief destroy routine
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
subroutine spectral_thermal_destroy()
|
|
||||||
|
|
||||||
implicit none
|
|
||||||
PetscErrorCode :: ierr
|
|
||||||
|
|
||||||
call VecDestroy(solution,ierr); CHKERRQ(ierr)
|
|
||||||
call SNESDestroy(thermal_snes,ierr); CHKERRQ(ierr)
|
|
||||||
|
|
||||||
end subroutine spectral_thermal_destroy
|
|
||||||
|
|
||||||
end module spectral_thermal
|
end module spectral_thermal
|
||||||
|
|
|
@ -140,7 +140,6 @@ module spectral_utilities
|
||||||
utilities_constitutiveResponse, &
|
utilities_constitutiveResponse, &
|
||||||
utilities_calculateRate, &
|
utilities_calculateRate, &
|
||||||
utilities_forwardField, &
|
utilities_forwardField, &
|
||||||
utilities_destroy, &
|
|
||||||
utilities_updateIPcoords, &
|
utilities_updateIPcoords, &
|
||||||
FIELD_UNDEFINED_ID, &
|
FIELD_UNDEFINED_ID, &
|
||||||
FIELD_MECH_ID, &
|
FIELD_MECH_ID, &
|
||||||
|
@ -1200,21 +1199,4 @@ subroutine utilities_updateIPcoords(F)
|
||||||
|
|
||||||
end subroutine utilities_updateIPcoords
|
end subroutine utilities_updateIPcoords
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief cleans up
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
subroutine utilities_destroy()
|
|
||||||
implicit none
|
|
||||||
|
|
||||||
call fftw_destroy_plan(planTensorForth)
|
|
||||||
call fftw_destroy_plan(planTensorBack)
|
|
||||||
call fftw_destroy_plan(planVectorForth)
|
|
||||||
call fftw_destroy_plan(planVectorBack)
|
|
||||||
call fftw_destroy_plan(planScalarForth)
|
|
||||||
call fftw_destroy_plan(planScalarBack)
|
|
||||||
|
|
||||||
end subroutine utilities_destroy
|
|
||||||
|
|
||||||
|
|
||||||
end module spectral_utilities
|
end module spectral_utilities
|
||||||
|
|
Loading…
Reference in New Issue