Skip to content

Commit 275c3be

Browse files
authored
Merge pull request #14372 from mcgratta/openmp_htc
FDS Source: Issue #14221. Remove race conditions from wall.f90 in OpenMP runs
2 parents 906a243 + 9ff42ce commit 275c3be

File tree

8 files changed

+241
-233
lines changed

8 files changed

+241
-233
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Detecting OpenMP Thread Race Conditions
2+
3+
To check for OpenMP race conditions, add `-fsanitize=thread` to the arguments (`FFLAGS`) for `impi_intel_linux_openmp_db` and add the lines
4+
```
5+
export OMP_TOOL_LIBRARIES='libarcher.so'
6+
export TSAN_OPTIONS='ignore_noninstrumented_modules=1'
7+
```
8+
to the bash script containing the PBS/Torque or Slurm directives.
9+
10+
Then run a short, small job and race errors should be written to the `.err` file.
11+

Manuals/FDS_User_Guide/FDS_User_Guide.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2299,7 +2299,7 @@ \subsubsection{Output for Convective Heat Transfer Regime}
22992299

23002300
\subsubsection{Specified Convective Heat Transfer Coefficient}
23012301

2302-
To specify the convective heat transfer coefficient, set it to a constant using \ct{HEAT_TRANSFER_COEFFICIENT} on the \ct{SURF} line in units of \unit{W/(m^2.K)} with optional time dependent ramp using \ct{RAMP_HEAT_TRANSFER_COEFFICIENT}. If the back side of the solid obstruction faces the exterior of the computational domain and the solid conducts heat, the heat transfer coefficient of the back side may be specified using \ct{HEAT_TRANSFER_COEFFICIENT_BACK} with optional time dependent ramp ramp using \ct{RAMP_HEAT_TRANSFER_COEFFICIENT_BACK}. This back side condition is appropriate for a \ct{SURF} line with \ct{BACKING='VOID'} or \ct{BACKING='EXPOSED'}.
2302+
To specify the convective heat transfer coefficient, set it to a constant using \ct{HEAT_TRANSFER_COEFFICIENT} on the \ct{SURF} line in units of \unit{W/(m^2.K)} with optional time dependent ramp using \ct{RAMP_HEAT_TRANSFER_COEFFICIENT}. If the back side of the solid obstruction faces the exterior of the computational domain and the solid conducts heat, the heat transfer coefficient of the back side may be specified using \ct{HEAT_TRANSFER_COEFFICIENT_BACK} with optional time dependent ramp ramp using \ct{RAMP_HEAT_TRANSFER_COEFFICIENT_BACK}. This back side condition is appropriate for a \ct{SURF} line with \ct{BACKING='VOID'} or if the solid obsttuction backs to the exterior of the computational domain.
23032303

23042304
\subsubsection{Impinging Jet Heat Transfer Model}
23052305
\label{info:impinging_jet}

Source/cons.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,8 @@ MODULE GLOBAL_CONSTANTS
346346
REAL(EB), ALLOCATABLE, DIMENSION(:) :: H_V_H2O !< Heat of vaporization for water (J/kg)
347347
REAL(EB) :: CHI_R_MIN=0._EB !< Lower bound for radiative fraction
348348
REAL(EB) :: CHI_R_MAX=1._EB !< Upper bound for radiative fraction
349-
REAL(EB) :: SPHERE_FILM_FAC=ONTH !< Factor used in droplet evaporation algorithm for droplets
350-
REAL(EB) :: PLATE_FILM_FAC=ONTH !< Factor used in droplet evaporation algorithm for walls
349+
REAL(EB) :: SPHERE_FILM_FACTOR=ONTH !< Weighting factor used in droplet evaporation algorithm for droplets
350+
REAL(EB) :: PLATE_FILM_FACTOR=ONTH !< Weighting factor used in droplet evaporation algorithm for walls
351351
REAL(EB) :: ORIGIN_LAT=-1.E6_EB !< Latitude of terrain map
352352
REAL(EB) :: ORIGIN_LON=-1.E6_EB !< Longitude of terrain map
353353
REAL(EB) :: NORTH_BEARING=0._EB !< North bearing for terrain map

Source/part.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3946,7 +3946,7 @@ SUBROUTINE PARTICLE_MASS_ENERGY_TRANSFER(T,DT,NM)
39463946

39473947
SOLID_OR_GAS_PHASE_2: IF (BC%IOR/=0 .AND. (LP%WALL_INDEX>0 .OR. LP%CFACE_INDEX>0) .AND. .NOT. SF_FIXED) THEN
39483948

3949-
CALL GET_FILM_PROPERTIES(1,PLATE_FILM_FAC,Y_DROP_A,Y_GAS_A,Z_INDEX_A,TMP_DROP,TMP_G,ZZ_GET, &
3949+
CALL GET_FILM_PROPERTIES(1,PLATE_FILM_FACTOR,Y_DROP_A,Y_GAS_A,Z_INDEX_A,TMP_DROP,TMP_G,ZZ_GET, &
39503950
PBAR(KK,PRESSURE_ZONE(II,JJ,KK)),TMP_FILM,MU_FILM,&
39513951
K_FILM,CP_FILM,D_FILM,RHO_FILM,PR_FILM,SC_FILM)
39523952

@@ -4018,7 +4018,7 @@ SUBROUTINE PARTICLE_MASS_ENERGY_TRANSFER(T,DT,NM)
40184018

40194019
ELSE SOLID_OR_GAS_PHASE_2
40204020

4021-
CALL GET_FILM_PROPERTIES(1,SPHERE_FILM_FAC,Y_DROP_A,Y_GAS_A,Z_INDEX_A,TMP_DROP,TMP_G,ZZ_GET,&
4021+
CALL GET_FILM_PROPERTIES(1,SPHERE_FILM_FACTOR,Y_DROP_A,Y_GAS_A,Z_INDEX_A,TMP_DROP,TMP_G,ZZ_GET,&
40224022
PBAR(KK,PRESSURE_ZONE(II,JJ,KK)),TMP_FILM,MU_FILM,&
40234023
K_FILM,CP_FILM,D_FILM,RHO_FILM,PR_FILM,SC_FILM)
40244024

Source/read.f90

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8305,6 +8305,13 @@ SUBROUTINE READ_SURF(QUICK_READ)
83058305
CALL SHUTDOWN(MESSAGE) ; RETURN
83068306
END SELECT
83078307

8308+
SELECT CASE(SF%GEOMETRY)
8309+
CASE DEFAULT ; SF%FILM_FACTOR = PLATE_FILM_FACTOR
8310+
CASE(SURF_SPHERICAL) ; SF%FILM_FACTOR = SPHERE_FILM_FACTOR
8311+
CASE(SURF_CYLINDRICAL,SURF_INNER_CYLINDRICAL) ; SF%FILM_FACTOR = PLATE_FILM_FACTOR
8312+
CASE(SURF_CARTESIAN) ; SF%FILM_FACTOR = PLATE_FILM_FACTOR
8313+
END SELECT
8314+
83088315
SF%H_V = 1000._EB*HEAT_OF_VAPORIZATION
83098316
SELECT CASE(HEAT_TRANSFER_MODEL)
83108317
CASE DEFAULT
@@ -9517,6 +9524,7 @@ SUBROUTINE PROC_SURF_2
95179524
SF%SPECIES_BC_INDEX = HVAC_BOUNDARY
95189525
ENDIF
95199526
IF (N==MASSLESS_TARGET_SURF_INDEX) THEN
9527+
SF%H_FIXED = 10._EB
95209528
SF%EMISSIVITY = 1._EB
95219529
ENDIF
95229530

Source/type.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,7 @@ MODULE TYPES
910910
REAL(EB) :: CHI_R_EFF !< Effective radiative fraction for S_pyro
911911
REAL(EB) :: TIME_STEP_FACTOR=10._EB !< Maximum amount to reduce solid phase conduction time step
912912
REAL(EB) :: REMESH_RATIO=0.05 !< Fraction change in wall node DX to trigger a remesh
913+
REAL(EB) :: FILM_FACTOR=ONTH !< Weighting factor for evaluating surface file properties
913914

914915
REAL(EB), ALLOCATABLE, DIMENSION(:) :: DX,RDX,RDXN,X_S,DX_WGT,MF_FRAC,PARTICLE_INSERT_CLOCK
915916
REAL(EB), ALLOCATABLE, DIMENSION(:,:) :: RHO_0

0 commit comments

Comments
 (0)