Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Gyacomo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Antoine Cyril David Hoffmann
Gyacomo
Commits
54e987c4
Commit
54e987c4
authored
2 years ago
by
Antoine Cyril David Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
Restart loads full checkpoint on every process, 10x faster on marconi
parent
9f046171
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/restarts_mod.F90
+28
-8
28 additions, 8 deletions
src/restarts_mod.F90
with
28 additions
and
8 deletions
src/restarts_mod.F90
+
28
−
8
View file @
54e987c4
...
@@ -12,7 +12,7 @@ IMPLICIT NONE
...
@@ -12,7 +12,7 @@ IMPLICIT NONE
INTEGER
::
rank
,
sz_
,
n_
INTEGER
::
rank
,
sz_
,
n_
INTEGER
::
dims
(
1
)
=
(/
0
/)
INTEGER
::
dims
(
1
)
=
(/
0
/)
CHARACTER
(
LEN
=
50
)
::
dset_name
CHARACTER
(
LEN
=
50
)
::
dset_name
INTEGER
::
pmaxe_cp
,
jmaxe_cp
,
pmaxi_cp
,
jmaxi_cp
,
n0
INTEGER
::
pmaxe_cp
,
jmaxe_cp
,
pmaxi_cp
,
jmaxi_cp
,
n0
,
Nkx_cp
,
Nky_cp
,
Nz_cp
COMPLEX
(
dp
),
DIMENSION
(:,:,:,:,:),
ALLOCATABLE
::
moments_e_cp
COMPLEX
(
dp
),
DIMENSION
(:,:,:,:,:),
ALLOCATABLE
::
moments_e_cp
COMPLEX
(
dp
),
DIMENSION
(:,:,:,:,:),
ALLOCATABLE
::
moments_i_cp
COMPLEX
(
dp
),
DIMENSION
(:,:,:,:,:),
ALLOCATABLE
::
moments_i_cp
...
@@ -25,9 +25,8 @@ CONTAINS
...
@@ -25,9 +25,8 @@ CONTAINS
!******************************************************************************!
!******************************************************************************!
SUBROUTINE
load_moments
SUBROUTINE
load_moments
IMPLICIT
NONE
IMPLICIT
NONE
REAL
::
timer_tot_1
,
timer_find_CP_1
,
timer_load_mom_1
REAL
::
timer_tot_1
,
timer_find_CP_1
,
timer_load_mom_1
REAL
::
timer_tot_2
,
timer_find_CP_2
,
timer_load_mom_2
REAL
::
timer_tot_2
,
timer_find_CP_2
,
timer_load_mom_2
CALL
cpu_time
(
timer_tot_1
)
CALL
cpu_time
(
timer_tot_1
)
! Checkpoint filename
! Checkpoint filename
...
@@ -37,6 +36,9 @@ CONTAINS
...
@@ -37,6 +36,9 @@ CONTAINS
! Open file
! Open file
CALL
openf
(
rstfile
,
fidrst
,
mpicomm
=
comm0
)
CALL
openf
(
rstfile
,
fidrst
,
mpicomm
=
comm0
)
! Get the checkpoint moments degrees to allocate memory
! Get the checkpoint moments degrees to allocate memory
CALL
getatt
(
fidrst
,
"/data/input/"
,
"Nkx"
,
Nkx_cp
)
CALL
getatt
(
fidrst
,
"/data/input/"
,
"Nky"
,
Nky_cp
)
CALL
getatt
(
fidrst
,
"/data/input/"
,
"Nz"
,
Nz_cp
)
IF
(
KIN_E
)
THEN
IF
(
KIN_E
)
THEN
CALL
getatt
(
fidrst
,
"/data/input/"
,
"pmaxe"
,
pmaxe_cp
)
CALL
getatt
(
fidrst
,
"/data/input/"
,
"pmaxe"
,
pmaxe_cp
)
CALL
getatt
(
fidrst
,
"/data/input/"
,
"jmaxe"
,
jmaxe_cp
)
CALL
getatt
(
fidrst
,
"/data/input/"
,
"jmaxe"
,
jmaxe_cp
)
...
@@ -78,12 +80,30 @@ CONTAINS
...
@@ -78,12 +80,30 @@ CONTAINS
CALL
cpu_time
(
timer_load_mom_1
)
CALL
cpu_time
(
timer_load_mom_1
)
! Read state of system from checkpoint file
! Read state of system from checkpoint file
! Super slow futils routine in Marconi.... but spare RAM
! IF (KIN_E) THEN
! WRITE(dset_name, "(A, '/', i6.6)") "/data/var5d/moments_e", n_
! CALL getarrnd(fidrst, dset_name, moments_e(ips_e:ipe_e, ijs_e:ije_e, ikys:ikye, ikxs:ikxe, izs:ize, 1),(/1,3,5/))
! ENDIF
! WRITE(dset_name, "(A, '/', i6.6)") "/data/var5d/moments_i", n_
! CALL getarrnd(fidrst, dset_name, moments_i(ips_i:ipe_i, ijs_i:ije_i, ikys:ikye, ikxs:ikxe, izs:ize, 1),(/1,3,5/))
! Brute force loading: load the full moments and take what is needed (RAM dangerous...)
IF
(
KIN_E
)
THEN
IF
(
KIN_E
)
THEN
WRITE
(
dset_name
,
"(A, '/', i6.6)"
)
"/data/var5d/moments_e"
,
n_
CALL
allocate_array
(
moments_e_cp
,
1
,
Nky_cp
,
1
,
Nkx_cp
,
1
,
Nz_cp
,
1
,
pmaxe_cp
+1
,
1
,
jmaxe_cp
+1
)
CALL
getarrnd
(
fidrst
,
dset_name
,
moments_e
(
ips_e
:
ipe_e
,
ijs_e
:
ije_e
,
ikys
:
ikye
,
ikxs
:
ikxe
,
izs
:
ize
,
1
),(/
1
,
3
,
5
/))
WRITE
(
dset_name
,
"(A, '/', i6.6)"
)
"/data/var5d/moments_e"
,
n_
CALL
getarr
(
fidrst
,
dset_name
,
moments_e_cp
(:,:,:,:,:))
moments_e
(
ips_e
:
ipe_e
,
ijs_e
:
ije_e
,
ikys
:
ikye
,
ikxs
:
ikxe
,
izs
:
ize
,
1
)
&
=
moments_e_cp
(
ips_e
:
ipe_e
,
ijs_e
:
ije_e
,
ikys
:
ikye
,
ikxs
:
ikxe
,
izs
:
ize
)
DEALLOCATE
(
moments_e_cp
)
ENDIF
ENDIF
CALL
allocate_array
(
moments_i_cp
,
1
,
pmaxi_cp
+1
,
1
,
jmaxi_cp
+1
,
1
,
Nky_cp
,
1
,
Nkx_cp
,
1
,
Nz_cp
)
WRITE
(
dset_name
,
"(A, '/', i6.6)"
)
"/data/var5d/moments_i"
,
n_
WRITE
(
dset_name
,
"(A, '/', i6.6)"
)
"/data/var5d/moments_i"
,
n_
CALL
getarrnd
(
fidrst
,
dset_name
,
moments_i
(
ips_i
:
ipe_i
,
ijs_i
:
ije_i
,
ikys
:
ikye
,
ikxs
:
ikxe
,
izs
:
ize
,
1
),(/
1
,
3
,
5
/))
CALL
getarr
(
fidrst
,
dset_name
,
moments_i_cp
(:,:,:,:,:))
moments_i
(
ips_i
:
ipe_i
,
ijs_i
:
ije_i
,
ikys
:
ikye
,
ikxs
:
ikxe
,
izs
:
ize
,
1
)
&
=
moments_i_cp
(
ips_i
:
ipe_i
,
ijs_i
:
ije_i
,
ikys
:
ikye
,
ikxs
:
ikxe
,
izs
:
ize
)
DEALLOCATE
(
moments_i_cp
)
CALL
closef
(
fidrst
)
CALL
closef
(
fidrst
)
...
@@ -93,7 +113,7 @@ CONTAINS
...
@@ -93,7 +113,7 @@ CONTAINS
CALL
cpu_time
(
timer_tot_2
)
CALL
cpu_time
(
timer_tot_2
)
CALL
mpi_barrier
(
MPI_COMM_WORLD
,
ierr
)
CALL
mpi_barrier
(
MPI_COMM_WORLD
,
ierr
)
IF
(
my_id
.EQ.
0
)
WRITE
(
*
,
*
)
'** Time load mom : '
,
timer_load_mom_2
-
timer_load_mom_1
,
' **'
IF
(
my_id
.EQ.
0
)
WRITE
(
*
,
*
)
'** Time load mom : '
,
timer_load_mom_2
-
timer_load_mom_1
,
' **'
IF
(
my_id
.EQ.
0
)
WRITE
(
*
,
*
)
'** Total load time : '
,
timer_tot_2
-
timer_tot_1
,
' **'
IF
(
my_id
.EQ.
0
)
WRITE
(
*
,
*
)
'** Total load time : '
,
timer_tot_2
-
timer_tot_1
,
' **'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment