NOAA-EMC / UPP

Other
36 stars 98 forks source link

Need compatibility flags for gfortran-10 #186

Closed climbfuji closed 4 years ago

climbfuji commented 4 years ago

With gfortran 10, I still get:

/usr/local/ufs-release-v2.0.0/gnu/src/NCEPLIBS/download/emc_post/sorc/ncep_post.fd/GFSPOST.F:221:35:

  221 |       call rsearch1(km,p,1,pvpb(k),l1)
      |                                   1
Error: Rank mismatch in argument 'l2' at (1) (rank-1 and scalar)
/usr/local/ufs-release-v2.0.0/gnu/src/NCEPLIBS/download/emc_post/sorc/ncep_post.fd/GFSPOST.F:222:35:

  222 |       call rsearch1(km,p,1,pvpt(k),l2)
      |                                   1
Error: Rank mismatch in argument 'l2' at (1) (rank-1 and scalar)
/usr/local/ufs-release-v2.0.0/gnu/src/NCEPLIBS/download/emc_post/sorc/ncep_post.fd/GFSPOST.F:231:33:

  231 |             call rsearch1(km,p,1,p(lu)+pd,ld)
      |                                 1
Error: Rank mismatch in argument 'z2' at (1) (rank-1 and scalar)
/usr/local/ufs-release-v2.0.0/gnu/src/NCEPLIBS/download/emc_post/sorc/ncep_post.fd/GFSPOST.F:245:33:

  245 |             call rsearch1(km,p,1,p(lu)+pd,ld)
      |                                 1
Error: Rank mismatch in argument 'z2' at (1) (rank-1 and scalar)
/usr/local/ufs-release-v2.0.0/gnu/src/NCEPLIBS/download/emc_post/sorc/ncep_post.fd/GFSPOST.F:436:26:

  436 |  call rsearch1(k-2,h(2),1,h(k)+hd,kd)
      |                          1
Error: Rank mismatch in argument 'z2' at (1) (rank-1 and scalar)
make[5]: *** [sorc/ncep_post.fd/CMakeFiles/nceppost.dir/GFSPOST.F.o] Error 1
make[4]: *** [sorc/ncep_post.fd/CMakeFiles/nceppost.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [nceppost/src/nceppost-stamp/nceppost-build] Error 2
make[1]: *** [CMakeFiles/nceppost.dir/all] Error 2
make: *** [all] Error 2
dom-loaner:build dom$ pwd
/usr/local/ufs-release-v2.0.0/gnu/src/NCEPLIBS/build

Seems the gfortran-10 compatibility flags are still missing. We need to fix this for the SRW App public release. I can create the PR to fix it here, then we need to create a new tag and update the NCEPLIBS umbrella builds (for both develop and release/public-v2).

climbfuji commented 4 years ago

@fossell @kgerheiser @mark-a-potts @aerorahul @DusanJovic-NOAA I need help with this. The version that the NCEPLIBS umbrella build (develop or release/public-v2, doesn't matter) uses is based of hash dceca263288b76a6f15615b9dcf6c9770842d9d4.

This version is much, much older than the develop or release/public-v2 branches of EMC_post. But I do need the commit a0601809d3195b752d2fb0fb6562aa3c887348d6 from @DusanJovic-NOAA so compile with gfortran-10 for release/public-v2. Also, in general, if we build the post library as part of the NCEPLIBS umbrella build and then build it again as executable for the SRW App, we should be using the exact same version.

Do you know if I can forward the version used by NCEPLIBS from dceca263288b76a6f15615b9dcf6c9770842d9d4 to the head of develop and then update release/public-v2 to match the head of develop. Or, alternatively, forward to release/public-v2 and then cherry-pick Dusan's gfortran-10 changes.

climbfuji commented 4 years ago

@fossell @kgerheiser @mark-a-potts @aerorahul @DusanJovic-NOAA I need help with this. The version that the NCEPLIBS umbrella build (develop or release/public-v2, doesn't matter) uses is based of hash dceca26.

This version is much, much older than the develop or release/public-v2 branches of EMC_post. But I do need the commit a060180 from @DusanJovic-NOAA so compile with gfortran-10 for release/public-v2. Also, in general, if we build the post library as part of the NCEPLIBS umbrella build and then build it again as executable for the SRW App, we should be using the exact same version.

Do you know if I can forward the version used by NCEPLIBS from dceca26 to the head of develop and then update release/public-v2 to match the head of develop. Or, alternatively, forward to release/public-v2 and then cherry-pick Dusan's gfortran-10 changes.

The easiest solution would be to add a .patch file to the release/public-v2 branch of the NCEPLIBS umbrella build, and add instructions for users with gfortran-10. This way, we don't run into the danger of braking something in the ufs-weather-model by updating the post library. We will still have two different posts, the dceca26 hash as part of the NCEPLIBS umbrella build and the release/public-v2 branch / ufs-v2.0.0 tag for the post executable, but I think that is ok. Thoughts?

climbfuji commented 4 years ago

A workaround is proposed here for release/public-v2: https://github.com/NOAA-EMC/NCEPLIBS/pull/116

climbfuji commented 4 years ago

Workaround for release/public-v2 has been merged.