Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DOUAR WSMP
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
Container 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
HUGG
DOUAR WSMP
Commits
c470b89d
Commit
c470b89d
authored
13 years ago
by
Dave Whipp
Browse files
Options
Downloads
Patches
Plain Diff
Reorganzed output so debug level 1 only writes to screen and debug level 2 writes to files
parent
59f9f40d
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/read_controlling_parameters.f90
+82
-42
82 additions, 42 deletions
src/read_controlling_parameters.f90
src/read_input_file.f90
+331
-178
331 additions, 178 deletions
src/read_input_file.f90
with
413 additions
and
220 deletions
src/read_controlling_parameters.f90
+
82
−
42
View file @
c470b89d
...
@@ -16,17 +16,20 @@
...
@@ -16,17 +16,20 @@
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
subroutine
read_controlling_parameters
(
params
,
threadinfo
)
subroutine
read_controlling_parameters
(
params
,
threadinfo
,
incase
)
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
!(((((((((((((((( Purpose of the routine ))))))))))))))))))))))))))))))))))))))
!(((((((((((((((( Purpose of the routine ))))))))))))))))))))))))))))))))))))))
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
! subroutine to read the main controlling parameters
! subroutine to read the main controlling parameters
! debug is the debug level (0=no debug output, 1=debug output to screen, 2=
! debug output to files in the DEBUG subdirectory - these files can be large!
! restart is a restart flag; if irestart is not 0, the run will restart from
! an output file given by restartfile and at step irestart+1
! ns number of surfaces in the problem
! ns number of surfaces in the problem
! nmat is number of material property arrays
! nmat is number of material property arrays
! restart is a restart flag; if irestart is not 0, the run will restart from
! an output file given by restartfile and at step irestart+1
! nboxes is the number of user supplied pre-refined boxes
! nboxes is the number of user supplied pre-refined boxes
! nsections is the number of user-supplied cross-section locations for output
! doDoRuRe is a flag that triggers the output of various statistics
! doDoRuRe is a flag that triggers the output of various statistics
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
...
@@ -43,13 +46,16 @@ include 'mpif.h'
...
@@ -43,13 +46,16 @@ include 'mpif.h'
type
(
parameters
)
params
type
(
parameters
)
params
type
(
thread
)
threadinfo
type
(
thread
)
threadinfo
integer
ires
character
(
len
=*
)
::
incase
integer
iproc
,
nproc
,
ierr
character
(
len
=
1
)
::
answer
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
!(((((((((((((((( declaration of the subroutine internal variables )))))))))))))
!(((((((((((((((( declaration of the subroutine internal variables )))))))))))))
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
integer
ires
integer
iproc
,
nproc
,
ierr
character
(
len
=
1
)
::
answer
character
(
len
=
3
)
::
ciproc
character
(
len
=
72
)
::
shift
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
...
@@ -57,42 +63,76 @@ character(len=1) :: answer
...
@@ -57,42 +63,76 @@ character(len=1) :: answer
call
mpi_comm_size
(
mpi_comm_world
,
nproc
,
ierr
)
call
mpi_comm_size
(
mpi_comm_world
,
nproc
,
ierr
)
call
mpi_comm_rank
(
mpi_comm_world
,
iproc
,
ierr
)
call
mpi_comm_rank
(
mpi_comm_world
,
iproc
,
ierr
)
if
(
iproc
.eq.
0
)
call
scanfile
(
params
%
infile
,
'irestart'
,
params
%
irestart
,
ires
)
shift
=
' '
call
mpi_bcast
(
params
%
irestart
,
1
,
mpi_integer
,
0
,
mpi_comm_world
,
ierr
)
write
(
threadinfo
%
Logunit
,
*
)
'irestart'
,
params
%
irestart
select
case
(
trim
(
incase
))
if
(
iproc
.eq.
0
)
call
scanfile
(
params
%
infile
,
'restartfile'
,
params
%
restartfile
,
ires
)
case
(
'debug'
)
params
%
debug
=
0
if
(
iproc
.eq.
0
)
call
scanfile
(
params
%
infile
,
'ns'
,
params
%
ns
,
ires
)
if
(
iproc
.eq.
0
)
call
scanfile
(
params
%
infile
,
'debug'
,
params
%
debug
,
ires
)
call
mpi_bcast
(
params
%
ns
,
1
,
mpi_integer
,
0
,
mpi_comm_world
,
ierr
)
call
mpi_bcast
(
params
%
debug
,
1
,
mpi_integer
,
0
,
mpi_comm_world
,
ierr
)
write
(
threadinfo
%
Logunit
,
*
)
'ns'
,
params
%
ns
! Input values are now written to stdout or log files here
if
(
iproc
.eq.
0
)
call
scanfile
(
params
%
infile
,
'nmat'
,
params
%
nmat
,
ires
)
if
(
params
%
debug
.gt.
0
.and.
iproc
.eq.
0
)
then
call
mpi_bcast
(
params
%
nmat
,
1
,
mpi_integer
,
0
,
mpi_comm_world
,
ierr
)
write
(
*
,
'(a)'
)
shift
//
'Input debug level:'
write
(
threadinfo
%
Logunit
,
*
)
'nmat'
,
params
%
nmat
write
(
*
,
'(a16,i3)'
)
shift
//
'debug'
,
params
%
debug
endif
if
(
iproc
.eq.
0
)
call
scanfile
(
params
%
infile
,
'nboxes'
,
params
%
nboxes
,
ires
)
call
mpi_bcast
(
params
%
nboxes
,
1
,
mpi_integer
,
0
,
mpi_comm_world
,
ierr
)
case
(
'main'
)
write
(
threadinfo
%
Logunit
,
*
)
'nboxes'
,
params
%
nboxes
params
%
irestart
=
0
if
(
iproc
.eq.
0
)
call
scanfile
(
params
%
infile
,
'irestart'
,
params
%
irestart
,
ires
)
if
(
iproc
.eq.
0
)
call
scanfile
(
params
%
infile
,
'nsections'
,
params
%
nsections
,
ires
)
call
mpi_bcast
(
params
%
irestart
,
1
,
mpi_integer
,
0
,
mpi_comm_world
,
ierr
)
call
mpi_bcast
(
params
%
nsections
,
1
,
mpi_integer
,
0
,
mpi_comm_world
,
ierr
)
write
(
threadinfo
%
Logunit
,
*
)
'nsections'
,
params
%
nsections
params
%
restartfile
=
'OUT/xxxxxx.bin'
if
(
iproc
.eq.
0
)
call
scanfile
(
params
%
infile
,
'restartfile'
,
params
%
restartfile
,
ires
)
params
%
doDoRuRe
=
.false.
call
mpi_bcast
(
params
%
restartfile
,
128
,
mpi_character
,
0
,
mpi_comm_world
,
ierr
)
if
(
iproc
==
0
)
then
call
scanfile
(
params
%
infile
,
'doDoRuRe'
,
answer
,
ires
)
params
%
ns
=
1
params
%
doDoRuRe
=
(
trim
(
answer
)
==
'T'
)
if
(
iproc
.eq.
0
)
call
scanfile
(
params
%
infile
,
'ns'
,
params
%
ns
,
ires
)
end
if
call
mpi_bcast
(
params
%
ns
,
1
,
mpi_integer
,
0
,
mpi_comm_world
,
ierr
)
call
mpi_bcast
(
params
%
doDoRuRe
,
1
,
mpi_logical
,
0
,
mpi_comm_world
,
ierr
)
write
(
threadinfo
%
Logunit
,
*
)
'doDoRuRe'
,
params
%
doDoRuRe
params
%
nmat
=
1
if
(
iproc
.eq.
0
)
call
scanfile
(
params
%
infile
,
'nmat'
,
params
%
nmat
,
ires
)
call
mpi_bcast
(
params
%
nmat
,
1
,
mpi_integer
,
0
,
mpi_comm_world
,
ierr
)
params
%
nboxes
=
0
if
(
iproc
.eq.
0
)
call
scanfile
(
params
%
infile
,
'nboxes'
,
params
%
nboxes
,
ires
)
call
mpi_bcast
(
params
%
nboxes
,
1
,
mpi_integer
,
0
,
mpi_comm_world
,
ierr
)
params
%
nsections
=
0
if
(
iproc
.eq.
0
)
call
scanfile
(
params
%
infile
,
'nsections'
,
params
%
nsections
,
ires
)
call
mpi_bcast
(
params
%
nsections
,
1
,
mpi_integer
,
0
,
mpi_comm_world
,
ierr
)
params
%
doDoRuRe
=
.false.
if
(
iproc
==
0
)
then
call
scanfile
(
params
%
infile
,
'doDoRuRe'
,
answer
,
ires
)
params
%
doDoRuRe
=
(
trim
(
answer
)
==
'T'
)
endif
call
mpi_bcast
(
params
%
doDoRuRe
,
1
,
mpi_logical
,
0
,
mpi_comm_world
,
ierr
)
! Input values are now written to stdout or log files here
if
(
params
%
debug
.gt.
0
.and.
iproc
.eq.
0
)
then
write
(
*
,
'(a)'
)
shift
//
'Input controlling parameters:'
write
(
*
,
'(a16,l1)'
)
shift
//
'irestart'
,
params
%
irestart
write
(
*
,
'(a16,a)'
)
shift
//
'restartfile'
,
trim
(
params
%
restartfile
)
write
(
*
,
'(a16,i3)'
)
shift
//
'ns'
,
params
%
ns
write
(
*
,
'(a16,i3)'
)
shift
//
'nmat'
,
params
%
nmat
write
(
*
,
'(a16,i3)'
)
shift
//
'nboxes'
,
params
%
nboxes
write
(
*
,
'(a16,i3)'
)
shift
//
'nsections'
,
params
%
nsections
write
(
*
,
'(a16,l1)'
)
shift
//
'doDoRuRe'
,
params
%
doDoRuRe
endif
if
(
params
%
debug
.gt.
1
)
then
write
(
threadinfo
%
Logunit
,
'(a16,l1)'
)
'irestart'
,
params
%
irestart
write
(
threadinfo
%
Logunit
,
'(a16,a)'
)
'restartfile'
,
trim
(
params
%
restartfile
)
write
(
threadinfo
%
Logunit
,
'(a16,i3)'
)
'ns'
,
params
%
ns
write
(
threadinfo
%
Logunit
,
'(a16,i3)'
)
'nmat'
,
params
%
nmat
write
(
threadinfo
%
Logunit
,
'(a16,i3)'
)
'nboxes'
,
params
%
nboxes
write
(
threadinfo
%
Logunit
,
'(a16,i3)'
)
'nsections'
,
params
%
nsections
write
(
threadinfo
%
Logunit
,
'(a16,l1)'
)
'doDoRuRe'
,
params
%
doDoRuRe
endif
end
select
if
(
iproc
.eq.
0
)
call
system
(
'rm fort.8'
)
if
(
iproc
.eq.
0
)
call
system
(
'rm fort.8'
)
return
end
subroutine
read_controlling_parameters
end
subroutine
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
This diff is collapsed.
Click to expand it.
src/read_input_file.f90
+
331
−
178
View file @
c470b89d
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