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
d557efa4
Commit
d557efa4
authored
4 years ago
by
Antoine Cyril David Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
Resolved a bug on checkpoint saves and reload
parent
63124252
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/diagnose.F90
+20
-4
20 additions, 4 deletions
src/diagnose.F90
src/inital.F90
+13
-8
13 additions, 8 deletions
src/inital.F90
with
33 additions
and
12 deletions
src/diagnose.F90
+
20
−
4
View file @
d557efa4
...
...
@@ -43,6 +43,7 @@ SUBROUTINE diagnose(kstep)
CALL
creatg
(
fidrst
,
'/Basic'
,
'Basic data'
)
CALL
creatg
(
fidrst
,
'/Basic/moments_e'
,
'electron moments'
)
CALL
creatg
(
fidrst
,
'/Basic/moments_i'
,
'ion moments'
)
CALL
creatg
(
fidrst
,
'/Basic/phi'
,
'ES potential'
)
IF
(
my_id
.EQ.
0
)
WRITE
(
*
,
'(3x,a,a)'
)
TRIM
(
rstfile
),
' created'
CALL
flush
(
6
)
...
...
@@ -442,10 +443,10 @@ SUBROUTINE checkpoint_save(cp_step)
WRITE
(
dset_name
,
"(A, '/', i6.6)"
)
"/Basic/moments_e"
,
cp_step
IF
(
num_procs
.EQ.
1
)
THEN
CALL
putarr
(
fidrst
,
dset_name
,
moments_e
(
ips_e
:
ipe_e
,
ijs_e
:
ije_e
,&
ikrs
:
ikre
,
ikzs
:
ikze
,
updatetlevel
),
ionode
=
0
)
ikrs
:
ikre
,
ikzs
:
ikze
,
1
),
ionode
=
0
)
ELSE
CALL
putarr
(
fidrst
,
dset_name
,
moments_e
(
ips_e
:
ipe_e
,
ijs_e
:
ije_e
,&
ikrs
:
ikre
,
ikzs
:
ikze
,
updatetlevel
),
pardim
=
3
)
ikrs
:
ikre
,
ikzs
:
ikze
,
1
),
pardim
=
3
)
ENDIF
CALL
attach
(
fidrst
,
dset_name
,
'cstep'
,
cstep
)
...
...
@@ -458,10 +459,25 @@ SUBROUTINE checkpoint_save(cp_step)
WRITE
(
dset_name
,
"(A, '/', i6.6)"
)
"/Basic/moments_i"
,
cp_step
IF
(
num_procs
.EQ.
1
)
THEN
CALL
putarr
(
fidrst
,
dset_name
,
moments_i
(
ips_i
:
ipe_i
,
ijs_i
:
ije_i
,&
ikrs
:
ikre
,
ikzs
:
ikze
,
updatetlevel
),
ionode
=
0
)
ikrs
:
ikre
,
ikzs
:
ikze
,
1
),
ionode
=
0
)
ELSE
CALL
putarr
(
fidrst
,
dset_name
,
moments_i
(
ips_i
:
ipe_i
,
ijs_i
:
ije_i
,&
ikrs
:
ikre
,
ikzs
:
ikze
,
updatetlevel
),
pardim
=
3
)
ikrs
:
ikre
,
ikzs
:
ikze
,
1
),
pardim
=
3
)
ENDIF
CALL
attach
(
fidrst
,
dset_name
,
'cstep'
,
cstep
)
CALL
attach
(
fidrst
,
dset_name
,
'time'
,
time
)
CALL
attach
(
fidrst
,
dset_name
,
'jobnum'
,
jobnum
)
CALL
attach
(
fidrst
,
dset_name
,
'dt'
,
dt
)
CALL
attach
(
fidrst
,
dset_name
,
'iframe2d'
,
iframe2d
)
CALL
attach
(
fidrst
,
dset_name
,
'iframe5d'
,
iframe5d
)
! Write state of system to restart file
WRITE
(
dset_name
,
"(A, '/', i6.6)"
)
"/Basic/phi"
,
cp_step
IF
(
num_procs
.EQ.
1
)
THEN
CALL
putarr
(
fidrst
,
dset_name
,
phi
(
ikrs
:
ikre
,
ikzs
:
ikze
),
ionode
=
0
)
ELSE
CALL
putarr
(
fidrst
,
dset_name
,
phi
(
ikrs
:
ikre
,
ikzs
:
ikze
),
pardim
=
1
)
ENDIF
CALL
attach
(
fidrst
,
dset_name
,
'cstep'
,
cstep
)
...
...
This diff is collapsed.
Click to expand it.
src/inital.F90
+
13
−
8
View file @
d557efa4
...
...
@@ -21,10 +21,11 @@ SUBROUTINE inital
CALL
load_cp
ELSE
CALL
init_moments
!!!!!! Set phi !!!!!!
IF
(
my_id
.EQ.
1
)
WRITE
(
*
,
*
)
'Init phi'
CALL
poisson
ENDIF
!!!!!! Set phi !!!!!!
IF
(
my_id
.EQ.
1
)
WRITE
(
*
,
*
)
'Init phi'
CALL
poisson
!!!!!! Set Sepj, Sipj and dnjs coeff table !!!!!!
IF
(
NON_LIN
.OR.
(
A0KH
.NE.
0
))
THEN
;
...
...
@@ -124,7 +125,7 @@ SUBROUTINE load_cp
WRITE
(
rstfile
,
'(a,a1,i2.2,a3)'
)
TRIM
(
rstfile0
),
'_'
,
job2load
,
'.h5'
WRITE
(
*
,
'(3x,a)'
)
"Resume from previous run"
IF
(
my_id
.EQ.
0
)
WRITE
(
*
,
'(3x,a)'
)
"Resume from previous run"
CALL
openf
(
rstfile
,
fidrst
,
mpicomm
=
MPI_COMM_WORLD
)
...
...
@@ -139,9 +140,13 @@ SUBROUTINE load_cp
WRITE
(
dset_name
,
"(A, '/', i6.6)"
)
"/Basic/moments_i"
,
n_
! Read state of system from restart file
CALL
getarr
(
fidrst
,
dset_name
,
moments_i
(
ips_i
:
ipe_i
,
ijs_i
:
ije_i
,
ikrs
:
ikre
,
ikzs
:
ikze
,
updatetlevel
),
pardim
=
3
)
CALL
getarr
(
fidrst
,
dset_name
,
moments_e
(
ips_e
:
ipe_e
,
ijs_e
:
ije_e
,
ikrs
:
ikre
,
ikzs
:
ikze
,
updatetlevel
),
pardim
=
3
)
WRITE
(
dset_name
,
"(A, '/', i6.6)"
)
"/Basic/moments_i"
,
n_
CALL
getarr
(
fidrst
,
dset_name
,
moments_i
(
ips_i
:
ipe_i
,
ijs_i
:
ije_i
,
ikrs
:
ikre
,
ikzs
:
ikze
,
1
),
pardim
=
3
)
WRITE
(
dset_name
,
"(A, '/', i6.6)"
)
"/Basic/moments_e"
,
n_
CALL
getarr
(
fidrst
,
dset_name
,
moments_e
(
ips_e
:
ipe_e
,
ijs_e
:
ije_e
,
ikrs
:
ikre
,
ikzs
:
ikze
,
1
),
pardim
=
3
)
WRITE
(
dset_name
,
"(A, '/', i6.6)"
)
"/Basic/phi"
,
n_
CALL
getarr
(
fidrst
,
dset_name
,
phi
(
ikrs
:
ikre
,
ikzs
:
ikze
),
pardim
=
1
)
! Read time dependent attributes
CALL
getatt
(
fidrst
,
dset_name
,
'cstep'
,
cstep
)
CALL
getatt
(
fidrst
,
dset_name
,
'time'
,
time
)
...
...
@@ -153,7 +158,7 @@ SUBROUTINE load_cp
CALL
closef
(
fidrst
)
WRITE
(
*
,
'(3x,a)'
)
"Reading from restart file "
//
TRIM
(
rstfile
)//
" completed!"
IF
(
my_id
.EQ.
0
)
WRITE
(
*
,
'(3x,a)'
)
"Reading from restart file "
//
TRIM
(
rstfile
)//
" completed!"
END
SUBROUTINE
load_cp
!******************************************************************************!
...
...
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