-
Notifications
You must be signed in to change notification settings - Fork 4
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
Build gldas_model.fd failed on Hera #48
Comments
@HelinWei-NOAA Can you help me with this issue or give me some suggestions to try? Thank you so much! |
@MingjingTong-NOAA Can you point me to your working directory on hera? |
@HelinWei-NOAA my working directory is /scratch2/GFDL/gfdlscr/Mingjing.Tong/global_workflow/shield_workflow/sorc/gldas.fd. If you go into /scratch2/GFDL/gfdlscr/Mingjing.Tong/global_workflow/shield_workflow/sorc/gldas.fd/sorc/logs, you will find build_gldas_model.log_org, which is the log of the build without changing any source code. build_gldas_model.log is the log of the build with the "use ip_mod" changes in sorc/gldas_model.fd/baseforcing/gdas.20070502/retgdas.F and sorc/gldas_model.fd/obsprecips/cmap_0.5/interp_cmap.F. Here list all the changes I made to be able to build the gldas package on Hera. On branch master Changes not staged for commit: Thank you so much! |
@MingjingTong-NOAA It looks like a link problem. But you seems loading the correct library versions on hera. If glads previously build fine on Hera, just do the comparation to see the difference. other ways that you can try to solve is (1) add the ip library to building flags e.g. LDFLAGS. (2)Try to check if the ip library is correctly loaded in the script from the building log, and may need to adjust the link order. |
@Hang-Lei-NOAA GLDAS has been phased out for the next GFS implementation. We don't have anyone working on it any more. So we didn't try any run after Rocky8 upgrades. |
@MingjingTong-NOAA @Hang-Lei-NOAA If I added the ip library to LDFLAGS explicitly in makefile, The compiling for interp_agrmet_sw.F went through. So as @Hang-Lei-NOAA pointed out, definitely it is a link problem. |
@Hang-Lei-NOAA I compared the build log with an old one, which was built before transition to Rocky8. The only difference I can see is the link part, because the location of the libraries has been changed. I also checked the module loaded and confirmed that ip/4.3.0 is loaded. I tried to explicitly add the ip library to building flags (LDFLAGS) in Makefile.noah or change the link order, but none of the works for me. @HelinWei-NOAA Can you show me your working directory and the changes you made? |
@MingjingTong-NOAA Makefile.noah was created during the building process. Your change will be overridden. What I did is just not let the script recreate Makefile.noah. |
@HelinWei-NOAA In my case, Makefile.noah is not overwritten. You can see that I added in /scratch2/GFDL/gfdlscr/Mingjing.Tong/global_workflow/shield_workflow/sorc/gldas.fd/sorc/gldas_model.fd/make/Makefile.noah the following line. After I compile it using build_gldas_model.sh, the Makefile.noah didn't change and what I added in Makefile.noah is reflected at the end of the log file /scratch2/GFDL/gfdlscr/Mingjing.Tong/global_workflow/shield_workflow/sorc/gldas.fd/sorc/logs/build_gldas_model.log Did I misunderstand anything? |
I'm trying to build GLDAS on Hera. After I updated the modulefiles for Hera, i was able to compile all the source code, except gldas_model.fd. The build fails at the link step.
interp_agrmet_sw.o: In function
interp_agrmet_sw_': interp_agrmet_sw.F:(.text+0x1c97): undefined reference to
ipolates'interp_cmap.o: In function
interp_cmap_': interp_cmap.F:(.text+0xa55): undefined reference to
ipolates_'retgdas.o: In function
interp_gdas_': retgdas.F:(.text+0x1c4f): undefined reference to **
polates0_'**retgdas.F:(.text+0x1efc): undefined reference to `polates3_'
gmake: *** [Makefile.noah:54: ../gldas_model] Error 1_
The ip library linked is /scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.6.0/envs/gsi-addon-dev-rocky8/install/intel/2021.5.0/ip-4.3.0-ozyjvbg/lib64/libip_4.a
I tried to add 'use ip_mod, only: ipolates' in interp_agrmet_sw.F and add the path of the include file '-I/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.6.0/envs/gsi-addon-dev-rocky8/install/intel/2021.5.0/ip-4.3.0-ozyjvbg/include_4', but I got
../obsrads/agrmet/interp_agrmet_sw.F(176): error #6285: There is no matching specific subroutine for this generic subroutine call. [IPOLATES]
call ipolates (ip,ipopt,kgdsi,kgdso,mi,mo, &
-------^
compilation aborted for ../obsrads/agrmet/interp_agrmet_sw.F (code 1)
gmake: *** [Makefile.noah:107: interp_agrmet_sw.o] Error 1
The text was updated successfully, but these errors were encountered: