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
c443c065
Commit
c443c065
authored
2 years ago
by
Antoine Cyril David Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
typo
parent
176e9574
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
+14
-10
14 additions, 10 deletions
src/restarts_mod.F90
with
14 additions
and
10 deletions
src/restarts_mod.F90
+
14
−
10
View file @
c443c065
...
@@ -27,6 +27,7 @@ CONTAINS
...
@@ -27,6 +27,7 @@ CONTAINS
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
INTEGER
::
deltap
=
1
CALL
cpu_time
(
timer_tot_1
)
CALL
cpu_time
(
timer_tot_1
)
! Checkpoint filename
! Checkpoint filename
...
@@ -39,6 +40,7 @@ CONTAINS
...
@@ -39,6 +40,7 @@ CONTAINS
CALL
getatt
(
fidrst
,
"/data/input/"
,
"Nkx"
,
Nkx_cp
)
CALL
getatt
(
fidrst
,
"/data/input/"
,
"Nkx"
,
Nkx_cp
)
CALL
getatt
(
fidrst
,
"/data/input/"
,
"Nky"
,
Nky_cp
)
CALL
getatt
(
fidrst
,
"/data/input/"
,
"Nky"
,
Nky_cp
)
CALL
getatt
(
fidrst
,
"/data/input/"
,
"Nz"
,
Nz_cp
)
CALL
getatt
(
fidrst
,
"/data/input/"
,
"Nz"
,
Nz_cp
)
IF
(
Nz
.EQ.
1
)
deltap
=
2
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
)
...
@@ -91,14 +93,14 @@ CONTAINS
...
@@ -91,14 +93,14 @@ CONTAINS
! Brute force loading: load the full moments and take what is needed (RAM dangerous...)
! Brute force loading: load the full moments and take what is needed (RAM dangerous...)
IF
(
KIN_E
)
THEN
IF
(
KIN_E
)
THEN
CALL
allocate_array
(
moments_e_cp
,
1
,
Nky_cp
,
1
,
Nkx
_cp
,
1
,
N
z
_cp
,
1
,
pmaxe
_cp
+1
,
1
,
jmaxe
_cp
+1
)
CALL
allocate_array
(
moments_e_cp
,
1
,
pmaxe_cp
/
deltap
+1
,
1
,
jmaxe
_cp
+1
,
1
,
N
ky
_cp
,
1
,
Nkx
_cp
,
1
,
Nz
_cp
)
WRITE
(
dset_name
,
"(A, '/', i6.6)"
)
"/data/var5d/moments_e"
,
n_
WRITE
(
dset_name
,
"(A, '/', i6.6)"
)
"/data/var5d/moments_e"
,
n_
CALL
getarr
(
fidrst
,
dset_name
,
moments_e_cp
(:,:,:,:,:))
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
(
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
)
=
moments_e_cp
(
ips_e
:
ipe_e
,
ijs_e
:
ije_e
,
ikys
:
ikye
,
ikxs
:
ikxe
,
izs
:
ize
)
DEALLOCATE
(
moments_e_cp
)
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
)
CALL
allocate_array
(
moments_i_cp
,
1
,
pmaxi_cp
/
deltap
+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
getarr
(
fidrst
,
dset_name
,
moments_i_cp
(:,:,:,:,:))
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
(
ips_i
:
ipe_i
,
ijs_i
:
ije_i
,
ikys
:
ikye
,
ikxs
:
ikxe
,
izs
:
ize
,
1
)
&
...
@@ -127,6 +129,7 @@ CONTAINS
...
@@ -127,6 +129,7 @@ CONTAINS
SUBROUTINE
load_output_adapt_pj
SUBROUTINE
load_output_adapt_pj
IMPLICIT
NONE
IMPLICIT
NONE
INTEGER
::
pmaxloop_e
,
pmaxloop_i
,
jmaxloop_e
,
jmaxloop_i
,
Nkx_cp
,
Nky_cp
,
Nz_cp
INTEGER
::
pmaxloop_e
,
pmaxloop_i
,
jmaxloop_e
,
jmaxloop_i
,
Nkx_cp
,
Nky_cp
,
Nz_cp
INTEGER
::
deltap
=
1
! Checkpoint filename
! Checkpoint filename
WRITE
(
rstfile
,
'(a,a1,i2.2,a3)'
)
TRIM
(
resfile0
),
'_'
,
job2load
,
'.h5'
WRITE
(
rstfile
,
'(a,a1,i2.2,a3)'
)
TRIM
(
resfile0
),
'_'
,
job2load
,
'.h5'
...
@@ -138,6 +141,7 @@ CONTAINS
...
@@ -138,6 +141,7 @@ CONTAINS
CALL
getatt
(
fidrst
,
"/data/input/"
,
"Nkx"
,
Nkx_cp
)
CALL
getatt
(
fidrst
,
"/data/input/"
,
"Nkx"
,
Nkx_cp
)
CALL
getatt
(
fidrst
,
"/data/input/"
,
"Nky"
,
Nky_cp
)
CALL
getatt
(
fidrst
,
"/data/input/"
,
"Nky"
,
Nky_cp
)
CALL
getatt
(
fidrst
,
"/data/input/"
,
"Nz"
,
Nz_cp
)
CALL
getatt
(
fidrst
,
"/data/input/"
,
"Nz"
,
Nz_cp
)
IF
(
Nz
.EQ.
1
)
deltap
=
2
!!!!!!!!! Load electron moments
!!!!!!!!! Load electron moments
IF
(
KIN_E
)
THEN
IF
(
KIN_E
)
THEN
! Get the checkpoint moments degrees to allocate memory
! Get the checkpoint moments degrees to allocate memory
...
@@ -148,7 +152,7 @@ CONTAINS
...
@@ -148,7 +152,7 @@ CONTAINS
CALL
getatt
(
fidrst
,
"/data/input/"
,
"start_iframe5d"
,
n0
)
CALL
getatt
(
fidrst
,
"/data/input/"
,
"start_iframe5d"
,
n0
)
! Allocate the required size to load checkpoints moments
! Allocate the required size to load checkpoints moments
! CALL allocate_array(moments_e_cp, 1,pmaxe_cp+1, 1,jmaxe_cp+1, ikxs,ikxe, ikys,ikye, izs,ize)
! CALL allocate_array(moments_e_cp, 1,pmaxe_cp+1, 1,jmaxe_cp+1, ikxs,ikxe, ikys,ikye, izs,ize)
CALL
allocate_array
(
moments_e_cp
,
1
,
pmaxe_cp
+1
,
1
,
jmaxe_cp
+1
,
1
,
Nky_cp
,
1
,
Nkx_cp
,
1
,
Nz_cp
)
CALL
allocate_array
(
moments_e_cp
,
1
,
pmaxe_cp
/
deltap
+1
,
1
,
jmaxe_cp
+1
,
1
,
Nky_cp
,
1
,
Nkx_cp
,
1
,
Nz_cp
)
! Find the last results of the checkpoint file by iteration
! Find the last results of the checkpoint file by iteration
n_
=
n0
+1
n_
=
n0
+1
WRITE
(
dset_name
,
"(A, '/', i6.6)"
)
"/data/var5d/moments_e"
,
n_
! start with moments_e/000001
WRITE
(
dset_name
,
"(A, '/', i6.6)"
)
"/data/var5d/moments_e"
,
n_
! start with moments_e/000001
...
@@ -160,13 +164,13 @@ CONTAINS
...
@@ -160,13 +164,13 @@ CONTAINS
! Read state of system from checkpoint file and load every moment to change the distribution
! Read state of system from checkpoint file and load every moment to change the distribution
WRITE
(
dset_name
,
"(A, '/', i6.6)"
)
"/data/var5d/moments_e"
,
n_
WRITE
(
dset_name
,
"(A, '/', i6.6)"
)
"/data/var5d/moments_e"
,
n_
! CALL getarrnd(fidrst, dset_name, moments_e_cp(1:pmaxe_cp+1, 1:jmaxe_cp+1, ikys:ikye, ikxs:ikxe, izs:ize),(/1,3/))
! CALL getarrnd(fidrst, dset_name, moments_e_cp(1:pmaxe_cp+1, 1:jmaxe_cp+1, ikys:ikye, ikxs:ikxe, izs:ize),(/1,3/))
CALL
getarr
(
fidrst
,
dset_name
,
moments_e_cp
(
1
:
pmaxe_cp
+1
,
1
:
jmaxe_cp
+1
,
1
:
Nky_cp
,
1
:
Nkx_cp
,
1
:
Nz_cp
))
CALL
getarr
(
fidrst
,
dset_name
,
moments_e_cp
(
1
:
pmaxe_cp
/
deltap
+1
,
1
:
jmaxe_cp
+1
,
1
:
Nky_cp
,
1
:
Nkx_cp
,
1
:
Nz_cp
))
! Initialize simulation moments array with checkpoints ones
! Initialize simulation moments array with checkpoints ones
! (they may have a larger number of polynomials, set to 0 at the begining)
! (they may have a larger number of polynomials, set to 0 at the begining)
moments_e
=
0._dp
;
moments_e
=
0._dp
;
pmaxloop_e
=
min
(
ipe_e
,
pmaxe_cp
+1
)
pmaxloop_e
=
min
(
ipe_e
,
pmaxe_cp
/
deltap
+1
)
jmaxloop_e
=
min
(
ije_e
,
jmaxe_cp
+1
)
jmaxloop_e
=
min
(
ije_e
,
jmaxe_cp
+1
)
IF
(
ips_e
.LE.
pmaxe_cp
+1
)
THEN
IF
(
ips_e
.LE.
pmaxe_cp
/
deltap
+1
)
THEN
DO
ip
=
ips_e
,
pmaxloop_e
DO
ip
=
ips_e
,
pmaxloop_e
IF
(
ijs_e
.LE.
jmaxe_cp
+1
)
THEN
IF
(
ijs_e
.LE.
jmaxe_cp
+1
)
THEN
DO
ij
=
ijs_e
,
jmaxloop_e
DO
ij
=
ijs_e
,
jmaxloop_e
...
@@ -193,7 +197,7 @@ CONTAINS
...
@@ -193,7 +197,7 @@ CONTAINS
CALL
getatt
(
fidrst
,
"/data/input/"
,
"start_iframe5d"
,
n0
)
CALL
getatt
(
fidrst
,
"/data/input/"
,
"start_iframe5d"
,
n0
)
! Allocate the required size to load checkpoints moments
! Allocate the required size to load checkpoints moments
! CALL allocate_array(moments_i_cp, 1,pmaxi_cp+1, 1,jmaxi_cp+1, ikxs,ikxe, ikys,ikye, izs,ize)
! CALL allocate_array(moments_i_cp, 1,pmaxi_cp+1, 1,jmaxi_cp+1, ikxs,ikxe, ikys,ikye, izs,ize)
CALL
allocate_array
(
moments_i_cp
,
1
,
pmaxi_cp
+1
,
1
,
jmaxi_cp
+1
,
1
,
Nky_cp
,
1
,
Nkx_cp
,
1
,
Nz_cp
)
CALL
allocate_array
(
moments_i_cp
,
1
,
pmaxi_cp
/
deltap
+1
,
1
,
jmaxi_cp
+1
,
1
,
Nky_cp
,
1
,
Nkx_cp
,
1
,
Nz_cp
)
! Find the last results of the checkpoint file by iteration
! Find the last results of the checkpoint file by iteration
n_
=
n0
+1
n_
=
n0
+1
WRITE
(
dset_name
,
"(A, '/', i6.6)"
)
"/data/var5d/moments_i"
,
n_
! start with moments_e/000001
WRITE
(
dset_name
,
"(A, '/', i6.6)"
)
"/data/var5d/moments_i"
,
n_
! start with moments_e/000001
...
@@ -206,14 +210,14 @@ CONTAINS
...
@@ -206,14 +210,14 @@ CONTAINS
! Read state of system from checkpoint file and load every moment to change the distribution
! Read state of system from checkpoint file and load every moment to change the distribution
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_cp(1:pmaxi_cp+1, 1:jmaxi_cp+1, ikys:ikye, ikxs:ikxe, izs:ize),(/1,3/))
! CALL getarrnd(fidrst, dset_name, moments_i_cp(1:pmaxi_cp+1, 1:jmaxi_cp+1, ikys:ikye, ikxs:ikxe, izs:ize),(/1,3/))
CALL
getarr
(
fidrst
,
dset_name
,
moments_i_cp
(
1
:
pmaxi_cp
+1
,
1
:
jmaxi_cp
+1
,
1
:
Nky_cp
,
1
:
Nkx_cp
,
1
:
Nz_cp
))
CALL
getarr
(
fidrst
,
dset_name
,
moments_i_cp
(
1
:
pmaxi_cp
/
deltap
+1
,
1
:
jmaxi_cp
+1
,
1
:
Nky_cp
,
1
:
Nkx_cp
,
1
:
Nz_cp
))
! Initialize simulation moments array with checkpoints ones
! Initialize simulation moments array with checkpoints ones
! (they may have a larger number of polynomials, set to 0 at the begining)
! (they may have a larger number of polynomials, set to 0 at the begining)
moments_i
=
0._dp
;
moments_i
=
0._dp
;
pmaxloop_i
=
min
(
ipe_i
,
pmaxi_cp
+1
)
pmaxloop_i
=
min
(
ipe_i
,
pmaxi_cp
/
deltap
+1
)
jmaxloop_i
=
min
(
ije_i
,
jmaxi_cp
+1
)
jmaxloop_i
=
min
(
ije_i
,
jmaxi_cp
+1
)
IF
(
ips_i
.LE.
pmaxi_cp
+1
)
THEN
IF
(
ips_i
.LE.
pmaxi_cp
/
deltap
+1
)
THEN
DO
ip
=
ips_i
,
pmaxloop_i
DO
ip
=
ips_i
,
pmaxloop_i
IF
(
ijs_i
.LE.
jmaxi_cp
+1
)
THEN
IF
(
ijs_i
.LE.
jmaxi_cp
+1
)
THEN
DO
ij
=
ijs_i
,
jmaxloop_i
DO
ij
=
ijs_i
,
jmaxloop_i
...
...
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