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

Fix GEOS-Chem Classic parallelization errors revealed by parallelization tests - closes #1637 #1682

Merged
merged 22 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
426dde3
Fix parallelization issues in ocean_mercury_mod.F90
yantosca Feb 6, 2023
be61e06
Merge branch 'bugfix/add-rundir-compile-msgs' into bugfix/parallel-is…
yantosca Feb 6, 2023
812b016
Merge branch 'dev/14.1.1' into bugfix/parallel-issues
yantosca Mar 1, 2023
72514e0
Merge branch 'dev/14.1.1' into bugfix/parallel-issues
yantosca Mar 2, 2023
c8d8b20
Fix parallelization errors in the fullchem sim with -DLUO_WETDEP=y
yantosca Mar 2, 2023
370068c
Add !$OMP COLLAPSE and !$OMP SCHEDULE( DYNAMIC, 24 ) in wetscav_mod.F(0
yantosca Mar 3, 2023
c4965a9
Update !$OMP COLLAPSE statement in wetscav_mod.F90
yantosca Mar 3, 2023
b647578
Merge branch 'dev/14.2.0' into bugfix/parallel-issues
yantosca Mar 6, 2023
473b2e6
Update parallel loop in routine CHEM_SO2 for Luo wetdep
yantosca Mar 7, 2023
3d57c34
Merge branch 'dev/14.2.0' of https://github.com/geoschem/geos-chem.gi…
yantosca May 17, 2023
4af48f8
Fix differences in parallelization in the Hg simulation
yantosca May 17, 2023
ee3c709
Fix parallelization issues for APM in carbon_mod.F90
yantosca May 23, 2023
3376390
Move APM variable PSO4_SO2APM2 from State_Met to State_Chm
yantosca May 23, 2023
2e3ceab
Bug fix: Reference State_Chm%PSO4_SO2APM2 in wetscav_mod.F90
yantosca May 24, 2023
43aadac
Update parallel loops in sulfate_mod.F90 for APM
yantosca May 24, 2023
97e1d5b
Update parallel loops for APM in carbon_mod.F90
yantosca May 24, 2023
ae60266
Disable big parallel loop in apm_driv_mod.F90 for the time being
yantosca May 24, 2023
d4cf294
Zero private loop variables for APM in dust_mod and seasalt_mod
yantosca May 24, 2023
92ae56f
Move OCBIN_SUM from REDUCTION to PRIVATE in carbon_mod.F90
yantosca May 24, 2023
82f6993
Reorder !$OMP statements for APM in carbon_mod.F90
yantosca May 24, 2023
6194bd0
Set RIN=0 in the #ifdef APM block in routine WASHOUT
yantosca May 24, 2023
9c149f6
Initialize IS_QQ3D variable in fullchem_SulfurChemFuncs.F90
yantosca May 30, 2023
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Prevent repeated printing of KPP integrate errors to the stdout stream.
- Fixed selection of troposphere-stratosphere boundary in `global_ch4_mod.F90`
- Removed operator splitting in CH4 simulation that was biasing diagnostics
- Fixed parallelization in Luo wetdep simulations caused by uninitialized variable

## [14.1.1] - 2023-03-03
### Added
Expand Down
92 changes: 48 additions & 44 deletions GeosCore/apm_driv_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1036,49 +1036,51 @@ SUBROUTINE APM_DRIV( Input_Opt, State_Chm, State_Diag, &
!$OMP END PARALLEL DO
ENDIF

!$OMP PARALLEL DO &
!$OMP DEFAULT( SHARED ) &
!$OMP PRIVATE( I, J, L, N ) &
!$OMP PRIVATE( SIZENUM, PRESS, TK, RHIN ) &
!$OMP PRIVATE( CACID,PACID ) &
!$OMP PRIVATE( MSO4,MSO4BULK,MNIT,MNH4,SOAT) &
!$OMP PRIVATE( MBCS, MOCS, MSULFT,MDSTS,MSALTS) &
!$OMP PRIVATE( MBC, MOC, MMSA) &
!$OMP PRIVATE( XMDST) &
!$OMP PRIVATE( MASS1, MASS2) &
!$OMP PRIVATE( CSO2,CNH3,XN0,CAMINE,CAMINEEMIT,YAMINEEMIT) &
!$OMP PRIVATE( CCO,CNO,CNO2,CNO3,CHNO3,CISOP,CMTPA) &
!$OMP PRIVATE( NH3EMIT) &
!$OMP PRIVATE( CSOG) &
!$OMP PRIVATE( CSOA) &
!$OMP PRIVATE( VOL) &
!$OMP PRIVATE( CLVSOG,MSULFLV,MBCLV,MOCLV,MDSTLV,MSALTLV) &
!$OMP PRIVATE( XM1D,XN1D,XNOLD,TEMPOUT1,ATOM4N,AEROCOMOUT1D) &
!$OMP PRIVATE( XQ,PLVSOG01,PLVSOG1,GFTOT1,GFTOT2,DENWET1,DENWET2) &
!$OMP PRIVATE( IACT10,IACT20,IACT30,FCLOUD1,AERAREA1,AERDRYR1,GAMMAPM1) &
!$OMP PRIVATE( RACT1,RACT2,RACT3) &
!$OMP PRIVATE( NCOAG1,NCOAG2) &
!$OMP PRIVATE( YSPGF,XBCLIFE,XOCLIFE,XCSNH3) &!Yu+
!$OMP PRIVATE( XOH, XSINK,XAREA,XX0,XX1,DXX,ACS,XLAT, XLON,XAMINE) &
!$OMP PRIVATE( KYEAR,KMON,KDAY,KHOUR,KMIN,ISITE,JSITE,NSITE) &
!$OMP PRIVATE( XU,XV,TOP, TOPP) &
!$OMP PRIVATE( KKOUT) &
!$OMP PRIVATE( ZBEXT,ZW,ZG) &!OPT+
!$OMP PRIVATE( ZBABS) &!OPT+
!$OMP PRIVATE( YBEXT,XBEXT1k,YW,YG) &!OPT+
!$OMP PRIVATE( IWL) &!OPT+
!$OMP PRIVATE( ITYP) &!mxy+
!$OMP PRIVATE( YCCN,YCDN,YCDNSP,YCLDF,YCLDLIQ,YCLDICE,YRCLDL,VZ) &!Yu+ 7/2012
!$OMP PRIVATE( XCDN,XCDNSP ) &
!$OMP PRIVATE( YF,YC,SCOS,LOCALTIME ) &
!$OMP PRIVATE( PRESS0, YSIGMA ) &
!$OMP PRIVATE( wbar,relhum,yqc,yna,YB,YREI,YK) &
!$OMP PRIVATE( dumc, dumnc, pgam, lamc) &
!$OMP PRIVATE( CCLD,CLDLIQ,CLDICE ) &
!$OMP PRIVATE( REL,REI) &
!$OMP PRIVATE( taucloud, taucloudl, taucloudi, ssacloudl, ssacloudi ) &
!!$OMP PRIVATE( nuci, onihf, oniimm, onidep, onimey) &
!$OMP SCHEDULE( DYNAMIC )
! Disable this parallel loop, which causes differences in output
! for the time being. -- Bob Yantosca (24 May 2023)
! !$OMP PARALLEL DO &
! !$OMP DEFAULT( SHARED ) &
! !$OMP PRIVATE( I, J, L, N ) &
! !$OMP PRIVATE( SIZENUM, PRESS, TK, RHIN ) &
! !$OMP PRIVATE( CACID,PACID ) &
! !$OMP PRIVATE( MSO4,MSO4BULK,MNIT,MNH4,SOAT) &
! !$OMP PRIVATE( MBCS, MOCS, MSULFT,MDSTS,MSALTS) &
! !$OMP PRIVATE( MBC, MOC, MMSA) &
! !$OMP PRIVATE( XMDST) &
! !$OMP PRIVATE( MASS1, MASS2) &
! !$OMP PRIVATE( CSO2,CNH3,XN0,CAMINE,CAMINEEMIT,YAMINEEMIT) &
! !$OMP PRIVATE( CCO,CNO,CNO2,CNO3,CHNO3,CISOP,CMTPA) &
! !$OMP PRIVATE( NH3EMIT) &
! !$OMP PRIVATE( CSOG) &
! !$OMP PRIVATE( CSOA) &
! !$OMP PRIVATE( VOL) &
! !$OMP PRIVATE( CLVSOG,MSULFLV,MBCLV,MOCLV,MDSTLV,MSALTLV) &
! !$OMP PRIVATE( XM1D,XN1D,XNOLD,TEMPOUT1,ATOM4N,AEROCOMOUT1D) &
! !$OMP PRIVATE( XQ,PLVSOG01,PLVSOG1,GFTOT1,GFTOT2,DENWET1,DENWET2) &
! !$OMP PRIVATE( IACT10,IACT20,IACT30,FCLOUD1,AERAREA1,AERDRYR1,GAMMAPM1) &
! !$OMP PRIVATE( RACT1,RACT2,RACT3) &
! !$OMP PRIVATE( NCOAG1,NCOAG2) &
! !$OMP PRIVATE( YSPGF,XBCLIFE,XOCLIFE,XCSNH3) &!Yu+
! !$OMP PRIVATE( XOH, XSINK,XAREA,XX0,XX1,DXX,ACS,XLAT, XLON,XAMINE) &
! !$OMP PRIVATE( KYEAR,KMON,KDAY,KHOUR,KMIN,ISITE,JSITE,NSITE) &
! !$OMP PRIVATE( XU,XV,TOP, TOPP) &
! !$OMP PRIVATE( KKOUT) &
! !$OMP PRIVATE( ZBEXT,ZW,ZG) &!OPT+
! !$OMP PRIVATE( ZBABS) &!OPT+
! !$OMP PRIVATE( YBEXT,XBEXT1k,YW,YG) &!OPT+
! !$OMP PRIVATE( IWL) &!OPT+
! !$OMP PRIVATE( ITYP) &!mxy+
! !$OMP PRIVATE( YCCN,YCDN,YCDNSP,YCLDF,YCLDLIQ,YCLDICE,YRCLDL,VZ) &!Yu+ 7/2012
! !$OMP PRIVATE( XCDN,XCDNSP ) &
! !$OMP PRIVATE( YF,YC,SCOS,LOCALTIME ) &
! !$OMP PRIVATE( PRESS0, YSIGMA ) &
! !$OMP PRIVATE( wbar,relhum,yqc,yna,YB,YREI,YK) &
! !$OMP PRIVATE( dumc, dumnc, pgam, lamc) &
! !$OMP PRIVATE( CCLD,CLDLIQ,CLDICE ) &
! !$OMP PRIVATE( REL,REI) &
! !$OMP PRIVATE( taucloud, taucloudl, taucloudi, ssacloudl, ssacloudi ) &
! !!$OMP PRIVATE( nuci, onihf, oniimm, onidep, onimey) &
! !$OMP SCHEDULE( DYNAMIC )
DO J = 1, State_Grid%NY
DO I = 1, State_Grid%NX

Expand Down Expand Up @@ -2139,7 +2141,9 @@ SUBROUTINE APM_DRIV( Input_Opt, State_Chm, State_Diag, &

ENDDO
ENDDO
!$OMP END PARALLEL DO
! Disable this parallel loop, which causes differences in output.
! -- Bob Yantosca (24 May 2023)
! !$OMP END PARALLEL DO

write(*,*)'LuoSSA',sum(TCOD3D(:,:,:,1))/size(TCOD3D(:,:,:,1)), &
sum(TCOD3D(:,:,:,5))/size(TCOD3D(:,:,:,5))
Expand Down
Loading