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

Installation of WGRIB2 with enable IPOLATE #253

Open
met-sree opened this issue Sep 26, 2024 · 7 comments
Open

Installation of WGRIB2 with enable IPOLATE #253

met-sree opened this issue Sep 26, 2024 · 7 comments

Comments

@met-sree
Copy link

met-sree commented Sep 26, 2024

Dear Sir/Madam,
We have successfully installed NCEPLIBS-1.3.0 as outlined in "https://github.com/NOAA-EMC/NCEPLIBS". Following that, we proceeded with the installation of wgrib2 as per your instructions, and the installation was completed.
However, we would like to install wgrib2 with the IPOLATE option enabled. To achieve this, we used cmake on the file and then modified the line /* #undef USE_IPOLATE */ to #define USE_IPOLATE in config.h. But, we encountered the following error during the build process:
Error:
ld: CMakeFiles/obj_lib.dir/New_grid.c.o: in function 'f_new_grid': /home/user1/SRINIVAS/wgrib2-3.3.0/wgrib2/New_grid.c:866: undefined reference to 'ipolatev_grib2_single_field' ld: /home/user1/SRINIVAS/wgrib2-3.3.0/wgrib2/New_grid.c:874: undefined reference to 'ipolates_grib2_single_field' make[2]: *** [wgrib2/CMakeFiles/wgrib2_exe.dir/build.make:674: wgrib2/wgrib2] Error 1 make[1]: *** [CMakeFiles/Makefile2:983: wgrib2/CMakeFiles/wgrib2_exe.dir/all] Error 2 make: *** [Makefile:146: all] Error 2

For your reference, we have attached the log file. Kindly look into the issue and provide guidance on how to resolve this error.

Thank you,
Sree
log.txt

@met-sree met-sree changed the title Installtion of WGRIB2 with enable IPOLATE Installation of WGRIB2 with enable IPOLATE Sep 26, 2024
@webisu
Copy link
Collaborator

webisu commented Sep 26, 2024 via email

@met-sree
Copy link
Author

Thank you for your quick reply. I enabled USE_IPOLATES in wgrib2-3.3.0/CMakeLists.txt. During the cmake process, it automatically updated as #define USE_IPOLATES in the config.h file. However, I encountered an error with the following message:

error:
config.h(11): warning #47: incompatible redefinition of macro "USE_IPOLATES" #define USE_IPOLATES

For your reference, I have attached the error log file. Could you kindly review it and provide guidance on how to resolve this issue?
log.txt

@webisu
Copy link
Collaborator

webisu commented Sep 26, 2024 via email

@edwardhartnett
Copy link
Contributor

As noted in the NCEPLIBS page, spack-stack is the new way to install NCEPLIBS, and you will get the latest versions.

See https://github.com/JCSDA/spack-stack

However, wgrib2 only needs the ip library, not the whole NCEPLIBS stack. Just install NCEPLIBS-ip-5.1.0 and that should be all you need for wgrib2.

@met-sree
Copy link
Author

Thank you for your replies. As per your suggestions, I successfully installed the latest version of Ipolates (5.1.0) using gfortran compilers. However, while trying to install wgrib2 with the same compilers, I encountered an error:

Error:
CMake Error at /home/user1/SRINIVAS/with_gfortran/ip/build/ip-config.cmake:32 (include):
include could not find requested file:
/home/user1/SRINIVAS/with_gfortran/ip/build/ip-targets.cmake
Call Stack (most recent call first):
CMakeLists.txt:90 (find_package)

CMake Error at /home/user1/SRINIVAS/with_gfortran/ip/build/ip-config.cmake:53 (get_target_property):
get_target_property() called with non-existent target "ip::ip_4".
Call Stack (most recent call first):
CMakeLists.txt:90 (find_package)
CMake Error at /home/user1/SRINIVAS/with_gfortran/ip/build/ip-config.cmake:57 (get_target_property):
get_target_property() called with non-existent target "ip::ip_4".
Call Stack (most recent call first):
CMakeLists.txt:90 (find_package)

Could you kindly review it and provide guidance on how to resolve this issue?

@met-sree
Copy link
Author

Thank you for your support. The issue was with the 'ipolate' installation, but it has been resolved by following their suggestions. Everything is now working fine.

Thank you once again
Srinivas

@met-sree
Copy link
Author

Dear all,
Interestingly, the installation was successful on the workstation with both the gfortran and Intel compilers. However, when trying to install the required system with the same configuration, I am encountering an error. I have the NetCDF library, and it is correctly pointing to the right path in wgrib2 CMAKE file.

Error:
external_lib/wgrib2/wgrib2/Config.c(14): catastrophic error: cannot open source file "/home/kkolab/IOLA/external_lib/wgrib2/wgrib2/Config.c"
#include <netcdf.h>
^
compilation aborted for external_lib/wgrib2/wgrib2/Config.c (code 4)
make[2]: *** [wgrib2/CMakeFiles/wgrib2_lib.dir/build.make:370: wgrib2/CMakeFiles/wgrib2_lib.dir/Config.c.o] Error 4
make[1]: *** [CMakeFiles/Makefile2:956: wgrib2/CMakeFiles/wgrib2_lib.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

Please provide valuable suggestions to resolve this error.
Thank you.

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

No branches or pull requests

3 participants