46 character(len=3) :: my_name
51 logical :: check_st_control
52 logical :: check_st_integer
53 logical :: check_st_real_r4
54 logical :: check_st_real_r8
55 integer :: test_dim_st_control
56 integer :: test_dim_st_integer
57 integer :: test_dim_st_real_r4
58 integer :: test_dim_st_real_r8
59 integer :: test_dim_cp_control
60 integer :: test_dim_cp_integer
61 integer :: test_dim_cp_real_r4
62 integer :: test_dim_cp_real_r8
65 integer,
allocatable :: count_psh(:,:)
66 integer,
allocatable :: count_pop(:,:)
67 integer,
allocatable :: index_psh(:,:)
68 integer,
allocatable :: index_pop(:,:)
71 integer(kind=status_kind),
allocatable :: st_control(:,:)
72 integer(kind=status_kind),
allocatable :: st_integer(:,:)
73 integer(kind=status_kind),
allocatable :: st_real_r4(:,:)
74 integer(kind=status_kind),
allocatable :: st_real_r8(:,:)
77 integer,
allocatable :: cp_control(:,:)
78 integer,
allocatable :: cp_integer(:,:)
79 real(4),
allocatable :: cp_real_r4(:,:)
80 real(8),
allocatable :: cp_real_r8(:,:)
83 logical :: recording = .true.
84 logical :: loop_last_step = .false.
86 integer,
allocatable :: count_pop_start(:,:)
87 integer,
allocatable :: index_pop_start(:,:)
100 real(8),
parameter ::
b2mb = 9.536743164062500d-7
101 real(8),
parameter ::
b2gb = 9.313225746154785d-10
208 logical :: is_mpi_init
209 logical :: mpi_init_here
222 if (
cp_i == 0)
return 229 call mpi_initialized(is_mpi_init,mpierr)
232 mpi_init_here = .false.
233 if (.not. is_mpi_init)
then 234 call mpi_init(mpierr)
236 mpi_init_here = .true.
239 call mpi_comm_rank(mpi_comm_world, pe_id, mpierr)
243 if (
root_pe .and. mpi_init_here)
write(*,*)
'MPI initialized by iterative checkpointing tool' 244 if (
root_pe .and. .not.mpi_init_here)
write(*,*)
'MPI already initialized' 280 integer,
intent(in) :: cp_mod_index
294 if (
cp_i .ne. 0 .and.
am%cp_rep)
then 297 write(*,
"(A)")
'Checkpointing information...' 298 write(*,
"(A,I4,A,I4)")
'Iteration number : ',
cp_i 299 write(*,
"(A,I4,A,I4)")
'Time step in iter: ',
cp_t,
' of, ',
cp_nt 301 write(*,
"(A)")
'Active module information:' 302 write(*,
"(A)")
'Name: '//
am%my_name
303 write(*,
"(A,L)")
'Running test mode for module: ',
am%cp_test
321 elseif (
cp_i == 2)
then 346 elseif (
cp_i == 3)
then 405 elseif (
cp_i == 1)
then 417 call mpi_allreduce(
count_psh_mid(types),count_tmp(types),1,mpi_long_long,mpi_sum,mpi_comm_world,mpierr)
472 character(len=19) :: int2char
492 call mpi_allreduce(count_psh(types),count_tmp(types),1,mpi_long_long,mpi_sum,mpi_comm_world,mpierr)
493 count_psh(types) = count_tmp(types)
501 write(*,
"(A)" )
' !!!!!!!!!!!! WARNING !!!!!!!!!!!' 503 write(*,
"(A)" )
' Attempts to push during backward' 504 write(*,
"(A)" )
' sweep detected, this utility ' 505 write(*,
"(A)" )
' will not work so reverting to ' 506 write(*,
"(A)" )
' doing recomputation. ' 513 write(*,
"(A)" )
' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' 517 deallocate(
am%count_psh)
518 deallocate(
am%count_pop)
519 deallocate(
am%index_psh)
520 deallocate(
am%index_pop)
527 if (
cp_i == 1 .and.
am%cp_rep)
then 540 call mpi_allreduce(count_psh(
idx_control),count_tmp(
idx_control),1,mpi_long_long,mpi_sum,mpi_comm_world,mpierr)
541 call mpi_allreduce(count_psh(
idx_integer),count_tmp(
idx_integer),1,mpi_long_long,mpi_sum,mpi_comm_world,mpierr)
542 call mpi_allreduce(count_psh(
idx_real_r4),count_tmp(
idx_real_r4),1,mpi_long_long,mpi_sum,mpi_comm_world,mpierr)
543 call mpi_allreduce(count_psh(
idx_real_r8),count_tmp(
idx_real_r8),1,mpi_long_long,mpi_sum,mpi_comm_world,mpierr)
548 call mpi_allreduce(count_pop(
idx_control),count_tmp(
idx_control),1,mpi_long_long,mpi_sum,mpi_comm_world,mpierr)
549 call mpi_allreduce(count_pop(
idx_integer),count_tmp(
idx_integer),1,mpi_long_long,mpi_sum,mpi_comm_world,mpierr)
550 call mpi_allreduce(count_pop(
idx_real_r4),count_tmp(
idx_real_r4),1,mpi_long_long,mpi_sum,mpi_comm_world,mpierr)
551 call mpi_allreduce(count_pop(
idx_real_r8),count_tmp(
idx_real_r8),1,mpi_long_long,mpi_sum,mpi_comm_world,mpierr)
560 write(*,
"(A)" )
'COUNTS FORWARD VERSUS COUNTS BACKWARD, SHOULD BE EQUAL ' 562 write(*,
"(A)" )
'Forward:' 563 write(*,
"(A,I8)")
'control = ', count_psh(
idx_control)
564 write(*,
"(A,I8)")
'integer = ', count_psh(
idx_integer)
565 write(*,
"(A,I8)")
'real_r4 = ', count_psh(
idx_real_r4)
566 write(*,
"(A,I8)")
'real_r8 = ', count_psh(
idx_real_r8)
568 write(*,
"(A)" )
'Backward:' 569 write(*,
"(A,I8)")
'control = ', count_pop(
idx_control)
570 write(*,
"(A,I8)")
'integer = ', count_pop(
idx_integer)
571 write(*,
"(A,I8)")
'real_r4 = ', count_pop(
idx_real_r4)
572 write(*,
"(A,I8)")
'real_r8 = ', count_pop(
idx_real_r8)
586 call mpi_allreduce(count_psh(
idx_control),count_tmp(
idx_control),1,mpi_long_long,mpi_max,mpi_comm_world,mpierr)
587 call mpi_allreduce(count_psh(
idx_integer),count_tmp(
idx_integer),1,mpi_long_long,mpi_max,mpi_comm_world,mpierr)
588 call mpi_allreduce(count_psh(
idx_real_r4),count_tmp(
idx_real_r4),1,mpi_long_long,mpi_max,mpi_comm_world,mpierr)
589 call mpi_allreduce(count_psh(
idx_real_r8),count_tmp(
idx_real_r8),1,mpi_long_long,mpi_max,mpi_comm_world,mpierr)
598 write(*,
"(A)" )
'Array dimensions for next iteration' 599 write(*,
"(A)" )
'Module ID: '//
am%my_name
601 write(*,
"(A,A)")
'CP_'//
am%my_name//
'_dim_st_control: ', adjustl(trim(int2char))
603 write(*,
"(A,A)")
'CP_'//
am%my_name//
'_dim_st_integer: ', adjustl(trim(int2char))
605 write(*,
"(A,A)")
'CP_'//
am%my_name//
'_dim_st_real_r4: ', adjustl(trim(int2char))
607 write(*,
"(A,A)")
'CP_'//
am%my_name//
'_dim_st_real_r8: ', adjustl(trim(int2char))
619 call mpi_allreduce(index_psh(
idx_control),index_tmp(
idx_control),1,mpi_long_long,mpi_max,mpi_comm_world,mpierr)
620 call mpi_allreduce(index_psh(
idx_integer),index_tmp(
idx_integer),1,mpi_long_long,mpi_max,mpi_comm_world,mpierr)
621 call mpi_allreduce(index_psh(
idx_real_r4),index_tmp(
idx_real_r4),1,mpi_long_long,mpi_max,mpi_comm_world,mpierr)
622 call mpi_allreduce(index_psh(
idx_real_r8),index_tmp(
idx_real_r8),1,mpi_long_long,mpi_max,mpi_comm_world,mpierr)
631 memuse_pe_st(
idx_control,1) =
real(maxval(am%count_psh(:,idx_control)) * status_kind ,8) *
b2gb 632 memuse_pe_st(
idx_integer,1) =
real(maxval(am%count_psh(:,idx_integer)) * status_kind ,8) *
b2gb 633 memuse_pe_st(
idx_real_r4,1) =
real(maxval(am%count_psh(:,idx_real_r4)) * status_kind ,8) *
b2gb 634 memuse_pe_st(
idx_real_r8,1) =
real(maxval(am%count_psh(:,idx_real_r8)) * status_kind ,8) *
b2gb 637 memuse_pe_st(
idx_control,2) =
real(maxval(am%count_pop(:,idx_control)) * status_kind ,8) *
b2gb 638 memuse_pe_st(
idx_integer,2) =
real(maxval(am%count_pop(:,idx_integer)) * status_kind ,8) *
b2gb 639 memuse_pe_st(
idx_real_r4,2) =
real(maxval(am%count_pop(:,idx_real_r4)) * status_kind ,8) *
b2gb 640 memuse_pe_st(
idx_real_r8,2) =
real(maxval(am%count_pop(:,idx_real_r8)) * status_kind ,8) *
b2gb 643 memuse_pe_cp(
idx_control,1) =
real(maxval(am%index_psh(:,idx_control)) * 4 ,8) *
b2gb 644 memuse_pe_cp(
idx_integer,1) =
real(maxval(am%index_psh(:,idx_integer)) * 4 ,8) *
b2gb 645 memuse_pe_cp(
idx_real_r4,1) =
real(maxval(am%index_psh(:,idx_real_r4)) * 4 ,8) *
b2gb 646 memuse_pe_cp(
idx_real_r8,1) =
real(maxval(am%index_psh(:,idx_real_r8)) * 8 ,8) *
b2gb 649 memuse_pe_cp(
idx_control,2) =
real(maxval(am%index_pop(:,idx_control)) * 4 ,8) *
b2gb 650 memuse_pe_cp(
idx_integer,2) =
real(maxval(am%index_pop(:,idx_integer)) * 4 ,8) *
b2gb 651 memuse_pe_cp(
idx_real_r4,2) =
real(maxval(am%index_pop(:,idx_real_r4)) * 4 ,8) *
b2gb 652 memuse_pe_cp(
idx_real_r8,2) =
real(maxval(am%index_pop(:,idx_real_r8)) * 8 ,8) *
b2gb 662 if (.not.
am%cp_test)
then 664 memuse_pe_st = memuse_pe_st *
real(
cp_nt,8)
665 memuse_pe_cp = memuse_pe_cp *
real(
cp_nt,8)
666 memsav_pe = memsav_pe *
real(
cp_nt,8)
672 call mpi_allreduce(memuse_pe_st(types,1),memuse_mn_st(types,1),1,mpi_double_precision,mpi_min,mpi_comm_world,mpierr)
673 call mpi_allreduce(memuse_pe_cp(types,1),memuse_mn_cp(types,1),1,mpi_double_precision,mpi_min,mpi_comm_world,mpierr)
674 call mpi_allreduce(memuse_pe_st(types,1),memuse_mx_st(types,1),1,mpi_double_precision,mpi_max,mpi_comm_world,mpierr)
675 call mpi_allreduce(memuse_pe_cp(types,1),memuse_mx_cp(types,1),1,mpi_double_precision,mpi_max,mpi_comm_world,mpierr)
676 call mpi_allreduce(memuse_pe_st(types,1),memuse_su_st(types,1),1,mpi_double_precision,mpi_sum,mpi_comm_world,mpierr)
677 call mpi_allreduce(memuse_pe_cp(types,1),memuse_su_cp(types,1),1,mpi_double_precision,mpi_sum,mpi_comm_world,mpierr)
678 call mpi_allreduce(memuse_pe_st(types,2),memuse_mn_st(types,2),1,mpi_double_precision,mpi_min,mpi_comm_world,mpierr)
679 call mpi_allreduce(memuse_pe_cp(types,2),memuse_mn_cp(types,2),1,mpi_double_precision,mpi_min,mpi_comm_world,mpierr)
680 call mpi_allreduce(memuse_pe_st(types,2),memuse_mx_st(types,2),1,mpi_double_precision,mpi_max,mpi_comm_world,mpierr)
681 call mpi_allreduce(memuse_pe_cp(types,2),memuse_mx_cp(types,2),1,mpi_double_precision,mpi_max,mpi_comm_world,mpierr)
682 call mpi_allreduce(memuse_pe_st(types,2),memuse_su_st(types,2),1,mpi_double_precision,mpi_sum,mpi_comm_world,mpierr)
683 call mpi_allreduce(memuse_pe_cp(types,2),memuse_su_cp(types,2),1,mpi_double_precision,mpi_sum,mpi_comm_world,mpierr)
684 call mpi_allreduce(memsav_pe(types),memsav_mn(types),1,mpi_double_precision,mpi_min,mpi_comm_world,mpierr)
685 call mpi_allreduce(memsav_pe(types),memsav_mx(types),1,mpi_double_precision,mpi_max,mpi_comm_world,mpierr)
686 call mpi_allreduce(memsav_pe(types),memsav_su(types),1,mpi_double_precision,mpi_sum,mpi_comm_world,mpierr)
691 write(*,
"(A)" )
' MEMORY REQUIREMENTS FOR REFERENCE STATE PUSH (GB of RAM)' 692 write(*,
"(A)" )
' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^' 693 write(*,
"(A)" )
' Minumum across processors (control) ' 695 write(*,
"(A)" )
' Maximum across processors (control) ' 697 write(*,
"(A)" )
' Sum across processors (control) ' 700 write(*,
"(A)" )
' Minumum across processors (integer) ' 702 write(*,
"(A)" )
' Maximum across processors (integer) ' 704 write(*,
"(A)" )
' Sum across processors (integer) ' 707 write(*,
"(A)" )
' Minumum across processors (real_r4) ' 709 write(*,
"(A)" )
' Maximum across processors (real_r4) ' 711 write(*,
"(A)" )
' Sum across processors (real_r4) ' 714 write(*,
"(A)" )
' Minumum across processors (real_r8) ' 716 write(*,
"(A)" )
' Maximum across processors (real_r8) ' 718 write(*,
"(A)" )
' Sum across processors (real_r8) ' 721 write(*,
"(A)" )
' Minumum across processors (Total) ' 723 write(*,
"(A)" )
' Maximum across processors (Total) ' 725 write(*,
"(A)" )
' Sum across processors (Total) ' 731 write(*,
"(A)" )
' MEMORY SAVED BY CHECKING THE STATUS OF CHECKPOINTS (GB of RAM)' 732 write(*,
"(A)" )
' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^' 733 write(*,
"(A)" )
' Minumum across processors (control) ' 735 write(*,
"(A)" )
' Maximum across processors (control) ' 737 write(*,
"(A)" )
' Sum across processors (control) ' 740 write(*,
"(A)" )
' Minumum across processors (integer) ' 742 write(*,
"(A)" )
' Maximum across processors (integer) ' 744 write(*,
"(A)" )
' Sum across processors (integer) ' 747 write(*,
"(A)" )
' Minumum across processors (real_r4) ' 749 write(*,
"(A)" )
' Maximum across processors (real_r4) ' 751 write(*,
"(A)" )
' Sum across processors (real_r4) ' 754 write(*,
"(A)" )
' Minumum across processors (real_r8) ' 756 write(*,
"(A)" )
' Maximum across processors (real_r8) ' 758 write(*,
"(A)" )
' Sum across processors (real_r8) ' 761 write(*,
"(A)" )
' Minumum across processors (total) ' 763 write(*,
"(A)" )
' Maximum across processors (total) ' 765 write(*,
"(A)" )
' Sum across processors (total) ' 772 memuse_mn_st = memuse_pe_st
773 memuse_mn_cp = memuse_pe_cp
774 memuse_mx_st = memuse_pe_st
775 memuse_mx_cp = memuse_pe_cp
776 memuse_su_st = memuse_pe_st
777 memuse_su_cp = memuse_pe_cp
778 memsav_mn = memsav_pe
779 memsav_mx = memsav_pe
780 memsav_su = memsav_pe
783 write(*,
"(A)" )
' MEMORY REQUIREMENTS FOR REFERENCE STATE (Gb of RAM)' 784 write(*,
"(A)" )
' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^' 785 write(*,
"(A)" )
' Control ' 788 write(*,
"(A)" )
' Integer ' 791 write(*,
"(A)" )
' real_r4 ' 794 write(*,
"(A)" )
' real_r8 ' 797 write(*,
"(A)" )
' Total ' 801 write(*,
"(A)" )
' MEMORY SAVED BY CHECKING THE STATUS OF CHECKPOINTS (Gb of RAM)' 802 write(*,
"(A)" )
' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^' 803 write(*,
"(A)" )
' Control ' 806 write(*,
"(A)" )
' Integer ' 809 write(*,
"(A)" )
' real_r4 ' 812 write(*,
"(A)" )
' real_r8 ' 820 write(*,
"(A)" )
'Array dimensions for next iteration' 821 write(*,
"(A)" )
'Module ID: '//
am%my_name
823 write(*,
"(A,A)")
'CP_'//
am%my_name//
'_dim_cp_control: ', adjustl(trim(int2char))
825 write(*,
"(A,A)")
'CP_'//
am%my_name//
'_dim_cp_integer: ', adjustl(trim(int2char))
827 write(*,
"(A,A)")
'CP_'//
am%my_name//
'_dim_cp_real_r4: ', adjustl(trim(int2char))
829 write(*,
"(A,A)")
'CP_'//
am%my_name//
'_dim_cp_real_r8: ', adjustl(trim(int2char))
837 write(*,
"(A)" )
' !!!! WARNING !!!!' 839 write(*,
"(A)" )
' Maximum expected memory use by this module is ' 840 write(*,
"(A)" )
' greater than the user provided estimation for ' 841 write(*,
"(A)" )
' the amount available per processor. ' 843 write(*,
"(A)" )
' Possibility of crash at the next iteration. ' 864 integer,
intent(in) :: ctype,field
866 integer(status_kind) :: docp
872 elseif (ctype == 2)
then 874 elseif (ctype == 3)
then 876 elseif (ctype == 4)
then 878 elseif (ctype == 5)
then 882 elseif (
cp_i == 1 .or.
cp_i == 2)
then 889 elseif (ctype == 2)
then 891 elseif (ctype == 3)
then 893 elseif (ctype == 4)
then 895 elseif (ctype == 5)
then 899 elseif (
cp_i == 3)
then 904 if (
am%check_st_control)
then 925 integer,
intent(in) :: ctype
926 integer,
intent(inout) :: field
928 integer(status_kind) :: docp
934 elseif (ctype == 2)
then 936 elseif (ctype == 3)
then 938 elseif (ctype == 4)
then 940 elseif (ctype == 5)
then 944 elseif (
cp_i == 1 .or.
cp_i == 2)
then 948 if (
am%check_st_control .and.
cp_i == 2) tmp = field
952 elseif (ctype == 2)
then 954 elseif (ctype == 3)
then 956 elseif (ctype == 4)
then 958 elseif (ctype == 5)
then 962 if (
am%check_st_control .and.
cp_i == 2)
then 963 if (field - tmp == 0)
then 966 elseif (field == 0)
then 973 elseif (
cp_i >= 3)
then 976 if (
am%check_st_control)
then 984 elseif (docp == -1)
then 1001 integer,
intent(in) :: field
1002 logical,
optional,
intent(in) :: skip
1004 integer(status_kind) :: docp
1007 if (
present(skip))
then 1015 elseif (
cp_i == 1 .or.
cp_i == 2)
then 1017 if (
am%recording)
then 1024 elseif (
cp_i == 3 .and.
am%recording)
then 1029 if (
am%check_st_integer)
then 1046 integer,
intent(in) :: dimen
1047 integer,
intent(in) :: field(dimen)
1048 logical,
optional,
intent(in) :: skip
1050 integer(status_kind) :: docp
1053 if (
present(skip))
then 1061 elseif (
cp_i == 1 .or.
cp_i == 2)
then 1063 if (
am%recording)
then 1070 elseif (
cp_i == 3 .and.
am%recording)
then 1075 if (
am%check_st_integer)
then 1095 integer,
intent(inout) :: field
1096 logical,
optional,
intent(in) :: skip
1099 integer(status_kind) :: docp
1102 if (
present(skip))
then 1110 elseif (
cp_i == 1 .or.
cp_i == 2)
then 1114 if (
am%check_st_integer .and.
cp_i == 2 .and.
am%recording) tmp = field
1118 if (
am%check_st_integer .and.
cp_i == 2 .and.
am%recording)
then 1119 if ((field - tmp == 0))
then 1122 elseif (field == 0)
then 1129 elseif (
cp_i >= 3)
then 1132 if (
am%check_st_integer)
then 1140 elseif (docp == -1)
then 1152 integer,
intent(in) :: dimen
1153 integer,
intent(inout) :: field(dimen)
1154 logical,
optional,
intent(in) :: skip
1155 integer :: tmp(dimen)
1157 integer(status_kind) :: docp
1160 if (
present(skip))
then 1168 elseif (
cp_i == 1 .or.
cp_i == 2)
then 1172 if (
am%check_st_integer .and.
cp_i == 2 .and.
am%recording) tmp = field
1176 if (
am%check_st_integer .and.
cp_i == 2 .and.
am%recording)
then 1177 if (maxval(abs(field - tmp)) == 0)
then 1180 elseif (maxval(abs(field)) == 0)
then 1187 elseif (
cp_i >= 3)
then 1190 if (
am%check_st_integer)
then 1198 elseif (docp == -1)
then 1213 real(4),
intent(in) :: field
1214 logical,
optional,
intent(in) :: skip
1216 integer(status_kind) :: docp
1219 if (
present(skip))
then 1227 elseif (
cp_i == 1 .or.
cp_i == 2)
then 1229 if (
am%recording)
then 1236 elseif (
cp_i == 3 .and.
am%recording)
then 1241 if (
am%check_st_real_r4)
then 1258 integer,
intent(in) :: dimen
1259 real(4),
intent(in) :: field(dimen)
1260 logical,
optional,
intent(in) :: skip
1262 integer(status_kind) :: docp
1265 if (
present(skip))
then 1273 elseif (
cp_i == 1 .or.
cp_i == 2)
then 1275 if (
am%recording)
then 1282 elseif (
cp_i == 3 .and.
am%recording)
then 1287 if (
am%check_st_real_r4)
then 1304 integer,
intent(in) :: dimen
1305 real(4),
intent(in) :: field(:,:)
1306 logical,
optional,
intent(in) :: skip
1308 integer(status_kind) :: docp
1311 if (
present(skip))
then 1319 elseif (
cp_i == 1 .or.
cp_i == 2)
then 1321 if (
am%recording)
then 1328 elseif (
cp_i == 3 .and.
am%recording)
then 1333 if (
am%check_st_real_r4)
then 1350 integer,
intent(in) :: dimen
1351 real(4),
intent(in) :: field(:,:,:)
1352 logical,
optional,
intent(in) :: skip
1354 integer(status_kind) :: docp
1357 if (
present(skip))
then 1365 elseif (
cp_i == 1 .or.
cp_i == 2)
then 1367 if (
am%recording)
then 1374 elseif (
cp_i == 3 .and.
am%recording)
then 1379 if (
am%check_st_real_r4)
then 1396 integer,
intent(in) :: dimen
1397 real(4),
intent(in) :: field(:,:,:,:)
1398 logical,
optional,
intent(in) :: skip
1400 integer(status_kind) :: docp
1403 if (
present(skip))
then 1411 elseif (
cp_i == 1 .or.
cp_i == 2)
then 1413 if (
am%recording)
then 1420 elseif (
cp_i == 3 .and.
am%recording)
then 1425 if (
am%check_st_real_r4)
then 1445 real(4),
intent(inout) :: field
1446 logical,
optional,
intent(in) :: skip
1449 integer(status_kind) :: docp
1452 if (
present(skip))
then 1458 if(.not.skipcp)
CALL popreal4(field)
1460 elseif (
cp_i == 1 .or.
cp_i == 2)
then 1464 if (
am%check_st_real_r4 .and.
cp_i == 2 .and.
am%recording) tmp = field
1466 if(.not.skipcp)
CALL popreal4(field)
1468 if (
am%check_st_real_r4 .and.
cp_i == 2 .and.
am%recording)
then 1469 if ((field - tmp == 0.0_4))
then 1472 elseif (field == 0.0_4)
then 1479 elseif (
cp_i >= 3)
then 1482 if (
am%check_st_real_r4)
then 1490 elseif (docp == -1)
then 1491 if(.not.skipcp) field = 0.0_4
1502 integer,
intent(in) :: dimen
1503 real(4),
intent(inout) :: field(dimen)
1504 logical,
optional,
intent(in) :: skip
1505 real(4),
allocatable :: tmp(:)
1507 integer(status_kind) :: docp
1510 if (
present(skip))
then 1518 elseif (
cp_i == 1 .or.
cp_i == 2)
then 1522 if (
am%check_st_real_r4 .and.
cp_i == 2 .and.
am%recording)
then 1523 allocate(tmp(dimen))
1529 if (
am%check_st_real_r4 .and.
cp_i == 2 .and.
am%recording)
then 1530 if (maxval(abs(field - tmp)) == 0.0_4)
then 1533 elseif (maxval(abs(field)) == 0.0_4)
then 1541 elseif (
cp_i >= 3)
then 1544 if (
am%check_st_real_r4)
then 1552 elseif (docp == -1)
then 1564 integer,
intent(in) :: dimen
1565 real(4),
intent(inout) :: field(:,:)
1566 logical,
optional,
intent(in) :: skip
1567 real(4),
allocatable :: tmp(:,:)
1569 integer(status_kind) :: docp
1572 if (
present(skip))
then 1580 elseif (
cp_i == 1 .or.
cp_i == 2)
then 1584 if (
am%check_st_real_r4 .and.
cp_i == 2 .and.
am%recording)
then 1585 allocate(tmp(dimen,1))
1586 tmp = reshape(field,(/dimen, 1/))
1591 if (
am%check_st_real_r4 .and.
cp_i == 2 .and.
am%recording)
then 1592 if (maxval(abs(tmp - reshape(field,(/dimen, 1/)))) == 0.0_4)
then 1595 elseif (maxval(abs(field)) == 0.0_4)
then 1603 elseif (
cp_i >= 3)
then 1606 if (
am%check_st_real_r4)
then 1613 (/
size(field,1),
size(field,2)/))
1615 elseif (docp == -1)
then 1627 integer,
intent(in) :: dimen
1628 real(4),
intent(inout) :: field(:,:,:)
1629 logical,
optional,
intent(in) :: skip
1630 real(4),
allocatable :: tmp(:,:)
1632 integer(status_kind) :: docp
1635 if (
present(skip))
then 1643 elseif (
cp_i == 1 .or.
cp_i == 2)
then 1647 if (
am%check_st_real_r4 .and.
cp_i == 2 .and.
am%recording)
then 1648 allocate(tmp(dimen,1))
1649 tmp = reshape(field,(/dimen, 1/))
1654 if (
am%check_st_real_r4 .and.
cp_i == 2 .and.
am%recording)
then 1655 if (maxval(abs(tmp - reshape(field,(/dimen, 1/)))) == 0.0_4)
then 1658 elseif (maxval(abs(field)) == 0.0_4)
then 1666 elseif (
cp_i >= 3)
then 1669 if (
am%check_st_real_r4)
then 1676 (/
size(field,1),
size(field,2),
size(field,3)/))
1678 elseif (docp == -1)
then 1690 integer,
intent(in) :: dimen
1691 real(4),
intent(inout) :: field(:,:,:,:)
1692 logical,
optional,
intent(in) :: skip
1693 real(4),
allocatable :: tmp(:,:)
1695 integer(status_kind) :: docp
1698 if (
present(skip))
then 1706 elseif (
cp_i == 1 .or.
cp_i == 2)
then 1710 if (
am%check_st_real_r4 .and.
cp_i == 2 .and.
am%recording)
then 1711 allocate(tmp(dimen,1))
1712 tmp = reshape(field,(/dimen, 1/))
1717 if (
am%check_st_real_r4 .and.
cp_i == 2 .and.
am%recording)
then 1718 if (maxval(abs(tmp - reshape(field,(/dimen, 1/)))) == 0.0_4)
then 1721 elseif (maxval(abs(field)) == 0.0_4)
then 1729 elseif (
cp_i >= 3)
then 1732 if (
am%check_st_real_r4)
then 1739 (/
size(field,1),
size(field,2),
size(field,3),
size(field,4)/))
1741 elseif (docp == -1)
then 1756 real(8),
intent(in) :: field
1757 logical,
optional,
intent(in) :: skip
1759 integer(status_kind) :: docp
1762 if (
present(skip))
then 1770 elseif (
cp_i == 1 .or.
cp_i == 2)
then 1772 if (
am%recording)
then 1779 elseif (
cp_i == 3 .and.
am%recording)
then 1784 if (
am%check_st_real_r8)
then 1801 integer,
intent(in) :: dimen
1802 real(8),
intent(in) :: field(dimen)
1803 logical,
optional,
intent(in) :: skip
1805 integer(status_kind) :: docp
1808 if (
present(skip))
then 1816 elseif (
cp_i == 1 .or.
cp_i == 2)
then 1818 if (
am%recording)
then 1825 elseif (
cp_i == 3 .and.
am%recording)
then 1830 if (
am%check_st_real_r8)
then 1847 integer,
intent(in) :: dimen
1848 real(8),
intent(in) :: field(:,:)
1849 logical,
optional,
intent(in) :: skip
1851 integer(status_kind) :: docp
1854 if (
present(skip))
then 1862 elseif (
cp_i == 1 .or.
cp_i == 2)
then 1864 if (
am%recording)
then 1871 elseif (
cp_i == 3 .and.
am%recording)
then 1876 if (
am%check_st_real_r8)
then 1893 integer,
intent(in) :: dimen
1894 real(8),
intent(in) :: field(:,:,:)
1895 logical,
optional,
intent(in) :: skip
1897 integer(status_kind) :: docp
1900 if (
present(skip))
then 1908 elseif (
cp_i == 1 .or.
cp_i == 2)
then 1910 if (
am%recording)
then 1917 elseif (
cp_i == 3 .and.
am%recording)
then 1922 if (
am%check_st_real_r8)
then 1939 integer,
intent(in) :: dimen
1940 real(8),
intent(in) :: field(:,:,:,:)
1941 logical,
optional,
intent(in) :: skip
1943 integer(status_kind) :: docp
1946 if (
present(skip))
then 1954 elseif (
cp_i == 1 .or.
cp_i == 2)
then 1956 if (
am%recording)
then 1963 elseif (
cp_i == 3 .and.
am%recording)
then 1968 if (
am%check_st_real_r8)
then 1988 real(8),
intent(inout) :: field
1989 logical,
optional,
intent(in) :: skip
1992 integer(status_kind) :: docp
1995 if (
present(skip))
then 2001 if(.not.skipcp)
CALL popreal8(field)
2003 elseif (
cp_i == 1 .or.
cp_i == 2)
then 2007 if (
am%check_st_real_r8 .and.
cp_i == 2 .and.
am%recording) tmp = field
2009 if(.not.skipcp)
CALL popreal8(field)
2011 if (
am%check_st_real_r8 .and.
cp_i == 2 .and.
am%recording)
then 2012 if ((field - tmp == 0.0_8))
then 2015 elseif (field == 0.0_8)
then 2022 elseif (
cp_i >= 3)
then 2025 if (
am%check_st_real_r8)
then 2033 elseif (docp == -1)
then 2034 if(.not.skipcp) field = 0.0_8
2045 integer,
intent(in) :: dimen
2046 real(8),
intent(inout) :: field(dimen)
2047 logical,
optional,
intent(in) :: skip
2048 real(8),
allocatable :: tmp(:)
2050 integer(status_kind) :: docp
2053 if (
present(skip))
then 2061 elseif (
cp_i == 1 .or.
cp_i == 2)
then 2065 if (
am%check_st_real_r8 .and.
cp_i == 2 .and.
am%recording)
then 2066 allocate(tmp(dimen))
2072 if (
am%check_st_real_r8 .and.
cp_i == 2 .and.
am%recording)
then 2073 if (maxval(abs(field - tmp)) == 0.0_8)
then 2076 elseif (maxval(abs(field)) == 0.0_8)
then 2084 elseif (
cp_i >= 3)
then 2087 if (
am%check_st_real_r8)
then 2095 elseif (docp == -1)
then 2107 integer,
intent(in) :: dimen
2108 real(8),
intent(inout) :: field(:,:)
2109 logical,
optional,
intent(in) :: skip
2110 real(8),
allocatable :: tmp(:,:)
2112 integer(status_kind) :: docp
2115 if (
present(skip))
then 2123 elseif (
cp_i == 1 .or.
cp_i == 2)
then 2127 if (
am%check_st_real_r8 .and.
cp_i == 2 .and.
am%recording)
then 2128 allocate(tmp(dimen,1))
2129 tmp = reshape(field,(/dimen, 1/))
2134 if (
am%check_st_real_r8 .and.
cp_i == 2 .and.
am%recording)
then 2135 if (maxval(abs(tmp - reshape(field,(/dimen, 1/)))) == 0.0_8)
then 2138 elseif (maxval(abs(field)) == 0.0_8)
then 2146 elseif (
cp_i >= 3)
then 2149 if (
am%check_st_real_r8)
then 2156 (/
size(field,1),
size(field,2)/))
2158 elseif (docp == -1)
then 2170 integer,
intent(in) :: dimen
2171 real(8),
intent(inout) :: field(:,:,:)
2172 logical,
optional,
intent(in) :: skip
2173 real(8),
allocatable :: tmp(:,:)
2175 integer(status_kind) :: docp
2178 if (
present(skip))
then 2186 elseif (
cp_i == 1 .or.
cp_i == 2)
then 2190 if (
am%check_st_real_r8 .and.
cp_i == 2 .and.
am%recording)
then 2191 allocate(tmp(dimen,1))
2192 tmp = reshape(field,(/dimen, 1/))
2197 if (
am%check_st_real_r8 .and.
cp_i == 2 .and.
am%recording)
then 2198 if (maxval(abs(tmp - reshape(field,(/dimen, 1/)))) == 0.0_8)
then 2201 elseif (maxval(abs(field)) == 0.0_8)
then 2209 elseif (
cp_i >= 3)
then 2212 if (
am%check_st_real_r8)
then 2219 (/
size(field,1),
size(field,2),
size(field,3)/))
2221 elseif (docp == -1)
then 2233 integer,
intent(in) :: dimen
2234 real(8),
intent(inout) :: field(:,:,:,:)
2235 logical,
optional,
intent(in) :: skip
2236 real(8),
allocatable :: tmp(:,:)
2238 integer(status_kind) :: docp
2241 if (
present(skip))
then 2249 elseif (
cp_i == 1 .or.
cp_i == 2)
then 2253 if (
am%check_st_real_r8 .and.
cp_i == 2 .and.
am%recording)
then 2254 allocate(tmp(dimen,1))
2255 tmp = reshape(field,(/dimen, 1/))
2260 if (
am%check_st_real_r8 .and.
cp_i == 2 .and.
am%recording)
then 2261 if (maxval(abs(tmp - reshape(field,(/dimen, 1/)))) == 0.0_8)
then 2264 elseif (maxval(abs(field)) == 0.0_8)
then 2272 elseif (
cp_i >= 3)
then 2275 if (
am%check_st_real_r8)
then 2282 (/
size(field,1),
size(field,2),
size(field,3),
size(field,4)/))
2284 elseif (docp == -1)
then 2300 real(4),
intent(inout) :: field
2309 real(4),
intent(inout) :: field(:)
2310 integer,
intent(in ) :: dimen
2320 real(4),
intent(inout) :: field(:,:)
2321 integer,
intent(in ) :: dimen
2330 real(4),
intent(inout) :: field(:,:,:)
2331 integer,
intent(in ) :: dimen
2340 real(4),
intent(inout) :: field(:,:,:,:)
2341 integer,
intent(in ) :: dimen
2350 real(8),
intent(inout) :: field
2359 real(8),
intent(inout) :: field(:)
2360 integer,
intent(in ) :: dimen
2369 real(8),
intent(inout) :: field(:,:)
2370 integer,
intent(in ) :: dimen
2379 real(8),
intent(inout) :: field(:,:,:)
2380 integer,
intent(in ) :: dimen
2389 real(8),
intent(inout) :: field(:,:,:,:)
2390 integer,
intent(in ) :: dimen
2410 real(4),
intent(inout) :: field
2420 real(4),
intent(inout) :: field(:)
2421 integer,
intent(in ) :: dimen
2432 real(4),
intent(inout) :: field(:,:)
2433 integer,
intent(in ) :: dimen
2444 real(4),
intent(inout) :: field(:,:,:)
2445 integer,
intent(in ) :: dimen
2456 real(4),
intent(inout) :: field(:,:,:,:)
2457 integer,
intent(in ) :: dimen
2467 real(8),
intent(inout) :: field
2477 real(8),
intent(inout) :: field(:)
2478 integer,
intent(in ) :: dimen
2489 real(8),
intent(inout) :: field(:,:)
2490 integer,
intent(in ) :: dimen
2501 real(8),
intent(inout) :: field(:,:,:)
2502 integer,
intent(in ) :: dimen
2513 real(8),
intent(inout) :: field(:,:,:,:)
2514 integer,
intent(in ) :: dimen
subroutine pop_adm_real_r8_k3(field, dimen)
subroutine pop_adm_real_r4_k3(field, dimen)
subroutine pushcontrol5b(cc)
subroutine psh_real_r8_k2(field, dimen, skip)
subroutine popinteger4(x)
subroutine pop_adm_real_r8_k0(field)
subroutine popcontrol2b(cc)
integer(8), dimension(total_types) count_psh_mid
subroutine pop_real_r8_k0(field, skip)
void popinteger4array(int *x, int n)
void popreal8array(double *x, int n)
subroutine pop_real_r4_k4(field, dimen, skip)
type(cp_iter_controls_type), target, public cp_iter_controls
subroutine, public pushcontrol(ctype, field)
subroutine pop_real_r4_k3(field, dimen, skip)
subroutine, public cp_mod_ini(cp_mod_index)
subroutine psh_real_r4_k4(field, dimen, skip)
subroutine psh_integer_k0(field, skip)
subroutine psh_adm_real_r4_k2(field, dimen)
subroutine psh_real_r8_k1(field, dimen, skip)
subroutine psh_adm_real_r4_k0(field)
subroutine psh_real_r4_k3(field, dimen, skip)
logical, save cp_iter_finalized
subroutine pushcontrol1b(cc)
subroutine psh_real_r8_k4(field, dimen, skip)
subroutine, public cp_mod_mid
subroutine psh_adm_real_r4_k1(field, dimen)
subroutine psh_adm_real_r8_k4(field, dimen)
void pushinteger4array(int *x, int n)
subroutine pushcontrol2b(cc)
subroutine, public cp_mod_end
integer, parameter status_kind
void pushreal8array(double *x, int n)
subroutine psh_real_r4_k1(field, dimen, skip)
void pushreal4array(float *x, int n)
subroutine psh_adm_real_r8_k3(field, dimen)
subroutine psh_real_r8_k3(field, dimen, skip)
subroutine popcontrol5b(cc)
type(cp_iter_type), dimension(:), allocatable, target, public cp_iter
subroutine pop_adm_real_r4_k1(field, dimen)
subroutine, public finalize_cp_iter
logical, save cp_iter_initialized
integer, parameter idx_real_r8
subroutine psh_integer_k1(field, dimen, skip)
subroutine psh_adm_real_r8_k0(field)
integer, parameter idx_real_r4
subroutine psh_adm_real_r8_k2(field, dimen)
subroutine psh_real_r4_k2(field, dimen, skip)
subroutine pop_integer_k1(field, dimen, skip)
subroutine popcontrol3b(cc)
integer, parameter idx_control
subroutine pop_real_r8_k3(field, dimen, skip)
subroutine popcontrol1b(cc)
subroutine pop_real_r4_k1(field, dimen, skip)
subroutine psh_adm_real_r4_k3(field, dimen)
subroutine psh_real_r4_k0(field, skip)
subroutine pop_adm_real_r4_k4(field, dimen)
subroutine popcontrol4b(cc)
subroutine pop_real_r4_k0(field, skip)
subroutine psh_adm_real_r8_k1(field, dimen)
subroutine pushcontrol4b(cc)
subroutine pop_real_r8_k1(field, dimen, skip)
integer, parameter total_types
subroutine pop_adm_real_r4_k0(field)
subroutine pop_real_r8_k4(field, dimen, skip)
type(cp_iter_type), pointer am
subroutine, public initialize_cp_iter
subroutine pop_adm_real_r8_k1(field, dimen)
subroutine pop_real_r8_k2(field, dimen, skip)
subroutine pop_integer_k0(field, skip)
subroutine pop_adm_real_r4_k2(field, dimen)
subroutine pushcontrol3b(cc)
subroutine pop_real_r4_k2(field, dimen, skip)
subroutine psh_adm_real_r4_k4(field, dimen)
integer, parameter idx_integer
subroutine pop_adm_real_r8_k4(field, dimen)
subroutine psh_real_r8_k0(field, skip)
subroutine, public popcontrol(ctype, field)
void popreal4array(float *x, int n)
subroutine pushinteger4(x)
subroutine pop_adm_real_r8_k2(field, dimen)