Separating CPU time output from Data outut to allow better analysis.

This commit is contained in:
Jorge Gonzalez 2020-12-07 17:58:33 +01:00
commit 7152a232fe
6 changed files with 29 additions and 10 deletions

View file

@ -2,7 +2,7 @@
{
"output": {
"path": "./runs/1D_Cathode/",
"trigger": 100,
"triggerOutput": 100,
"cpuTime": false,
"numColl": false,
"EMField": true
@ -26,7 +26,7 @@
],
"boundaryEM": [
{"name": "Cathode", "type": "dirichlet", "potential": 0.0, "physicalSurface": 1},
{"name": "Infinite", "type": "dirichlet", "potential": 600.0, "physicalSurface": 2}
{"name": "Infinite", "type": "dirichlet", "potential": 100.0, "physicalSurface": 2}
],
"inject": [
{"name": "Cathode Electron", "species": "Electron", "flow": 9.0e-5, "units": "A", "v": 27500.0, "T": [2500.0, 2500.0, 2500.0], "n": [ 1, 0, 0], "physicalSurface": 1}

View file

@ -1,8 +1,9 @@
{
"output": {
"path": "./runs/ALPHIE_Grid/",
"trigger": 500,
"cpuTime": false,
"triggerOutput": 500,
"triggerCPUTime": 1,
"cpuTime": true,
"numColl": false,
"EMField": true
},

View file

@ -1,7 +1,7 @@
{
"output": {
"path": "./runs/cylFlow/",
"trigger": 10,
"triggerOutput": 10,
"cpuTime": true,
"numColl": false
},

View file

@ -193,7 +193,7 @@ MODULE moduleInput
object = 'output'
CALL config%get(object // '.path', path, found)
CALL config%get(object // '.trigger', triggerOutput, found)
CALL config%get(object // '.triggerOutput', triggerOutput, found)
IF (.NOT. found) THEN
triggerOutput = 100
CALL warningError('Using default trigger for output file of 100 iterations')
@ -211,6 +211,13 @@ MODULE moduleInput
CALL config%get(object // '.numColl', collOutput, found)
CALL config%get(object // '.EMField', emOutput, found)
CALL config%get(object // '.triggerCPUTime', triggerCPUTime, found)
IF (.NOT. found) THEN
triggerCPUTime = triggerOutput
IF (timeOutput) CALL warningError('No triggerCPUTime found, using same vale as triggerOutput')
END IF
END SUBROUTINE readOutput
!Reads information about the case species

View file

@ -22,7 +22,8 @@ MODULE moduleOutput
CHARACTER(:), ALLOCATABLE:: path
CHARACTER(:), ALLOCATABLE:: folder
INTEGER:: triggerOutput, counterOutput
INTEGER:: triggerOutput, counterOutput = 0
INTEGER:: triggerCPUTime, counterCPUTime = 0
LOGICAL:: timeOutput = .FALSE.
LOGICAL:: collOutput = .FALSE.
LOGICAL:: emOutput = .FALSE.

View file

@ -555,15 +555,14 @@ MODULE moduleSolver
INTEGER, INTENT(in):: t
counterOutput=counterOutput+1
IF (counterOutput>=triggerOutput .OR. &
counterOutput = counterOutput + 1
IF (counterOutput >= triggerOutput .OR. &
t == tmax .OR. t == 0) THEN
!Resets output counter
counterOutput=0
CALL mesh%printOutput(t)
CALL printTime(t, t == 0)
CALL mesh%printColl(t)
CALL mesh%printEM(t)
WRITE(*, "(5X,A21,I10,A1,I10)") "t/tmax: ", t, "/", tmax
@ -584,6 +583,17 @@ MODULE moduleSolver
END IF
counterCPUTime = counterCPUTime + 1
IF (counterCPUTime >= triggerCPUTime .OR. &
t == tmax .OR. t == 0) THEN
!Reset CPU Time counter
counterCPUTime = 0
CALL printTime(t, t == 0)
END IF
END SUBROUTINE doOutput