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

Cleanup compiler warnings and errors #666

Merged
merged 2 commits into from
Jun 24, 2020

Conversation

amametjanov
Copy link
Contributor

Cleanup compiler warnings and errors that occur with FATES in E3SM.

[BFB] -- bit-for-bit

@@ -210,6 +210,7 @@ function th_from_psi_base(this,psi) result(th)
class(wrf_type) :: this
real(r8),intent(in) :: psi
real(r8) :: th
th = 0._r8
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just to avoid IBM compiler warning with th as uninitialized function result:

"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/external_models/fates/biogeophys/FatesHydroWTFMod.F90", 1513-083 (E) Internal or module function ftc was not set within the function.
"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/external_models/fates/biogeophys/FatesHydroWTFMod.F90", 1513-083 (E) Internal or module function dftcdpsi was not set within the function.
"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/external_models/fates/biogeophys/FatesHydroWTFMod.F90", 1513-083 (E) Internal or module function dpsidth was not set within the function.
"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/external_models/fates/biogeophys/FatesHydroWTFMod.F90", 1513-083 (E) Internal or module function th was not set within the function.
"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/external_models/fates/biogeophys/FatesHydroWTFMod.F90", 1513-083 (E) Internal or module function psi was not set within the function.

@@ -567,7 +567,7 @@ subroutine FatesReportParams(is_master)
write(fates_log(),fmt0) 'q10_mr = ',q10_mr
write(fates_log(),fmt0) 'q10_froz = ',q10_froz
write(fates_log(),fmt0) 'cg_strikes = ',cg_strikes
write(fates_log(),'(a,L)') 'active_crown_fire = ',active_crown_fire
write(fates_log(),'(a,L2)') 'active_crown_fire = ',active_crown_fire
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/external_models/fates/main/EDParamsMod.F90", line 570.31: 1512-047 (E) The L FORMAT edit descriptor, in literal FMT specifier, is missing a field width. A default value based on the edit descriptor and
the type of the data item being processed is assumed.

Comment on lines -3623 to +3625
cohort_hydr%iterh1 = max(cohort_hydr%iterh1,real(iter))
cohort_hydr%iterh1 = max(cohort_hydr%iterh1,real(iter,r8))
! Save the number of sub-steps we ultimately used
cohort_hydr%iterh2 = max(cohort_hydr%iterh2,real(nsteps))
cohort_hydr%iterh2 = max(cohort_hydr%iterh2,real(nsteps,r8))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/external_models/fates/biogeophys/FatesPlantHydraulicsMod.F90", line 3623.53: 1513-041 (S) Arguments of the wrong type were specified for the INTRINSIC procedure "max".
"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/external_models/fates/biogeophys/FatesPlantHydraulicsMod.F90", line 3625.53: 1513-041 (S) Arguments of the wrong type were specified for the INTRINSIC procedure "max".
"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/external_models/fates/biogeophys/FatesPlantHydraulicsMod.F90", line 4986.54: 1513-041 (S) Arguments of the wrong type were specified for the INTRINSIC procedure "max".

@glemieux
Copy link
Contributor

glemieux commented Jun 19, 2020

Hi @amametjanov can you make public the location of the test results for us to check please?

type(ed_site_type), intent(in), target :: currentSite
type(ed_site_type), intent(inout), target :: currentSite
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PGI compiler warning

PGF90-W-0194-INTENT(IN) argument cannot be defined - currentsite (/qfs/people/mame117/repos/E3SM-tests/components/clm/src/external_models/fates/biogeochem/EDPatchDynamicsMod.F90: 1054)

@amametjanov
Copy link
Contributor Author

Hi @glemieux, thanks for taking a look.
I saw these with latest E3SM master (and corresponding FATES hash 7841aef). In E3SM, they can be reproduced

  • on PNNL's Compy machine with
./cime/scripts/create_test SMS_Ld1.ne30_oECv3.F20TRC5-CMIP6 --compiler pgi --walltime 00:30

and the path is

/compyfs/mame117/e3sm_scratch/tests/20200618-rm-cpr-warnings/SMS.ne30_oECv3.F20TRC5-CMIP6.compy_pgi.20200618_185551_pr5y5v/bld-01-master/e3sm.bldlog.200619-090924.gz
  • on OLCF's Summit machine with
./cime/scripts/create_test SMS_Ld1.ne30_oECv3.F20TRC5-CMIP6 --machine summit --walltime 00:30

and the path is

/gpfs/alpine/cli115/proj-shared/azamat/e3sm_scratch/e3sm-tests/20200619-rm-cpr-warnings/SMS.ne30_oECv3.F20TRC5-CMIP6.summit_ibm.20200618_221529_vp9ly0/bld-01-fail/e3sm.bldlog.200618-221744

It's probably easier to try building the cases though. If there are issues with that, please let me know if I should copy build logs somewhere.

@rgknox
Copy link
Contributor

rgknox commented Jun 21, 2020

Thanks for this submission @amametjanov . These changes all look good to me.

@glemieux glemieux self-assigned this Jun 22, 2020
@amametjanov
Copy link
Contributor Author

amametjanov commented Jun 23, 2020

Need help with this warning:

"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/external_models/fates/biogeochem/EDPatchDynamicsMod.F90", 1452  
1500-010 (W) WARNING in fire_litter_fluxes: Infinite loop.  Program may not stop.

Would going from shortest to taller cohort work: i.e.

1448     ! If plant hydraulics are turned on, account for water leaving the plant-soil
1449     ! mass balance through the dead trees
1450     if (hlm_use_planthydro == itrue) then
1451        currentCohort => currentPatch%shortest
1452        do while(associated(currentCohort))
1453           num_dead_trees  = (currentCohort%fire_mort * &
1454                 currentCohort%n*patch_site_areadis/currentPatch%area)
1455           call AccumulateMortalityWaterStorage(currentSite,currentCohort,num_dead_trees)
    +          currentCohort => currentCohort%taller
1456        end do
1457     end if

This came up with ./cime/scripts/create_test SMS_P12x2.ne4_oQU240.A_WCYCL1850.summit_ibm.allactive-mach_mods --walltime 00:30

@rgknox
Copy link
Contributor

rgknox commented Jun 23, 2020

@amametjanov , we have another PR addressing this issue: #665
https://github.com/NGEET/fates/pull/665/files#diff-531e45e75218bb11634691970470c90bR1455

@rgknox
Copy link
Contributor

rgknox commented Jun 23, 2020

@amametjanov we were also wondering if we should leave this PR open for a little while if you want to add to it, or is this ready for integration and testing?

@amametjanov
Copy link
Contributor Author

This is ready to go. Thanks.

@glemieux
Copy link
Contributor

Confirmed SMS_Ld1.ne30_oECv3.F20TRC5-CMIP6.cori-knl_intel test passed b4b:

/global/homes/g/glemieux/scratch/e3sm_scratch/cori-knl/SMS_Ld1.ne30_oECv3.F20TRC5-CMIP6.cori-knl_intel.C.20200623_232456_vzf0sy

@glemieux glemieux merged commit 70dda4c into NGEET:master Jun 24, 2020
@amametjanov amametjanov deleted the azamat/e3sm/cleanup-cpr-warnings branch June 24, 2020 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants