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
90665b46
Commit
90665b46
authored
3 years ago
by
Antoine Cyril David Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
inputfile+jobid e.g. fort_00.90. the id is set as first or third arg
parent
b266f63f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/basic_mod.F90
+24
-1
24 additions, 1 deletion
src/basic_mod.F90
src/ppinit.F90
+2
-6
2 additions, 6 deletions
src/ppinit.F90
with
26 additions
and
7 deletions
src/basic_mod.F90
+
24
−
1
View file @
90665b46
...
@@ -58,7 +58,6 @@ MODULE basic
...
@@ -58,7 +58,6 @@ MODULE basic
END
INTERFACE
allocate_array
END
INTERFACE
allocate_array
CONTAINS
CONTAINS
!================================================================================
!================================================================================
SUBROUTINE
basic_data
SUBROUTINE
basic_data
! Read basic data for input file
! Read basic data for input file
...
@@ -66,6 +65,8 @@ CONTAINS
...
@@ -66,6 +65,8 @@ CONTAINS
use
prec_const
use
prec_const
IMPLICIT
NONE
IMPLICIT
NONE
CALL
find_input_file
NAMELIST
/
BASIC
/
nrun
,
dt
,
tmax
,
maxruntime
NAMELIST
/
BASIC
/
nrun
,
dt
,
tmax
,
maxruntime
READ
(
lu_in
,
basic
)
READ
(
lu_in
,
basic
)
...
@@ -76,6 +77,28 @@ CONTAINS
...
@@ -76,6 +77,28 @@ CONTAINS
END
SUBROUTINE
basic_data
END
SUBROUTINE
basic_data
!================================================================================
!================================================================================
SUBROUTINE
find_input_file
IMPLICIT
NONE
CHARACTER
(
len
=
32
)
::
str
,
input_file
INTEGER
::
nargs
,
fileid
,
l
LOGICAL
::
mlexist
nargs
=
COMMAND_ARGUMENT_COUNT
()
IF
((
nargs
.EQ.
1
)
.OR.
(
nargs
.EQ.
3
))
THEN
CALL
GET_COMMAND_ARGUMENT
(
nargs
,
str
,
l
,
ierr
)
READ
(
str
(
1
:
l
),
'(i3)'
)
fileid
WRITE
(
input_file
,
'(a,a1,i2.2,a3)'
)
'fort'
,
'_'
,
fileid
,
'.90'
INQUIRE
(
file
=
input_file
,
exist
=
mlexist
)
IF
(
mlexist
)
THEN
IF
(
my_id
.EQ.
0
)
write
(
*
,
*
)
'Reading input '
,
input_file
,
'...'
OPEN
(
lu_in
,
file
=
input_file
)
ELSE
IF
(
my_id
.EQ.
0
)
write
(
*
,
*
)
'Reading input fort.90...'
OPEN
(
lu_in
,
file
=
'fort.90'
)
ENDIF
ENDIF
END
SUBROUTINE
find_input_file
!================================================================================
SUBROUTINE
daytim
(
str
)
SUBROUTINE
daytim
(
str
)
! Print date and time
! Print date and time
...
...
This diff is collapsed.
Click to expand it.
src/ppinit.F90
+
2
−
6
View file @
90665b46
...
@@ -19,13 +19,9 @@ SUBROUTINE ppinit
...
@@ -19,13 +19,9 @@ SUBROUTINE ppinit
CALL
MPI_COMM_SIZE
(
MPI_COMM_WORLD
,
num_procs
,
ierr
)
CALL
MPI_COMM_SIZE
(
MPI_COMM_WORLD
,
num_procs
,
ierr
)
nargs
=
COMMAND_ARGUMENT_COUNT
()
nargs
=
COMMAND_ARGUMENT_COUNT
()
IF
(
nargs
.NE.
0
.AND.
nargs
.NE.
ndims
)
THEN
IF
(
my_id
.EQ.
0
)
WRITE
(
*
,
'(a,i4,a)'
)
'Number of arguments not equal to NDIMS ='
,
ndims
,
'!'
CALL
MPI_ABORT
(
MPI_COMM_WORLD
,
-1
,
ierr
)
END
IF
!
!
IF
(
nargs
.
NE
.
0
)
THEN
IF
(
nargs
.
GT
.
1
)
THEN
DO
i
=
1
,
n
arg
s
DO
i
=
1
,
n
dim
s
CALL
GET_COMMAND_ARGUMENT
(
i
,
str
,
l
,
ierr
)
CALL
GET_COMMAND_ARGUMENT
(
i
,
str
,
l
,
ierr
)
READ
(
str
(
1
:
l
),
'(i3)'
)
dims
(
i
)
READ
(
str
(
1
:
l
),
'(i3)'
)
dims
(
i
)
END
DO
END
DO
...
...
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