NOAA-EMC / NCEPLIBS

Top level repo containing submodules for NCEPLIBS and associated dependencies for superproject builds
Other
42 stars 18 forks source link

Converting verf_gridtobs code to bufr 11.3.0 #182

Closed PerryShafran-NOAA closed 3 years ago

PerryShafran-NOAA commented 3 years ago

Hi, there,

I need to convert my verf_gridtobs code to bufr 11.3.0. Apparently there have been errors in the compile, and I need help in fixing that.

The code and the log with the errors are here:

/gpfs/dell2/emc/verification/save/Perry.Shafran/verif_bufr11.3.1/sorc /gpfs/dell2/emc/verification/save/Perry.Shafran/verif_bufr11.3.1/sorc/makeit.log

Can you assist me in figuring out why I'm getting these compile errors in some of these codes?

Adding @arunchawla-NOAA to this issue.

Thanks!

Perry

kgerheiser commented 3 years ago

Can you post the error here?

There's also existing installations of bufr you could use if you don't want to build it yourself.

PerryShafran-NOAA commented 3 years ago

The errors look like this.

rm -rf .o .lst ifort -heap-arrays -O0 -c -o gtgdef.o gtgdef.f ifort -heap-arrays -O0 -c -o raddate.o raddate.f ifort -heap-arrays -O0 -c -o w3fi71.o w3fi71.f ifort -heap-arrays -O0 -c -o editbufr.o editbufr.f ifort -heap-arrays -O0 -o ../../exec/verf_gridtobs_editbufr gtgdef.o raddate.o w3fi71.o editbufr.o /gpfs/dell1/nco/ops/nwprod/lib/g2/v3.1.0/ips/18.0.1/libg2_v3.1.0_4.a /gpfs/dell1/nco/ops/nwprod/lib/w3nco/v2.0.6/ips/18.0.1/libw3nco_v2.0.6_4.a /gpfs/dell1/nco/ops/nwprod/lib/w3emc/v2.3.0/ips/18.0.1/impi/18.0.1/libw3emc_v2.3.0_4.a /gpfs/dell1/nco/ops/nwprod/lib/bacio/v2.0.2/ips/18.0.1/libbacio_v2.0.2_4.a editbufr.o: In function MAIN__': editbufr.f:(.text+0x2a): undefined reference todatelen' editbufr.f:(.text+0xc3f): undefined reference to `datebf' editbufr.f:(.text+0xdfd): undefined reference to ufbtab_' editbufr.f:(.text+0x12de): undefined reference toufbtab' editbufr.f:(.text+0x1f5e): undefined reference to `openbf' editbufr.f:(.text+0x1fb2): undefined reference to datebf_' editbufr.f:(.text+0x1fe6): undefined reference toopenbf' editbufr.f:(.text+0x201a): undefined reference to `openbf' editbufr.f:(.text+0x20ae): undefined reference to ireadmg_' editbufr.f:(.text+0x20d4): undefined reference tonmsub' editbufr.f:(.text+0x2493): undefined reference to `closmg' editbufr.f:(.text+0x24dc): undefined reference to openmb_' editbufr.f:(.text+0x2500): undefined reference tocopysb' editbufr.f:(.text+0x2561): undefined reference to `copysb' editbufr.f:(.text+0x25ae): undefined reference to closbf_' editbufr.f:(.text+0x25c0): undefined reference toclosbf_' make: *** [../../exec/verf_gridtobs_editbufr] Error 1

There are errors like that in several of the codes in the system. Another set of errors looks like this:

/gpfs/dell1/nco/ops/nwprod/lib/bufr/v11.3.0/ips/18.0.1/libbufr_v11.3.0_464.a(ufbin3.o): In function `ufbin3': /gpfs/dell1/nco/ops/nwtest/lib/bufr/v11.3.0/src/ufbin3.f:139:(.text+0x1c1): relocation truncated to fit: R_X86_64_32S against symbol moda_usrint_mp_inv_' defined in COMMON section in /gpfs /dell1/nco/ops/nwprod/lib/bufr/v11.3.0/ips/18.0.1/libbufr_v11.3.0_4_64.a(moda_usrint.o) /gpfs/dell1/nco/ops/nwprod/lib/bufr/v11.3.0/ips/18.0.1/libbufr_v11.3.0_4_64.a(ufbint.o): In functionufbint_': /gpfs/dell1/nco/ops/nwtest/lib/bufr/v11.3.0/src/ufbint.f:329:(.text+0x104): relocation truncated to fit: R_X86_64_32S against symbol moda_usrint_mp_inv_' defined in COMMON section in /gpfs /dell1/nco/ops/nwprod/lib/bufr/v11.3.0/ips/18.0.1/libbufr_v11.3.0_4_64.a(moda_usrint.o) /gpfs/dell1/nco/ops/nwprod/lib/bufr/v11.3.0/ips/18.0.1/libbufr_v11.3.0_4_64.a(ufbrw.o): In functionufbrw_': /gpfs/dell1/nco/ops/nwtest/lib/bufr/v11.3.0/src/ufbrw.f:197:(.text+0x188): relocation truncated to fit: R_X86_64_32S aga inst symbol moda_usrint_mp_val_' defined in COMMON section in /gpfs/dell1/nco/ops/nwprod/lib/bufr/v11.3.0/ips/18.0.1/libbufr_v11.3.0_4_64.a(moda_usrint.o) /gpfs/dell1/nco/ops/nwtest/lib/bufr/v11.3.0/src/ufbrw.f:173:(.text+0x311): relocation truncated to fit: R_X86_64_32S against symbolmoda_usrint_mpval' defined in COMMON section in /gpfs/dell1/nco/ops/nwprod/lib/bufr/v11.3.0/ips/18.0.1/libbufr_v11.3.0_4_64.a(moda_usrint.o) /gpfs/dell1/nco/ops/nwtest/lib/bufr/v11.3.0/src/ufbrw.f:182:(.text+0x378): relocation truncated to fit: R_X86_64_32S against symbol moda_usrint_mp_val_' defined in COMMON section in /gpfs/dell1/nco/ops/nwprod/lib/bufr/v11.3.0/ips/18.0.1/libbufr_v11.3.0_4_64.a(moda_usrint.o) /gpfs/dell1/nco/ops/nwtest/lib/bufr/v11.3.0/src/ufbrw.f:143:(.text+0x5e6): relocation truncated to fit: R_X86_64_32S against symbolmoda_usrint_mpinv' defined in COMMON section in /gpfs/dell1/nco/ops/nwprod/lib/bufr/v11.3.0/ips/18.0.1/libbufr_v11.3.0_4_64.a(moda_usrint.o) /gpfs/dell1/nco/ops/nwtest/lib/bufr/v11.3.0/src/ufbrw.f:143:(.text+0x62b): relocation truncated to fit: R_X86_64_32S against symbol moda_usrint_mp_inv_' defined in COMMON section in /gpfs/dell1/nco/ops/nwprod/lib/bufr/v11.3.0/ips/18.0.1/libbufr_v11.3.0_4_64.a(moda_usrint.o) /gpfs/dell1/nco/ops/nwtest/lib/bufr/v11.3.0/src/ufbrw.f:143:(.text+0x670): relocation truncated to fit: R_X86_64_32S against symbolmoda_usrint_mpinv' defined in COMMON section in /gpfs/dell1/nco/ops/nwprod/lib/bufr/v11.3.0/ips/18.0.1/libbufr_v11.3.0_4_64.a(moda_usrint.o) /gpfs/dell1/nco/ops/nwtest/lib/bufr/v11.3.0/src/ufbrw.f:143:(.text+0x6b5): relocation truncated to fit: R_X86_64_32S against symbol moda_usrint_mp_inv_' defined in COMMON section in /gpfs/dell1/nco/ops/nwprod/lib/bufr/v11.3.0/ips/18.0.1/libbufr_v11.3.0_4_64.a(moda_usrint.o) /gpfs/dell1/nco/ops/nwtest/lib/bufr/v11.3.0/src/ufbrw.f:143:(.text+0x6fa): relocation truncated to fit: R_X86_64_32S against symbolmoda_usrint_mpinv' defined in COMMON section in /gpfs/dell1/nco/ops/nwprod/lib/bufr/v11.3.0/ips/18.0.1/libbufr_v11.3.0_4_64.a(moda_usrint.o) /gpfs/dell1/nco/ops/nwtest/lib/bufr/v11.3.0/src/ufbrw.f:148:(.text+0x7ee): additional relocation overflows omitted from the output make: *** [../../exec/verf_gridtobs_gridtobs] Error 1

Finally, another set of errors:

getanl.o: In function getanl_': getanl.f:(.text+0x823): undefined reference todatelen' getanl.f:(.text+0x10a4): undefined reference to `datebf' getanl.f:(.text+0x1513): undefined reference to openbf_' getanl.f:(.text+0x1579): undefined reference toireadmg' getanl.f:(.text+0x15b3): undefined reference to `nmsub' getanl.f:(.text+0x1f90): undefined reference to ireadmg_' getanl.f:(.text+0x2565): undefined reference toclosbf' getanl.f:(.text+0x2581): undefined reference to `openbf' getanl.f:(.text+0x25e9): undefined reference to ireadmg_' getanl.f:(.text+0x262b): undefined reference tonmsub' getanl.f:(.text+0x3381): undefined reference to `ireadmg' getanl.f:(.text+0x33a5): undefined reference to closbf_' ireadpb.o: In functionireadpb': ireadpb.f:(.text+0x27): undefined reference to `readsb' ireadpb.f:(.text+0x65): undefined reference to ufbint_' ireadpb.f:(.text+0x148): undefined reference toufbint' ireadpb.f:(.text+0x177): undefined reference to `ufbint' ireadpb.f:(.text+0x1a6): undefined reference to ufbint_' ireadpb.f:(.text+0x23e): undefined reference toufbint' ireadpb.o:ireadpb.f:(.text+0x26d): more undefined references to `ufbint' follow ireadpb.o: In function ireadpb_': ireadpb.f:(.text+0xaf8): undefined reference toufbevn' ireadpb.f:(.text+0xd47): undefined reference to `ufbget' ireadpb.f:(.text+0xd71): undefined reference to readmg_' ireadpb.f:(.text+0xe69): undefined reference tonmsub' ireadpb.f:(.text+0xe94): undefined reference to `ufbget' ireadpb.f:(.text+0xf4c): undefined reference to readsb_' ireadpb.f:(.text+0xf87): undefined reference toufbint' ireadpb.f:(.text+0xfb3): undefined reference to `ufbint' ireadpb.f:(.text+0xfdf): undefined reference to ufbint_' ireadpb.f:(.text+0x1074): undefined reference toufbint' ireadpb.f:(.text+0x10a0): undefined reference to `ufbint' ireadpb.o:ireadpb.f:(.text+0x10cc): more undefined references to ufbint_' follow ireadpb.o: In functionireadpb': ireadpb.f:(.text+0x1217): undefined reference to `ufbevn' ufbxy3.o: In function ufbxy3_': ufbxy3.f:(.text+0x81): undefined reference toufbtab_' prepfits.o: In function MAIN__': prepfits.f:(.text+0x209e): undefined reference todatelen' prepfits.f:(.text+0x2a1b): undefined reference to `datebf' prepfits.f:(.text+0x3038): undefined reference to `openbf_'

PerryShafran-NOAA commented 3 years ago

Oh, I'm not building a bufr library - I'm compiling my codes with the bufr library, using the file /gpfs/dell2/emc/verification/save/Perry.Shafran/verif_bufr11.3.1/sorc/makeit, and the modules file in that sorc directory.

PerryShafran-NOAA commented 3 years ago

I'm pretty sure the 2nd set of errors in the list above has to do with the use of COMMON statements that I'll need to use module files for those, but I'm not sure how to solve the other errors.

kgerheiser commented 3 years ago

Looks like the bufr library isn't being linked to properly. What does your link line look like? Are you using make or CMake?

PerryShafran-NOAA commented 3 years ago

I'm using make.

I'm compiling for several codes.

PerryShafran-NOAA commented 3 years ago

Looks like you're right! The link isn't being done properly for those specific codes. Let me look into that for a quick sec and get back to you.

PerryShafran-NOAA commented 3 years ago

OK, I think I figured it out. I think it had to do with the link to the supersize bufr file, which is no longer in use for 11.3.0. I think that's it.

kgerheiser commented 3 years ago

Going to close this unless you're still having issues.

PerryShafran-NOAA commented 3 years ago

I think I'm all set now! I got it compiled, which I think is the most important part. I think I got it from here. Thanks for your help!