Yet Another eXchange Tool
DO_NOT_EDIT_HERE
test_initialized_finalized_f.f90
1
12
13
!
14
! Keywords:
15
! Maintainer: Jörg Behrens <behrens@dkrz.de>
16
! Moritz Hanke <hanke@dkrz.de>
17
! Thomas Jahns <jahns@dkrz.de>
18
! URL: https://doc.redmine.dkrz.de/yaxt/html/
19
!
20
! Redistribution and use in source and binary forms, with or without
21
! modification, are permitted provided that the following conditions are
22
! met:
23
!
24
! Redistributions of source code must retain the above copyright notice,
25
! this list of conditions and the following disclaimer.
26
!
27
! Redistributions in binary form must reproduce the above copyright
28
! notice, this list of conditions and the following disclaimer in the
29
! documentation and/or other materials provided with the distribution.
30
!
31
! Neither the name of the DKRZ GmbH nor the names of its contributors
32
! may be used to endorse or promote products derived from this software
33
! without specific prior written permission.
34
!
35
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
36
! IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
37
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
38
! PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
39
! OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
40
! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
41
! PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
42
! PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
43
! LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
44
! NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
45
! SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
46
!
47
PROGRAM
test_initialized_finalized_f
48
USE
ftest_common
, ONLY
: init_mpi, finish_mpi, test_abort
49
USE
iso_c_binding
, ONLY
: c_int
50
USE
mpi
51
USE
test_idxlist_utils
, ONLY
: test_err_count
52
USE
yaxt
, ONLY
:
xt_initialize
,
xt_finalize
, &
53
xt_initialized
,
xt_finalized
54
IMPLICIT NONE
55
56
CALL
init_mpi
57
58
IF
(
xt_initialized
() .OR.
xt_finalized
()) &
59
CALL
test_abort(
"ERROR: unexpected library state"
, &
60
__file__, &
61
__line__)
62
63
CALL
xt_initialize
(mpi_comm_world)
64
65
IF
(.NOT.
xt_initialized
() .OR.
xt_finalized
()) &
66
CALL
test_abort(
"ERROR: unexpected library state"
, &
67
__file__, &
68
__line__)
69
70
CALL
xt_finalize
71
72
IF
(.NOT.
xt_initialized
() .OR. .NOT.
xt_finalized
()) &
73
CALL
test_abort(
"ERROR: unexpected library state"
, &
74
__file__, &
75
__line__)
76
77
IF
(test_err_count() /= 0_c_int) &
78
CALL
test_abort(
"non-zero error count!"
, &
79
__file__, &
80
__line__)
81
CALL
finish_mpi
82
83
END PROGRAM
test_initialized_finalized_f
84
!
85
! Local Variables:
86
! f90-continuation-indent: 5
87
! coding: utf-8
88
! indent-tabs-mode: nil
89
! show-trailing-whitespace: t
90
! require-trailing-newline: t
91
! End:
92
!
Generated by
1.8.13