Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FDS Source: Reduce frequency of MPI call #13332

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions Source/main.f90
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ PROGRAM FDS
CORRECTOR = .FALSE.

! Process externally controlled variables

IF (READ_EXTERNAL) THEN
IF (MY_RANK==0 .AND. T > T_EXTERNAL) THEN
CALL READ_EXTERNAL_FILE(EXTERNAL_FAIL)
Expand All @@ -613,6 +614,7 @@ PROGRAM FDS
IF (HEARTBEAT_FAIL) CALL STOP_CHECK(1)
CALL EXCHANGE_EXTERNAL
ENDIF

! Begin the finite differencing of the PREDICTOR step

COMPUTE_FINITE_DIFFERENCES_1: DO NM=LOWER_MESH_INDEX,UPPER_MESH_INDEX
Expand Down Expand Up @@ -991,15 +993,15 @@ PROGRAM FDS

! Dump a restart file if necessary

CALL MPI_ALLGATHERV(MPI_IN_PLACE,0,MPI_DATATYPE_NULL,RADIATION_COMPLETED(1:NMESHES),&
COUNTS,DISPLS,MPI_LOGICAL,MPI_COMM_WORLD,IERR)

IF ( (T>=RSRT_CLOCK(RSRT_COUNTER(1)) .OR. STOP_STATUS==USER_STOP) .AND. &
(T>=T_END .OR. ALL(RADIATION_COMPLETED) .OR. STOP_STATUS==CTRL_STOP )) THEN
DO NM=LOWER_MESH_INDEX,UPPER_MESH_INDEX
CALL DUMP_RESTART(T,DT,NM)
ENDDO
RSRT_COUNTER(1) = RSRT_COUNTER(1) + 1
IF ( T>=RSRT_CLOCK(RSRT_COUNTER(1)) .OR. STOP_STATUS==USER_STOP) THEN
CALL MPI_ALLGATHERV(MPI_IN_PLACE,0,MPI_DATATYPE_NULL,RADIATION_COMPLETED(1:NMESHES),&
COUNTS,DISPLS,MPI_LOGICAL,MPI_COMM_WORLD,IERR)
IF (T>=T_END .OR. ALL(RADIATION_COMPLETED) .OR. STOP_STATUS==CTRL_STOP) THEN
DO NM=LOWER_MESH_INDEX,UPPER_MESH_INDEX
CALL DUMP_RESTART(T,DT,NM)
ENDDO
RSRT_COUNTER(1) = RSRT_COUNTER(1) + 1
ENDIF
ENDIF

! Check for abnormal run stop
Expand Down