gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
Functions/Subroutines
historyautoputaxismpi.f90 File Reference

Settings of data on whole area of axes (for MPI) . More...

Go to the source code of this file.

Functions/Subroutines

subroutine historyautoputaxismpireal (dim, array)
 
subroutine historyautoputaxismpidouble (dim, array)
 
subroutine historyautoputaxismpiint (dim, array)
 

Detailed Description

Settings of data on whole area of axes (for MPI)

.

Author
Yasuhiro MORIKAWA

Definition in file historyautoputaxismpi.f90.

Function/Subroutine Documentation

◆ historyautoputaxismpidouble()

subroutine historyautoputaxismpidouble ( character(*), intent(in)  dim,
real(dp), dimension(:), intent(in)  array 
)

Set data of axes in whole area (for MPI).

When MPI is used, if data on each node is integrated and output to one file, give data of axes in whole area to this subroutine. And give .true. to optional logical argument flag_mpi_gather in HistoryAutoCreate.

Parameters
[in]dimName of dimensional variable. This name must be specified by an argument dims in HistoryAutoCreate.
[in]arrayData of axes.

Definition at line 136 of file historyautoputaxismpi.f90.

138 use gtool_history, only: historyaxisinquire
139 use dc_trace, only: beginsub, endsub
141 use dc_message, only: messagenotify
142 use dc_types, only: string, dp
143 implicit none
144 character(*), intent(in):: dim
145 ! 座標変数の名称.
146 !
147 ! ここで指定するものは, HistoryAutoCreate の
148 ! 引数 *dims* で既に指定されてい
149 ! なければなりません.
150 !
151 ! Name of dimensional variable.
152 !
153 ! This name must be specified by
154 ! an argument *dims* in "HistoryAutoCreate".
155 !
156
157 real(DP), intent(in):: array(:)
158 ! 座標データ.
159 !
160 ! Data of axes.
161
162 integer:: i, dimsize
163 character(STRING):: name
164 integer:: stat
165 character(STRING):: cause_c
166 character(*), parameter:: subname = "HistoryAutoPutAxisMPIDouble"
167 continue
168 call beginsub(subname, 'dim=%c', c1 = trim(dim) )
169 stat = dc_noerr
170 cause_c = ""
171
172 do i = 1, numdims
173 call historyaxisinquire( &
174 & axis = gthst_axes(i), & ! (in)
175 & name = name ) ! (out)
176 if ( trim(dim) == trim(name) ) then
177 dimsize = size( array )
178 allocate( data_axes_whole(i) % a_axis( dimsize ) )
179 data_axes_whole(i) % a_axis(:) = array(:)
180 goto 999
181 end if
182 end do
183
184 stat = hst_enoaxisname
185 cause_c = dim
186
187 ! 終了処理, 例外処理
188 ! Termination and Exception handling
189 !
190999 continue
191 call storeerror( stat, subname, cause_c = cause_c )
192 call endsub(subname)
Error handling module.
Definition dc_error.f90:454
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition dc_error.f90:891
integer, parameter, public dc_noerr
Error storage variables
Definition dc_error.f90:468
integer, parameter, public hst_enoaxisname
Definition dc_error.f90:565
Message output module.
Debug tracing module.
Definition dc_trace.f90:150
subroutine, public beginsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca, version)
Definition dc_trace.f90:476
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
Definition dc_trace.f90:599
Provides kind type parameter values.
Definition dc_types.f90:55
integer, parameter, public dp
Double Precision Real number
Definition dc_types.f90:92
integer, parameter, public string
Character length for string
Definition dc_types.f90:137
type(gt_history_axis_data), dimension(1:nf90_max_dims), target, save, public data_axes_whole
type(gt_history_axis), dimension(1:nf90_max_dims), target, save, public gthst_axes

References dc_trace::beginsub(), gtool_historyauto_internal::data_axes_whole, dc_error::dc_noerr, dc_types::dp, dc_trace::endsub(), gtool_historyauto_internal::gthst_axes, dc_error::hst_enoaxisname, gtool_historyauto_internal::numdims, dc_error::storeerror(), and dc_types::string.

Here is the call graph for this function:

◆ historyautoputaxismpiint()

subroutine historyautoputaxismpiint ( character(*), intent(in)  dim,
integer, dimension(:), intent(in)  array 
)

Set data of axes in whole area (for MPI).

When MPI is used, if data on each node is integrated and output to one file, give data of axes in whole area to this subroutine. And give .true. to optional logical argument flag_mpi_gather in HistoryAutoCreate.

Parameters
[in]dimName of dimensional variable. This name must be specified by an argument dims in HistoryAutoCreate.
[in]arrayData of axes.

Definition at line 226 of file historyautoputaxismpi.f90.

228 use gtool_history, only: historyaxisinquire
229 use dc_trace, only: beginsub, endsub
231 use dc_message, only: messagenotify
232 use dc_types, only: string
233 implicit none
234 character(*), intent(in):: dim
235
236 integer, intent(in):: array(:)
237
238 integer:: i, dimsize
239 character(STRING):: name
240 integer:: stat
241 character(STRING):: cause_c
242 character(*), parameter:: subname = "HistoryAutoPutAxisMPIInt"
243 continue
244 call beginsub(subname, 'dim=%c', c1 = trim(dim) )
245 stat = dc_noerr
246 cause_c = ""
247
248 do i = 1, numdims
249 call historyaxisinquire( &
250 & axis = gthst_axes(i), & ! (in)
251 & name = name ) ! (out)
252 if ( trim(dim) == trim(name) ) then
253 dimsize = size( array )
254 allocate( data_axes_whole(i) % a_axis( dimsize ) )
255 data_axes_whole(i) % a_axis(:) = array(:)
256 goto 999
257 end if
258 end do
259
260 stat = hst_enoaxisname
261 cause_c = dim
262
263 ! 終了処理, 例外処理
264 ! Termination and Exception handling
265 !
266999 continue
267 call storeerror( stat, subname, cause_c = cause_c )
268 call endsub(subname)

References dc_trace::beginsub(), gtool_historyauto_internal::data_axes_whole, dc_error::dc_noerr, dc_trace::endsub(), gtool_historyauto_internal::gthst_axes, dc_error::hst_enoaxisname, gtool_historyauto_internal::numdims, dc_error::storeerror(), and dc_types::string.

Here is the call graph for this function:

◆ historyautoputaxismpireal()

subroutine historyautoputaxismpireal ( character(*), intent(in)  dim,
real, dimension(:), intent(in)  array 
)

Set data of axes in whole area (for MPI).

When MPI is used, if data on each node is integrated and output to one file, give data of axes in whole area to this subroutine. And give .true. to optional logical argument flag_mpi_gather in HistoryAutoCreate.

Parameters
[in]dimName of dimensional variable. This name must be specified by an argument dims in HistoryAutoCreate.
[in]arrayData of axes.

Definition at line 60 of file historyautoputaxismpi.f90.

62 use gtool_history, only: historyaxisinquire
63 use dc_trace, only: beginsub, endsub
65 use dc_message, only: messagenotify
66 use dc_types, only: string
67 implicit none
68 character(*), intent(in):: dim
69
70 real, intent(in):: array(:)
71
72 integer:: i, dimsize
73 character(STRING):: name
74 integer:: stat
75 character(STRING):: cause_c
76 character(*), parameter:: subname = "HistoryAutoPutAxisMPIReal"
77 continue
78 call beginsub(subname, 'dim=%c', c1 = trim(dim) )
79 stat = dc_noerr
80 cause_c = ""
81
82 do i = 1, numdims
83 call historyaxisinquire( &
84 & axis = gthst_axes(i), & ! (in)
85 & name = name ) ! (out)
86 if ( trim(dim) == trim(name) ) then
87 dimsize = size( array )
88 allocate( data_axes_whole(i) % a_axis( dimsize ) )
89 data_axes_whole(i) % a_axis(:) = array(:)
90 goto 999
91 end if
92 end do
93
94 stat = hst_enoaxisname
95 cause_c = dim
96
97 ! 終了処理, 例外処理
98 ! Termination and Exception handling
99 !
100999 continue
101 call storeerror( stat, subname, cause_c = cause_c )
102 call endsub(subname)

References dc_trace::beginsub(), gtool_historyauto_internal::data_axes_whole, dc_error::dc_noerr, dc_trace::endsub(), gtool_historyauto_internal::gthst_axes, dc_error::hst_enoaxisname, gtool_historyauto_internal::numdims, dc_error::storeerror(), and dc_types::string.

Here is the call graph for this function: