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 FEsolving
use math use math
use rotations use rotations
use types use YAML_types
use discretization_marc use discretization_marc
use material use material
use config use config
@ -84,7 +84,7 @@ subroutine CPFEM_initAll(el,ip)
call config_init call config_init
call math_init call math_init
call rotations_init call rotations_init
call types_init call YAML_types_init
call HDF5_utilities_init call HDF5_utilities_init
call results_init call results_init
call discretization_marc_init(ip, el) call discretization_marc_init(ip, el)

View File

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

View File

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