Octopus
restart.F90
Go to the documentation of this file.
1!! Copyright (C) 2002-2006 M. Marques, A. Castro, A. Rubio, G. Bertsch
2!! Copyright (C) 2014 M. Oliveira
3!! Copyright (C) 2021 S. Ohlmann
4!! Copyright (C) 2025 M. Lueders
5!!
6!! This program is free software; you can redistribute it and/or modify
7!! it under the terms of the GNU General Public License as published by
8!! the Free Software Foundation; either version 2, or (at your option)
9!! any later version.
10!!
11!! This program is distributed in the hope that it will be useful,
12!! but WITHOUT ANY WARRANTY; without even the implied warranty of
13!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14!! GNU General Public License for more details.
15!!
16!! You should have received a copy of the GNU General Public License
17!! along with this program; if not, write to the Free Software
18!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19!! 02110-1301, USA.
20!!
21
22#include "global.h"
23
24module restart_oct_m
25 use batch_oct_m
27 use debug_oct_m
28 use global_oct_m
29 use index_oct_m
30 use io_oct_m
32 use loct_oct_m
33 use mesh_oct_m
36 use mpi_oct_m
39 use parser_oct_m
42 use space_oct_m
43 use string_oct_m
46
47 implicit none
48
49 private
50 public :: &
52 restart_t, &
53 clean_stop, &
56
57
59 integer, parameter :: RESTART_N_DATA_TYPES = 15
60
61 integer, parameter, public :: &
62 RESTART_UNDEFINED = -1, &
63 restart_all = 0, &
64 restart_gs = 1, &
65 restart_unocc = 2, &
66 restart_td = 3, &
67 restart_em_resp = 4, &
69 restart_kdotp = 6, &
71 restart_vdw = 8, &
72 restart_casida = 9, &
73 restart_oct = 10, &
74 restart_partition = 11, &
75 restart_proj = 12, &
76 restart_iteration = 13, &
77 restart_custom = 14, &
78 restart_dm = 15
79
81 private
82 character(len=20) :: tag
83 character(len=MAX_PATH_LEN) :: basedir
84 character(len=MAX_PATH_LEN) :: dir
85 integer :: flags
86 end type restart_data_t
87
88
89 integer, parameter, public :: &
90 RESTART_TYPE_DUMP = 1, &
92
94 integer, parameter, public :: &
95 RESTART_FLAG_STATES = 1, &
96 restart_flag_rho = 2, &
98 restart_flag_mix = 8, &
99 restart_flag_skip = 16, &
101
105 private
106 character(len=20) :: tag
107 character(len=MAX_PATH_LEN) :: dir
108 ! !! These will be appended to the basedir
109 integer :: default_flags = 0
110 end type restart_basic_data_t
111
112 character(len=4), parameter :: type_string(2) = (/ "DUMP", "LOAD"/)
113
114
121 !
122 type restart_basic_t
123 private
124 type(namespace_t), pointer, public :: namespace
125 integer :: data_type = restart_undefined
126 integer :: type = restart_undefined
127 logical :: skip_
128 character(len=MAX_PATH_LEN) :: dir_
129 character(len=MAX_PATH_LEN) :: pwd
130 ! !! from or dumped to. It can be either dir or a subdirectory of dir.
131 ! !! pwd is set by restart_basic_open_dir()/restart_basic_close_dir()
132 character(len=MAX_PATH_LEN), public :: basedir
133 integer :: flags
134 type(mpi_grp_t) , public :: mpi_grp
135 logical :: initialized = .false.
136 contains
137 !note: the generic name 'init' here is introduced to be able to combine the two functions (restart_basic_init and restart_init)
138 ! with a common name, despite having a different signature (optional arguments in restart_init)
139 procedure, private :: restart_basic_init
140 generic :: init => restart_basic_init
141 procedure :: end => restart_basic_end
142 procedure :: open => restart_basic_open
143 procedure :: close => restart_basic_close
144 procedure :: open_dir => restart_basic_open_dir
145 procedure :: close_dir => restart_basic_close_dir
146 procedure :: mkdir => restart_basic_mkdir
147 procedure :: dir => restart_basic_dir
148 procedure :: rm => restart_basic_rm
149 procedure :: read => restart_basic_read
150 procedure :: write => restart_basic_write
151 procedure :: get_data_type => restart_basic_get_data_type
152 procedure :: get_info => restart_basic_get_info
153 procedure :: do_i_write => restart_basic_do_i_write
154 procedure :: skip => restart_basic_skip
155 procedure :: has_flag => restart_basic_has_flag
156 end type
157
158 type, extends(restart_basic_t) :: restart_t
159 private
160 type(multicomm_t), pointer :: mc
161 logical :: has_mesh
162 ! !! and mesh functions cannot be written or read.
163 integer(int64), allocatable :: map(:)
164 ! !! used in the current calculations.
165 integer, public :: file_format_states
166
167 contains
168 !note: the generic name 'init' here is introduced to be able to combine the two functions (restart_basic_init and restart_init)
169 ! with a common name, despite having a different signature (optional arguments in restart_init)
170 procedure, private :: restart_init
171 generic :: init => restart_init
172 procedure :: end => restart_end
173 procedure :: has_map => restart_has_map
176 procedure, private :: drestart_read_mesh_function, zrestart_read_mesh_function
177 generic :: read_mesh_function => drestart_read_mesh_function, zrestart_read_mesh_function
194 procedure :: get_info => restart_get_info
195
196 end type restart_t
197
202 type(restart_basic_data_t), parameter :: basic_info(restart_undefined:restart_n_data_types)= [&
203 restart_basic_data_t("Undefined", ""), &
205 restart_basic_data_t("Ground-state", gs_dir), &
206 restart_basic_data_t("Unoccupied states", gs_dir), &
207 restart_basic_data_t("Time-dependent", td_dir), &
208 restart_basic_data_t("EM Resp.", em_resp_dir), &
209 restart_basic_data_t("EM Resp. FD", em_resp_fd_dir), &
211 restart_basic_data_t("Vib. Modes", vib_modes_dir), &
213 restart_basic_data_t("Casida", casida_dir), &
214 restart_basic_data_t("Optimal Control", oct_dir), &
216 restart_basic_data_t("GS for TDOutput", gs_dir), &
217 restart_basic_data_t("Iteration counter", iteration_dir), &
218 restart_basic_data_t("Custom data", ""), &
219 restart_basic_data_t("Adiabatic-state", dm_dir) &
223 ! from signals.c
225 interface restart_block_signals
226 subroutine block_signals()
227 implicit none
228 end subroutine block_signals
233 subroutine unblock_signals()
234 implicit none
235 end subroutine unblock_signals
236 end interface
238contains
241 function clean_stop(comm)
242 type(mpi_comm), intent(in) :: comm
243 logical :: clean_stop
245 logical :: file_exists
247 push_sub(clean_stop)
249 clean_stop = .false.
251 if (mpi_world%is_root()) then
252 inquire(file='stop', exist=file_exists)
253 if (file_exists) then
254 call loct_rm('stop')
256 end if
257 end if
259#ifdef HAVE_MPI
260 ! make sure all nodes agree on whether this condition occurred
261 call mpi_bcast(clean_stop, 1, mpi_logical, 0, comm)
262#endif
263
264 if (clean_stop) then
265 message(1) = 'Clean STOP'
267 end if
269 pop_sub(clean_stop)
270 end function clean_stop
273 subroutine restart_basic_init(restart, namespace, data_type, type, ierr, dir)
274 class(restart_basic_t), intent(out) :: restart
275 type(namespace_t), target, intent(in) :: namespace
276 integer, intent(in) :: data_type
277 integer, intent(in) :: type
279 integer, intent(out) :: ierr
280 character(len=*), optional, intent(in) :: dir
282
283 character(len=MAX_PATH_LEN) :: basedir, dirname
284 integer :: iline, n_cols, idata_type, i
285 character(len=MAX_PATH_LEN) :: default_basedir
286 character(len=20) :: tag
287 type(block_t) :: blk
288 logical :: restart_write, dir_exists
289 character(len=MAX_NAMESPACE_LEN) :: namespace_prefix
290
291
292 push_sub(restart_basic_init)
293
294 ! Some initializations
295 restart%type = type
296
297 namespace_prefix = trim(namespace%get())
298
299 default_basedir = trim(io_workdir())//'/restart/'
300 restart%basedir = default_basedir
301 restart%skip_ = .false.
302 restart%data_type = data_type
303 if(data_type>0 .and. data_type<=restart_n_data_types) then
304 restart%flags = basic_info(data_type)%default_flags
305 else
306 restart%flags = 0
307 end if
308
309 if (data_type < restart_undefined .and. data_type > restart_n_data_types) then
310 message(1) = "Illegal data_type in restart_init"
311 call messages_fatal(1, namespace=namespace)
312 end if
313 restart%namespace => namespace
314
315 ierr = 0
316
317 ! Read input
318 call messages_obsolete_variable(namespace, 'RestartFileFormat', 'RestartOptions')
319 call messages_obsolete_variable(namespace, 'TmpDir', 'RestartOptions')
320 call messages_obsolete_variable(namespace, 'RestartDir', 'RestartOptions')
321 call messages_obsolete_variable(namespace, 'MeshPartitionRead', 'RestartOptions')
322 call messages_obsolete_variable(namespace, 'MeshPartitionWrite', 'RestartOptions')
323 call messages_obsolete_variable(namespace, 'MeshPartitionDir', 'RestartOptions')
324
325 !%Variable RestartOptions
326 !%Type block
327 !%Section Execution::IO
328 !%Description
329 !% <tt>Octopus</tt> usually stores binary information, such as the wavefunctions, to be used
330 !% in subsequent calculations. The most common example is the ground-state states
331 !% that are used to start a time-dependent calculation. This variable allows to control
332 !% where this information is written to or read from. The format of this block is the following:
333 !% for each line, the first column indicates the type of data, the second column indicates
334 !% the path to the directory that should be used to read and write that restart information, and the
335 !% third column, which is optional, allows one to set some flags to modify the way how the data
336 !% is read or written. For example, if you are running a time-dependent calculation, you can
337 !% indicate where <tt>Octopus</tt> can find the ground-state information in the following way:
338 !%
339 !% <tt>%RestartOptions
340 !% <br>&nbsp;&nbsp;restart_gs | "gs_restart"
341 !% <br>&nbsp;&nbsp;restart_td | "td_restart"
342 !% <br>%</tt>
343 !%
344 !% The second line of the above example also tells <tt>Octopus</tt> that the time-dependent restart data
345 !% should be read from and written to the "td_restart" directory.
346 !%
347 !% In case you want to change the path of all the restart directories, you can use the <tt>restart_all</tt> option.
348 !% When using the <tt>restart_all</tt> option, it is still possible to have a different restart directory for specific
349 !% data types. For example, when including the following block in your input file:
350 !%
351 !% <tt>%RestartOptions
352 !% <br>&nbsp;&nbsp;restart_all | "my_restart"
353 !% <br>&nbsp;&nbsp;restart_td&nbsp; | "td_restart"
354 !% <br>%</tt>
355 !%
356 !% the time-dependent restart information will be stored in the "td_restart" directory, while all the remaining
357 !% restart information will be stored in the "my_restart" directory.
358 !%
359 !% By default, the name of the "restart_all" directory is set to "restart".
360 !%
361 !%
362 !% For multisystem calculations, the namespace of each system is inserted between the `restart top` folder and the specific
363 !% directory for each data type. When specifying a folder for a given system, the corresponding namespace is added
364 !% automatically to the folder name, unless the flag `restart_literal` is added.
365 !%
366 !% Some <tt>CalculationMode</tt>s also take into account specific flags set in the third column of the <tt>RestartOptions</tt>
367 !% block. These are used to determine if some specific part of the restart data is to be taken into account
368 !% or not when reading the restart information. For example, when restarting a ground-state calculation, one can
369 !% set the <tt>restart_rho</tt> flags, so that the density used is not built from the saved wavefunctions, but is
370 !% instead read from the restart directory. In this case, the block should look like this:
371 !%
372 !% <tt>%RestartOptions
373 !% <br>&nbsp;&nbsp;restart_gs | "restart" | restart_rho
374 !% <br>%</tt>
375 !%
376 !% A list of available flags is given below, but note that the code might ignore some of them, which will happen if they
377 !% are not available for that particular calculation, or might assume some of them always present, which will happen
378 !% in case they are mandatory.
379 !%
380 !% Finally, note that all the restart information of a given data type is always stored in a subdirectory of the
381 !% specified path. The name of this subdirectory is fixed and cannot be changed. For example, ground-state information
382 !% will always be stored in a subdirectory named "gs". This makes it safe in most situations to use the same path for
383 !% all the data types. The name of these subdirectories is indicated in the description of the data types below.
384 !%
385 !% Currently, the available restart data types and flags are the following:
386 !%Option restart_all 0
387 !% (data type)
388 !% Option to globally change the path of all the restart information.
389 !%Option restart_gs 1
390 !% (data type)
391 !% The data resulting from a ground-state calculation.
392 !% This information is stored under the "gs" subdirectory.
393 !%Option restart_unocc 2
394 !% (data type)
395 !% The data resulting from an unoccupied states calculation. This information also corresponds to a ground state and
396 !% can be used as such, so it is stored under the same subdirectory as the one of restart_gs.
397 !%Option restart_td 3
398 !% (data type)
399 !% The data resulting from a real-time time-dependent calculation.
400 !% This information is stored under the "td" subdirectory.
401 !%Option restart_em_resp 4
402 !% (data type)
403 !% The data resulting from the calculation of the electromagnetic response using the Sternheimer approach.
404 !% This information is stored under the "em_resp" subdirectory.
405 !%Option restart_em_resp_fd 5
406 !% (data type)
407 !% The data resulting from the calculation of the electromagnetic response using finite-differences.
408 !% This information is stored under the "em_resp_fd" subdirectory.
409 !%Option restart_kdotp 6
410 !% (data type)
411 !% The data resulting from the calculation of effective masses by k.p perturbation theory.
412 !% This information is stored under the "kdotp" subdirectory.
413 !%Option restart_vib_modes 7
414 !% (data type)
415 !% The data resulting from the calculation of vibrational modes.
416 !% This information is stored under the "vib_modes" subdirectory.
417 !%Option restart_vdw 8
418 !% (data type)
419 !% The data resulting from the calculation of van der Waals coefficients.
420 !% This information is stored under the "vdw" subdirectory.
421 !%Option restart_casida 9
422 !% (data type)
423 !% The data resulting from a Casida calculation.
424 !% This information is stored under the "casida" subdirectory.
425 !%Option restart_oct 10
426 !% (data type)
427 !% The data for optimal control calculations.
428 !% This information is stored under the "opt-control" subdirectory.
429 !%Option restart_partition 11
430 !% (data type)
431 !% The data for the mesh partitioning.
432 !% This information is stored under the "partition" subdirectory.
433 !%Option restart_proj 12
434 !% (data type)
435 !% The ground-state to be used with the td_occup and populations options of <tt>TDOutput</tt>.
436 !% This information should be a ground state, so the "gs" subdirectory is used.
437 !%Option restart_states 1
438 !% (flag)
439 !% Read the electronic states. (not yet implemented)
440 !%Option restart_rho 2
441 !% (flag)
442 !% Read the electronic density.
443 !%Option restart_vhxc 4
444 !% (flag)
445 !% Read the Hartree and XC potentials.
446 !%Option restart_mix 8
447 !% (flag)
448 !% Read the SCF mixing information.
449 !%Option restart_skip 16
450 !% (flag)
451 !% This flag allows to selectively skip the reading and writing of specific restart information.
452 !%Option restart_literal 32
453 !% (flag)
454 !% Treat the given path literally, i.e. do not insert the namespace. This is useful for ensembles
455 !% if a given replica should read from a specific restart folder.
456 !%End
457 if (parse_block(namespace, 'RestartOptions', blk) == 0) then
458
459
460 do iline = 1, parse_block_n(blk)
461 n_cols = parse_block_cols(blk,iline-1)
462
463 call parse_block_integer(blk, iline-1, 0, idata_type)
464 if (idata_type < 0 .or. idata_type > restart_n_data_types) then
465 call messages_input_error(namespace, 'RestartOptions', "Invalid data type", row=iline-1, column=0)
466 end if
467 if (data_type == 0) then
468 call parse_block_string(blk, iline-1, 1, default_basedir)
469 end if
470
471 if (idata_type == data_type .or. idata_type == 0) then
472 call parse_block_string(blk, iline-1, 1, restart%basedir)
473 if (n_cols > 2) call parse_block_integer(blk, iline-1, 2, restart%flags)
474
475 namespace_prefix = parse_get_full_name(namespace, 'RestartOptions')
476 namespace_prefix = namespace_prefix(1:len_trim(namespace_prefix)-len_trim('.RestartOptions'))
477
478 if (len_trim(namespace_prefix) == 0 .or. trim(namespace%get()) == trim(namespace_prefix)) then
479 namespace_prefix = trim(namespace%get())
480 end if
481
482 if (bitand(restart%flags, restart_flag_literal) > 0) then
483 namespace_prefix = ""
484 end if
485
486 end if
487
488
489 end do
490 call parse_block_end(blk)
491
492 end if
493
494 basedir = restart%basedir
495 call add_last_slash(basedir)
496
497 do i=1, len(namespace_prefix)
498 if (namespace_prefix(i:i) == '.') namespace_prefix(i:i) = '/'
499 end do
500
501 ! append namespace and ensure a single trailing slash
502 basedir = trim(basedir)//trim(namespace_prefix)
503 call add_last_slash(basedir)
504 dirname = trim(basic_info(restart%data_type)%dir)
505
506 call mpi_grp_init(restart%mpi_grp, mpi_comm_undefined)
507
508 select case (restart%type)
509 case (restart_type_dump)
510 !%Variable RestartWrite
511 !%Type logical
512 !%Default true
513 !%Section Execution::IO
514 !%Description
515 !% If this variable is set to no, restart information is not
516 !% written. Note that some run modes will ignore this
517 !% option and write some restart information anyway.
518 !%End
519
520 call parse_variable(namespace, 'RestartWrite', .true., restart_write)
521 restart%skip_ = .not. restart_write
522
523 if (restart%skip_) then
524 message(1) = 'Restart information will not be written.'
525 call messages_info(1, namespace=namespace)
526 end if
527
528 case (restart_type_load)
529 ! This is set to true as an error condition, checked by assertions in some routines.
530 restart%skip_ = .false.
531
532 case default
533 message(1) = "Unknown restart type in restart_init"
534 call messages_fatal(1, namespace=namespace)
535 end select
536
537
538 ! If the restart data type is not defined, the directories should be set explicitly
539 if (restart%data_type == restart_undefined) then
540 assert(present(dir))
541 basedir = trim(dir)
542 dirname = ""
543 end if
544
545 ! Set final path
546 restart%dir_ = trim(basedir)//trim(dirname)
547 ! Remove any trailing "/" from the path (all the routines from this module should add the trailing "/" when needed)
548 if (index(restart%dir_, '/', .true.) == len_trim(restart%dir_)) then
549 restart%dir_ = restart%dir_(1:len_trim(restart%dir_)-1)
550 end if
551
552 ! Set initial path to the working directory
553 restart%pwd = restart%dir_
554
555 ! Check if the directory already exists and create it if necessary
556 if (restart%mpi_grp%is_root()) then
557 dir_exists = io_dir_exists(restart%pwd)
558 if (restart%type == restart_type_dump .and. .not. dir_exists) then
559 call io_mkdir(restart%pwd, namespace, parents=.true.)
560 end if
561 end if
562 if (restart%mpi_grp%size > 1) then
563 call restart%mpi_grp%bcast(dir_exists, 1, mpi_logical, 0)
564 end if
565
566 if (restart%data_type == restart_undefined) then
567 tag = "Some "
568 else
569 tag = trim(basic_info(data_type)%tag)
570 end if
571
572 select case (restart%type)
573 case (restart_type_dump)
574 if (.not. restart%skip_) then
575 message(1) = "Info: "//trim(tag)//" restart information will be written to '"//trim(restart%pwd)//"'."
576 call messages_info(1, namespace=namespace)
577 end if
578
579 case (restart_type_load)
580 if (.not. dir_exists) then
581 ierr = 1
582 restart%skip_ = .true.
583
584 message(1) = "Info: Could not find '"//trim(restart%pwd)//"' directory for restart."
585 message(2) = "Info: No restart information will be read."
586 call messages_info(2, namespace=namespace)
587 else
588 message(1) = "Info: "//trim(tag)//" restart information will be read from '"//trim(restart%pwd)//"'."
589 call messages_info(1, namespace=namespace)
590 end if
591
592 end select
593
594 restart%initialized = .true.
595
596 pop_sub(restart_basic_init)
597 end subroutine restart_basic_init
598
599 function restart_basic_do_i_write(restart) result(res)
600 class(restart_basic_t), intent(in) :: restart
601 logical :: res
602
603 res = restart%mpi_grp%is_root()
604
605 end function restart_basic_do_i_write
606
607 ! ---------------------------------------------------------
613 subroutine restart_init(restart, namespace, data_type, type, mc, ierr, mesh, dir, exact)
614 class(restart_t), intent(out) :: restart
615 type(namespace_t), target, intent(in) :: namespace
616 integer, intent(in) :: data_type
617 integer, intent(in) :: type
619 type(multicomm_t), target, intent(in) :: mc
620 integer, intent(out) :: ierr
621 class(mesh_t), optional, intent(in) :: mesh
623 character(len=*), optional, intent(in) :: dir
625 logical, optional, intent(in) :: exact
627
628 logical :: grid_changed, grid_reordered, exact_, with_changed_grid
629 integer :: default_format
630
631 push_sub(restart_init)
632
633 ierr = 0
634
635 call restart_basic_init(restart, namespace, data_type, type, ierr, dir)
636 ! At this point, ierr == 1 indicates that the folder did not exist for RESTART_TYPE_LOAD.
637 ! In this case, also restart%skip_ has been set.
638
639 restart%has_mesh = present(mesh)
640 restart%mc => mc
641 call mpi_grp_init(restart%mpi_grp, mc%master_comm)
642
643 ! Sanity checks
644 if (present(exact) .and. .not. present(mesh)) then
645 message(1) = "Error in restart_init: the 'exact' optional argument requires a mesh."
646 call messages_fatal(1, namespace=namespace)
647 end if
648
649 exact_ = optional_default(exact, .false.)
650
651 restart%has_mesh = present(mesh)
652 restart%mc => mc
653
654 if(present(mesh)) then
655 !%Variable RestartFileFormatStates
656 !%Type integer
657 !%Section Execution::IO
658 !%Description
659 !% File format used for writing and reading the restart files for the states.
660 !% Default is adios2 if support is available, otherwise obf.
661 !% Restart files for linear response calculations always use obf.
662 !%Option obf 1
663 !% obf is the Octopus binary format, for which there is one file for
664 !% each state.
665 !%Option adios2 2
666 !% For large systems, especially with many k points, having one file per state can
667 !% be problematic for the file system. This option selects a format based on the
668 !% ADIOS2 library which needs to be available. The library handles IO efficiently
669 !% including aggregation and makes the restart IO much faster. However, it does
670 !% not support all features that the default obf format supports. Moreover, it
671 !% might use more memory for internal aggregation. In case of out-of-memory issues,
672 !% you might need to rerun on more nodes.
673 !%End
674#ifdef HAVE_ADIOS2
675 default_format = option__restartfileformatstates__adios2
676#else
677 default_format = option__restartfileformatstates__obf
678#endif
679 call parse_variable(namespace, 'RestartFileFormatStates', default_format, restart%file_format_states)
680 if (.not. varinfo_valid_option('RestartFileFormatStates', restart%file_format_states)) then
681 call messages_input_error(namespace, 'RestartFileFormatStates')
682 end if
683
684 if (restart%file_format_states == option__restartfileformatstates__adios2) then
685 ! the ADIOS2 format requires the exact same mesh for restarting
686 exact_ = .true.
687#ifndef HAVE_ADIOS2
688 message(1) = "Error: adios2 restart file format requested, but not compiled against ADIOS2 library."
689 call messages_fatal(1)
690#endif
691 end if
692
693 !%Variable RestartWithChangedGrid
694 !%Type logical
695 !%Default false
696 !%Section Execution::IO
697 !%Description
698 !% Use restart data even when the grid has changed. Normally, this is not needed, but can be enabled.
699 !%End
700 call parse_variable(namespace, 'RestartWithChangedGrid', .false., with_changed_grid)
701
702 select case (restart%type)
703 case (restart_type_dump)
704 if (.not. restart%skip_) then
705 ! Dump the grid information. The main parameters of the grid should not change
706 ! during the calculation, so we should only need to dump it once.
707 call index_dump(mesh%idx, mesh%np_part_global, restart%pwd, restart%mpi_grp, &
708 restart%namespace, ierr)
709 if (ierr /= 0) then
710 message(1) = "Unable to write index map to '"//trim(restart%pwd)//"'."
711 call messages_fatal(1, namespace=namespace)
712 end if
713
714 call mesh_write_fingerprint(mesh, restart%pwd, "grid", restart%mpi_grp, namespace, ierr)
715 if (ierr /= 0) then
716 message(1) = "Unable to write mesh fingerprint to '"//trim(restart%pwd)//"/grid'."
717 call messages_fatal(1, namespace=namespace)
718 end if
719 end if
720
721 case (restart_type_load)
722 if(.not. restart%skip_) then
723 call mesh_check_dump_compatibility(mesh, restart%pwd, "grid", global_namespace, &
724 restart%mpi_grp, grid_changed, grid_reordered, restart%map, ierr)
725
726 ! Check whether an error occurred. In this case we cannot read.
727 if (ierr /= 0) then
728 if (ierr == 1) then
729 message(1) = "Unable to check mesh compatibility: unable to read mesh fingerprint"
730 message(2) = "in '"//trim(restart%pwd)//"'."
731 else if (ierr > 1) then
732 message(1) = "Mesh from current calculation is not compatible with mesh found in"
733 message(2) = "'"//trim(restart%pwd)//"'."
734 end if
735 message(3) = "No restart information will be read."
736 call messages_warning(3, namespace=namespace)
737 ierr = 1
738 end if
739
740 ! Print some warnings in case the mesh is compatible, but changed.
741 if (grid_changed) then
742 if (grid_reordered) then
743 message(1) = "Info: Octopus is attempting to restart from a mesh with a different order of points."
744 else
745 message(1) = "Info: Octopus is attempting to restart from a different mesh."
746 end if
747 if (with_changed_grid) then
748 call messages_info(1, namespace=namespace)
749 else
750 message(2) = "This is disabled. To enable this, set RestartWithChangedGrid=True."
751 call messages_warning(2, namespace=namespace)
752 ierr = 1
753 end if
754 end if
755
756 if (exact_) then
757 restart%skip_ = grid_changed .and. .not. grid_reordered
758 if (restart%skip_) then
759 message(1) = "This calculation requires the exact same mesh to restart."
760 message(2) = "No restart information will be read from '"//trim(restart%pwd)//"'."
761 call messages_warning(2, namespace=namespace)
762 ierr = 1
763 end if
764 else
765 restart%skip_ = .false.
766 end if
767 end if
768 end select
769
770 ! Make sure all the processes have finished reading/writing all the grid information,
771 ! as there might be some subsequent calls to this function where that information will
772 ! be written/read to/from the same directory.
773 if (restart%mpi_grp%size > 1) then
774 call restart%mpi_grp%barrier()
775 end if
776
777 end if
778
779 pop_sub(restart_init)
780 end subroutine restart_init
781
782
783 subroutine restart_basic_end(restart)
784 class(restart_basic_t), intent(inout) :: restart
785
786 push_sub(restart_basic_end)
787
788 restart%type = 0
789 restart%data_type = 0
790 restart%skip_ = .true.
791
792 pop_sub(restart_basic_end)
793
794 end subroutine restart_basic_end
795
796 ! ---------------------------------------------------------
797 subroutine restart_end(restart)
798 class(restart_t), intent(inout) :: restart
799
800 push_sub(restart_end)
801
802 if (restart%mpi_grp%is_root() .and. .not. restart%skip_) then
803 select case (restart%type)
804 case (restart_type_load)
805 message(1) = "Info: Finished reading information "//trim(basic_info(restart%type)%tag)//" from '"//trim(restart%dir_)//"'."
806 call io_rm(trim(restart%pwd)//"/loading")
807 case (restart_type_dump)
808 call io_rm(trim(restart%pwd)//"/dumping")
809 message(1) = "Info: Finished writing information "//trim(basic_info(restart%type)%tag)//" to '"//trim(restart%dir_)//"'."
810 end select
811 call messages_info(1, namespace=restart%namespace)
812 end if
813
814 safe_deallocate_a(restart%map)
815 restart%has_mesh = .false.
816 nullify(restart%mc)
817
818 call restart_basic_end(restart)
819
820 pop_sub(restart_end)
821 end subroutine restart_end
822
823
824 ! ---------------------------------------------------------
831 function restart_basic_dir(restart)
832 class(restart_basic_t), intent(in) :: restart
833 character(len=MAX_PATH_LEN) :: restart_basic_dir
834
835 push_sub(restart_basic_dir)
836
837 restart_basic_dir = io_workpath(restart%pwd)
838
839 pop_sub(restart_basic_dir)
840 end function restart_basic_dir
841
842
843 ! ---------------------------------------------------------
846 subroutine restart_basic_open_dir(restart, dirname, ierr)
847 class(restart_basic_t), intent(inout) :: restart
848 character(len=*), intent(in) :: dirname
849 integer, intent(out) :: ierr
850
851 push_sub(restart_basic_open_dir)
852
853 assert(.not. restart%skip_)
854
855 ierr = 0
856
857 select case (restart%type)
858 case (restart_type_dump)
859 call restart_basic_mkdir(restart, dirname)
860 case (restart_type_load)
861 if (.not. loct_dir_exists(trim(restart%dir_)//"/"//trim(dirname))) then
862 ierr = 1
863 end if
864 end select
865
866 if (ierr == 0) then
867 if (index(dirname, '/', .true.) == len_trim(dirname)) then
868 restart%pwd = trim(restart%dir_)//"/"//dirname(1:len_trim(dirname)-1)
869 else
870 restart%pwd = trim(restart%dir_)//"/"//trim(dirname)
871 end if
872 end if
873
875 end subroutine restart_basic_open_dir
876
877
878 ! ---------------------------------------------------------
880 subroutine restart_basic_close_dir(restart)
881 class(restart_basic_t), intent(inout) :: restart
882
884
885 assert(.not. restart%skip_)
886
887 restart%pwd = restart%dir_
888
890 end subroutine restart_basic_close_dir
891
893 ! ---------------------------------------------------------
895 subroutine restart_basic_mkdir(restart, dirname)
896 class(restart_basic_t), intent(in) :: restart
897 character(len=*), intent(in) :: dirname
898
899 push_sub(restart_basic_mkdir)
900
901 assert(.not. restart%skip_)
902
903 assert(restart%type == restart_type_dump)
904
905 call io_mkdir(trim(restart%pwd)//"/"//trim(dirname), parents=.true.)
906
907 pop_sub(restart_basic_mkdir)
908 end subroutine restart_basic_mkdir
909
910
911 ! ---------------------------------------------------------
913 subroutine restart_basic_rm(restart, name)
914 class(restart_basic_t), intent(in) :: restart
915 character(len=*), intent(in) :: name
916
917 assert(.not. restart%skip_)
918 assert(restart%type == restart_type_dump)
919
920 push_sub(restart_basic_rm)
921
922 call io_rm(trim(restart%pwd)//"/"//trim(name))
923
924 pop_sub(restart_basic_rm)
925 end subroutine restart_basic_rm
927
928 ! ---------------------------------------------------------
935 function restart_basic_open(restart, filename, status, position, silent)
936 class(restart_basic_t), intent(in) :: restart
937 character(len=*), intent(in) :: filename
938 character(len=*), optional, intent(in) :: status
939 character(len=*), optional, intent(in) :: position
940 logical, optional, intent(in) :: silent
941 integer :: restart_basic_open
942
943 logical :: die
944 character(len=20) :: action, status_
945
946 push_sub(restart_basic_open)
947
948 assert(restart%initialized)
949 assert(.not. restart%skip_)
950
951 select case (restart%type)
952 case (restart_type_dump)
953 status_ = 'unknown'
954 action = 'write'
955 die = .true.
956
957 case (restart_type_load)
958 status_ = 'old'
959 action = 'read'
960 die = .false.
961
962 case default
963 message(1) = "Error in restart_basic_open: illegal restart type"
964 call messages_fatal(1)
965 end select
966
967 if (present(status)) status_ = status
968
969 restart_basic_open = io_open(trim(restart%pwd)//"/"//trim(filename), &
970 action=trim(action), status=trim(status_), &
971 die=die, position=position, form="formatted", grp=restart%mpi_grp)
972
973 if (restart_basic_open == -1 .and. .not. optional_default(silent, .false.)) then
974 message(1) = "Unable to open file '"//trim(restart%pwd)//"/"//trim(filename)//"'."
976 end if
977
978 pop_sub(restart_basic_open)
979 end function restart_basic_open
980
981
982 ! ---------------------------------------------------------
983 subroutine restart_basic_write(restart, iunit, lines, nlines, ierr)
984 class(restart_basic_t), intent(in) :: restart
985 integer, intent(in) :: iunit
986 character(len=*), intent(in) :: lines(:)
987 integer, intent(in) :: nlines
988 integer, intent(out) :: ierr
989
990 integer :: iline
991
992 push_sub(restart_basic_write)
993
994 if (iunit /= -1) then
995 ierr = 0
996 if (restart%mpi_grp%is_root()) then
997 do iline = 1, nlines
998 write(iunit,"(a)") trim(lines(iline))
999 end do
1000 end if
1001 else
1002 ierr = 1
1003 end if
1004
1005 pop_sub(restart_basic_write)
1006 end subroutine restart_basic_write
1007
1009 ! ---------------------------------------------------------
1010 subroutine restart_basic_read(restart, iunit, lines, nlines, ierr)
1011 class(restart_basic_t), intent(in) :: restart
1012 integer, intent(in) :: iunit
1013 character(len=*), intent(out) :: lines(:)
1014 integer, intent(in) :: nlines
1015 integer, intent(out) :: ierr
1016
1017 push_sub(restart_basic_read)
1018
1019 call iopar_read(restart%mpi_grp, iunit, lines, nlines, ierr)
1020
1021 pop_sub(restart_basic_read)
1022 end subroutine restart_basic_read
1023
1024
1025 ! ---------------------------------------------------------
1027 subroutine restart_basic_close(restart, iunit)
1028 class(restart_basic_t), intent(in) :: restart
1029 integer, intent(inout) :: iunit
1031 push_sub(restart_basic_close)
1032
1033 if (iunit /= -1) call io_close(iunit, restart%mpi_grp)
1034
1035 call restart%mpi_grp%barrier()
1036
1037 pop_sub(restart_basic_close)
1038 end subroutine restart_basic_close
1039
1040
1041 ! ---------------------------------------------------------
1046 logical pure function restart_basic_skip(restart)
1047 class(restart_basic_t), intent(in) :: restart
1048
1049 restart_basic_skip = restart%skip_ .or. restart%has_flag(restart_flag_skip)
1050
1051 end function restart_basic_skip
1052
1053
1054 ! ---------------------------------------------------------
1056 logical pure function restart_basic_has_flag(restart, flag)
1057 class(restart_basic_t), intent(in) :: restart
1058 integer, intent(in) :: flag
1059
1060 restart_basic_has_flag = bitand(restart%flags, flag) /= 0
1061
1062 end function restart_basic_has_flag
1063
1064
1065 ! ---------------------------------------------------------
1067 logical pure function restart_has_map(restart)
1068 class(restart_t), intent(in) :: restart
1069
1070 restart_has_map = allocated(restart%map)
1071
1072 end function restart_has_map
1073
1074
1076 integer pure function restart_basic_get_data_type(restart)
1077 class(restart_basic_t), intent(in) :: restart
1079 restart_basic_get_data_type = restart%data_type
1080 end function restart_basic_get_data_type
1081
1082 function restart_basic_get_info(restart) result(info)
1083 class(restart_basic_t), intent(in) :: restart
1084
1085 character(:), allocatable :: info
1086
1087 info = "restart_basic "//trim(basic_info(restart%data_type)%tag)//" "//type_string(restart%type)
1088
1089 end function restart_basic_get_info
1090
1091 function restart_get_info(restart) result(info)
1092 class(restart_t), intent(in) :: restart
1093
1094 character(:), allocatable :: info
1095
1096 info = "restart "//trim(basic_info(restart%data_type)%tag)//" "//type_string(restart%type)
1097
1098 end function restart_get_info
1099
1100#include "undef.F90"
1101#include "real.F90"
1102#include "restart_inc.F90"
1103
1104#include "undef.F90"
1105#include "complex.F90"
1106#include "restart_inc.F90"
1107
1108end module restart_oct_m
1109
1110
1111!! Local Variables:
1112!! mode: f90
1113!! coding: utf-8
1114!! End:
block signals while writing the restart files
Definition: restart.F90:320
unblock signals when writing restart is finished
Definition: restart.F90:327
This module implements batches of mesh functions.
Definition: batch.F90:135
This module handles the calculation mode.
character(len= *), parameter, public em_resp_fd_dir
Definition: global.F90:281
character(len= *), parameter, public gs_dir
Definition: global.F90:277
character(len= *), parameter, public iteration_dir
Definition: global.F90:289
character(len= *), parameter, public casida_dir
Definition: global.F90:285
character(len= *), parameter, public vib_modes_dir
Definition: global.F90:283
character(len= *), parameter, public partition_dir
Definition: global.F90:288
character(len= *), parameter, public kdotp_dir
Definition: global.F90:282
character(len= *), parameter, public dm_dir
Definition: global.F90:290
character(len= *), parameter, public em_resp_dir
Definition: global.F90:280
character(len= *), parameter, public td_dir
Definition: global.F90:278
character(len= *), parameter, public vdw_dir
Definition: global.F90:284
character(len= *), parameter, public oct_dir
Definition: global.F90:286
This module implements the index, used for the mesh points.
Definition: index.F90:124
subroutine, public index_dump(idx, np, dir, mpi_grp, namespace, ierr)
Definition: index.F90:311
Definition: io.F90:116
subroutine, public io_close(iunit, grp)
Definition: io.F90:467
subroutine, public iopar_read(grp, iunit, lines, n_lines, ierr)
Definition: io.F90:588
character(len=max_path_len) function, public io_workpath(path, namespace)
construct path name from given name and namespace
Definition: io.F90:318
subroutine, public io_rm(fname, namespace)
Definition: io.F90:392
character(len=max_path_len) function, public io_workdir()
construct working directory
Definition: io.F90:286
subroutine, public io_mkdir(fname, namespace, parents)
Definition: io.F90:361
logical function, public io_dir_exists(dir, namespace)
Returns true if a dir with name 'dir' exists.
Definition: io.F90:579
integer function, public io_open(file, namespace, action, status, form, position, die, recl, grp)
Definition: io.F90:402
System information (time, memory, sysname)
Definition: loct.F90:117
subroutine, public loct_rm(name)
Definition: loct.F90:318
logical function, public loct_dir_exists(dirname)
Definition: loct.F90:349
This module defines functions over batches of mesh functions.
Definition: mesh_batch.F90:118
This module defines the meshes, which are used in Octopus.
Definition: mesh.F90:120
subroutine, public mesh_check_dump_compatibility(mesh, dir, filename, namespace, mpi_grp, grid_changed, grid_reordered, map, ierr)
Definition: mesh.F90:596
subroutine, public mesh_write_fingerprint(mesh, dir, filename, mpi_grp, namespace, ierr)
Definition: mesh.F90:460
subroutine, public messages_warning(no_lines, all_nodes, namespace)
Definition: messages.F90:525
subroutine, public messages_obsolete_variable(namespace, name, rep)
Definition: messages.F90:1000
character(len=256), dimension(max_lines), public message
to be output by fatal, warning
Definition: messages.F90:162
subroutine, public messages_fatal(no_lines, only_root_writes, namespace)
Definition: messages.F90:410
subroutine, public messages_input_error(namespace, var, details, row, column)
Definition: messages.F90:691
subroutine, public messages_info(no_lines, iunit, debug_only, stress, all_nodes, namespace)
Definition: messages.F90:594
type(mpi_comm), parameter, public mpi_comm_undefined
used to indicate a communicator has not been initialized
Definition: mpi.F90:138
type(mpi_grp_t), public mpi_world
Definition: mpi.F90:272
subroutine mpi_grp_init(grp, comm)
Initialize MPI group instance.
Definition: mpi.F90:341
This module handles the communicators for the various parallelization strategies.
Definition: multicomm.F90:147
type(namespace_t), public global_namespace
Definition: namespace.F90:135
Some general things and nomenclature:
Definition: par_vec.F90:173
character(len=:) function, allocatable, public parse_get_full_name(namespace, varname)
Given a namespace and a variable name, this function will iterate over all namespace ancestors contai...
Definition: parser.F90:773
subroutine, public parse_block_string(blk, l, c, res, convert_to_c)
Definition: parser.F90:810
integer function, public parse_block(namespace, name, blk, check_varinfo_)
Definition: parser.F90:615
subroutine zrestart_write_binary3_int32(restart, filename, np, ff, ierr, root)
Definition: restart.F90:2388
subroutine drestart_write_binary1_int32(restart, filename, np, ff, ierr, root)
Definition: restart.F90:1720
subroutine drestart_read_binary3(restart, filename, np, ff, ierr)
Definition: restart.F90:1666
logical pure function restart_has_map(restart)
Returns true if the restart was from a different order of mesh points.
Definition: restart.F90:1163
integer, parameter, public restart_partition
Definition: restart.F90:156
integer, parameter, public restart_custom
Definition: restart.F90:156
subroutine drestart_write_binary5(restart, filename, np, ff, ierr, root)
Definition: restart.F90:1568
subroutine restart_basic_end(restart)
Definition: restart.F90:879
subroutine restart_basic_open_dir(restart, dirname, ierr)
Change the restart directory to dirname, where "dirname" is a subdirectory of the base restart direct...
Definition: restart.F90:942
integer, parameter, public restart_dm
Definition: restart.F90:156
subroutine restart_basic_mkdir(restart, dirname)
Make directory "dirname" inside the current restart directory.
Definition: restart.F90:991
subroutine zrestart_write_mesh_function(restart, filename, mesh, ff, ierr, root)
Definition: restart.F90:1905
integer, parameter, public restart_all
Definition: restart.F90:156
subroutine restart_basic_close(restart, iunit)
Close a file previously opened with restart_basic_open.
Definition: restart.F90:1123
subroutine drestart_read_binary1(restart, filename, np, ff, ierr)
Definition: restart.F90:1610
subroutine restart_basic_close_dir(restart)
Change back to the base directory. To be called after restart_basic_open_dir.
Definition: restart.F90:976
subroutine zrestart_write_binary1(restart, filename, np, ff, ierr, root)
Definition: restart.F90:2082
integer, parameter, public restart_casida
Definition: restart.F90:156
subroutine zrestart_write_binary5_int32(restart, filename, np, ff, ierr, root)
Definition: restart.F90:2402
logical function, public clean_stop(comm)
returns true if a file named stop exists
Definition: restart.F90:337
subroutine zrestart_read_binary5_int32(restart, filename, np, ff, ierr)
Definition: restart.F90:2457
integer, parameter, public restart_kdotp
Definition: restart.F90:156
subroutine zrestart_read_binary3(restart, filename, np, ff, ierr)
Definition: restart.F90:2306
integer, parameter, public restart_oct
Definition: restart.F90:156
subroutine drestart_read_binary3_int32(restart, filename, np, ff, ierr)
Definition: restart.F90:1804
type(restart_basic_data_t), dimension(restart_undefined:restart_n_data_types), parameter basic_info
Information about the components for a given system.
Definition: restart.F90:297
subroutine zrestart_read_binary3_int32(restart, filename, np, ff, ierr)
Definition: restart.F90:2444
subroutine drestart_read_binary2(restart, filename, np, ff, ierr)
Definition: restart.F90:1638
integer, parameter, public restart_gs
Definition: restart.F90:156
subroutine zrestart_read_binary1_int32(restart, filename, np, ff, ierr)
Definition: restart.F90:2416
integer, parameter, public restart_iteration
Definition: restart.F90:156
subroutine drestart_write_binary3(restart, filename, np, ff, ierr, root)
Definition: restart.F90:1526
integer, parameter, public restart_flag_mix
Definition: restart.F90:189
subroutine drestart_write_binary3_int32(restart, filename, np, ff, ierr, root)
Definition: restart.F90:1748
subroutine zrestart_write_binary1_int32(restart, filename, np, ff, ierr, root)
Definition: restart.F90:2360
subroutine restart_init(restart, namespace, data_type, type, mc, ierr, mesh, dir, exact)
Initializes a specific restart object.
Definition: restart.F90:709
integer function restart_basic_open(restart, filename, status, position, silent)
Open file "filename" found inside the current restart directory. Depending on the type of restart,...
Definition: restart.F90:1031
integer, parameter, public restart_flag_skip
Definition: restart.F90:189
integer, parameter, public restart_em_resp_fd
Definition: restart.F90:156
subroutine drestart_read_binary2_int32(restart, filename, np, ff, ierr)
Definition: restart.F90:1790
subroutine drestart_write_binary5_int32(restart, filename, np, ff, ierr, root)
Definition: restart.F90:1762
subroutine restart_basic_rm(restart, name)
Remove directory or file "name" that is located inside the current restart directory.
Definition: restart.F90:1009
subroutine restart_end(restart)
Definition: restart.F90:893
integer, parameter, public restart_proj
Definition: restart.F90:156
subroutine zrestart_read_binary1(restart, filename, np, ff, ierr)
Definition: restart.F90:2250
integer, parameter, public restart_flag_rho
Definition: restart.F90:189
integer, parameter, public restart_em_resp
Definition: restart.F90:156
integer, parameter, public restart_vib_modes
Definition: restart.F90:156
subroutine drestart_write_binary1(restart, filename, np, ff, ierr, root)
Definition: restart.F90:1442
subroutine drestart_read_binary1_int32(restart, filename, np, ff, ierr)
Definition: restart.F90:1776
subroutine zrestart_write_binary5(restart, filename, np, ff, ierr, root)
Definition: restart.F90:2208
integer, parameter, public restart_flag_vhxc
Definition: restart.F90:189
logical pure function restart_basic_has_flag(restart, flag)
Returns true if...
Definition: restart.F90:1152
subroutine restart_basic_write(restart, iunit, lines, nlines, ierr)
Definition: restart.F90:1079
integer, parameter, public restart_flag_literal
Definition: restart.F90:189
subroutine drestart_read_binary5_int32(restart, filename, np, ff, ierr)
Definition: restart.F90:1817
subroutine drestart_write_binary2(restart, filename, np, ff, ierr, root)
Definition: restart.F90:1484
subroutine drestart_read_binary5(restart, filename, np, ff, ierr)
Definition: restart.F90:1693
character(len=max_path_len) function restart_basic_dir(restart)
Returns the name of the directory containing the restart information. The use of this function should...
Definition: restart.F90:927
subroutine zrestart_write_binary2_int32(restart, filename, np, ff, ierr, root)
Definition: restart.F90:2374
character(len=4), dimension(2), parameter type_string
Definition: restart.F90:207
subroutine drestart_write_mesh_function(restart, filename, mesh, ff, ierr, root)
Definition: restart.F90:1265
logical pure function restart_basic_skip(restart)
Returns true if the restart information should neither be read nor written. This might happen because...
Definition: restart.F90:1142
integer, parameter, public restart_td
Definition: restart.F90:156
integer, parameter, public restart_type_load
Definition: restart.F90:184
character(:) function, allocatable restart_basic_get_info(restart)
Definition: restart.F90:1178
subroutine restart_basic_read(restart, iunit, lines, nlines, ierr)
Definition: restart.F90:1106
subroutine zrestart_read_binary2(restart, filename, np, ff, ierr)
Definition: restart.F90:2278
integer pure function restart_basic_get_data_type(restart)
Returns the data type of the restart.
Definition: restart.F90:1172
integer, parameter, public restart_vdw
Definition: restart.F90:156
subroutine zrestart_read_binary5(restart, filename, np, ff, ierr)
Definition: restart.F90:2333
subroutine zrestart_write_binary2(restart, filename, np, ff, ierr, root)
Definition: restart.F90:2124
integer, parameter, public restart_unocc
Definition: restart.F90:156
subroutine zrestart_write_binary3(restart, filename, np, ff, ierr, root)
Definition: restart.F90:2166
subroutine zrestart_read_binary2_int32(restart, filename, np, ff, ierr)
Definition: restart.F90:2430
logical function restart_basic_do_i_write(restart)
Definition: restart.F90:695
character(:) function, allocatable restart_get_info(restart)
Definition: restart.F90:1187
subroutine restart_basic_init(restart, namespace, data_type, type, ierr, dir)
Definition: restart.F90:369
subroutine drestart_write_binary2_int32(restart, filename, np, ff, ierr, root)
Definition: restart.F90:1734
subroutine, public add_last_slash(str)
Adds a '/' in the end of the string, only if it missing. Useful for directories.
Definition: string.F90:162
This module defines the unit system, used for input and output.
Describes mesh distribution to nodes.
Definition: mesh.F90:187
Stores all communicators and groups.
Definition: multicomm.F90:208
restart_basic_data_t stores global information about a specific component we want to save....
Definition: restart.F90:199
restart_basic_t stores the basic information about a restart object.
Definition: restart.F90:217
int true(void)