avoid issues with empty files
optional files (numerics.yaml, debug.yaml) can be empty
This commit is contained in:
parent
30d9f57db0
commit
1963343cd8
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit bea0b1c2e3ead08d0d2f1e5b4561bfe6251052a4
|
Subproject commit ad4a685d454271a400914c0334c017e3ac0dfc99
|
|
@ -83,10 +83,12 @@ subroutine parse_numerics()
|
||||||
if (worldrank == 0) then
|
if (worldrank == 0) then
|
||||||
print*, 'reading numerics.yaml'; flush(IO_STDOUT)
|
print*, 'reading numerics.yaml'; flush(IO_STDOUT)
|
||||||
fileContent = IO_read('numerics.yaml')
|
fileContent = IO_read('numerics.yaml')
|
||||||
|
if (len(fileContent) > 0) then
|
||||||
call results_openJobFile(parallel=.false.)
|
call results_openJobFile(parallel=.false.)
|
||||||
call results_writeDataset_str(fileContent,'setup','numerics.yaml','numerics configuration')
|
call results_writeDataset_str(fileContent,'setup','numerics.yaml','numerics configuration')
|
||||||
call results_closeJobFile
|
call results_closeJobFile
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
call parallelization_bcast_str(fileContent)
|
call parallelization_bcast_str(fileContent)
|
||||||
|
|
||||||
config_numerics => YAML_parse_str(fileContent)
|
config_numerics => YAML_parse_str(fileContent)
|
||||||
|
@ -113,10 +115,12 @@ subroutine parse_debug()
|
||||||
if (worldrank == 0) then
|
if (worldrank == 0) then
|
||||||
print*, 'reading debug.yaml'; flush(IO_STDOUT)
|
print*, 'reading debug.yaml'; flush(IO_STDOUT)
|
||||||
fileContent = IO_read('debug.yaml')
|
fileContent = IO_read('debug.yaml')
|
||||||
|
if (len(fileContent) > 0) then
|
||||||
call results_openJobFile(parallel=.false.)
|
call results_openJobFile(parallel=.false.)
|
||||||
call results_writeDataset_str(fileContent,'setup','debug.yaml','debug configuration')
|
call results_writeDataset_str(fileContent,'setup','debug.yaml','debug configuration')
|
||||||
call results_closeJobFile
|
call results_closeJobFile
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
call parallelization_bcast_str(fileContent)
|
call parallelization_bcast_str(fileContent)
|
||||||
|
|
||||||
config_debug => YAML_parse_str(fileContent)
|
config_debug => YAML_parse_str(fileContent)
|
||||||
|
|
Loading…
Reference in New Issue