finalize does not work for gfortran

This commit is contained in:
Martin Diehl 2020-04-28 10:29:13 +02:00
parent f3be26ffa2
commit 20b604a334
3 changed files with 35 additions and 22 deletions

View File

@ -10,7 +10,7 @@ module CPFEM
use FEsolving
use math
use rotations
use types
use YAML_types
use discretization_marc
use material
use config
@ -84,7 +84,7 @@ subroutine CPFEM_initAll(el,ip)
call config_init
call math_init
call rotations_init
call types_init
call YAML_types_init
call HDF5_utilities_init
call results_init
call discretization_marc_init(ip, el)

View File

@ -11,7 +11,7 @@ module CPFEM2
use FEsolving
use math
use rotations
use types
use YAML_types
use material
use lattice
use IO
@ -51,7 +51,7 @@ subroutine CPFEM_initAll
call config_init
call math_init
call rotations_init
call types_init
call YAML_types_init
call lattice_init
call HDF5_utilities_init
call results_init

View File

@ -8,7 +8,7 @@
!! functions exist to convert this scalar type to its respective primitive data type.
!--------------------------------------------------------------------------------------------------
module types
module YAML_types
use IO
use prec
@ -17,11 +17,12 @@ module types
private
public tNode
public tScalar
public tDict
public tList
public types_init
public :: &
tNode, &
tScalar, &
tDict, &
tList, &
YAML_types_init
type, abstract :: tNode
integer :: length = 0
@ -131,7 +132,9 @@ module types
asBools => tList_asBools
procedure :: &
asStrings => tList_asStrings
#ifndef __GFORTRAN__
final :: tList_finalize
#endif
end type tList
type, extends(tList) :: tDict
@ -168,11 +171,21 @@ module types
contains
subroutine types_init
!--------------------------------------------------------------------------------------------------
!> @brief do sanity checks
!--------------------------------------------------------------------------------------------------
subroutine YAML_types_init
write(6,'(/,a)') ' <<<+- YAML_types init -+>>>'
call unitTest
end subroutine types_init
end subroutine YAML_types_init
!--------------------------------------------------------------------------------------------------
!> @brief check correctness of some type bound procedures
!--------------------------------------------------------------------------------------------------
subroutine unitTest
type(tScalar),target :: s1,s2
@ -926,7 +939,7 @@ subroutine tDict_set(self,key,node)
type(tItem), pointer :: item
if (.not.associated(self%first)) then
if (.not. associated(self%first)) then
allocate(self%first)
item => self%first
self%length = 1
@ -944,7 +957,7 @@ subroutine tDict_set(self,key,node)
end if
item%key = key
allocate(item%node,source=node) ! ToDo: Discuss ownership (copy vs referencing)
allocate(item%node,source=node)
end subroutine tDict_set
@ -970,4 +983,4 @@ recursive subroutine tList_finalize(self)
end subroutine tList_finalize
end module types
end module YAML_types