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

Simple library build #41

Merged
merged 2 commits into from
Nov 16, 2020
Merged

Simple library build #41

merged 2 commits into from
Nov 16, 2020

Conversation

kgerheiser
Copy link
Contributor

Fixes #33

The library is built without third-party libraries such as Jasper or NetCDF. This is the way is the library is used by UFS_UTILS.

Now the library and executable can be built in a single build without having to delete the library and then re-running CMake.

This is controlled by the option BUILD_LIB, which is off by default.

Thoughts @GeorgeGayno-NOAA?

The library is built with no third-party library options such as Jasper, NetCDF, ip2, etc
@GeorgeGayno-NOAA
Copy link
Contributor

I just tried my own build. If BUILD_LIB is off, I see only the executable is built. If 'on', (the default) the library and executable are built. Will the library always be built without third-party libraries, even if you want to executable to be built with them?

@kgerheiser
Copy link
Contributor Author

That is correct. The library is built without any third-party libraries under all circumstances while the executable is built with whatever options are enabled.

I've only seen two applications that use the library: UFS_UTILS and something S2S, which only need the simple library.

I'm not sure if any users need things like Jasper or NetCDF in the library. If that's something that someone might want there could an option like -DSIMPLE_LIB=OFF so that it's built with the same options as the executable.

@GeorgeGayno-NOAA
Copy link
Contributor

That is correct. The library is built without any third-party libraries under all circumstances while the executable is built with whatever options are enabled.

I've only seen two applications that use the library: UFS_UTILS and something S2S, which only need the simple library.

I'm not sure if any users need things like Jasper or NetCDF in the library. If that's something that someone might want there could an option like -DSIMPLE_LIB=OFF so that it's built with the same options as the executable.

If the wgrib2 library will be part of the hpc-stack going forward, any third-party libraries will be available as part of the stack. So, a simple library should be sufficient, no?

@kgerheiser
Copy link
Contributor Author

Maybe I don't understand your wording.

Do you mean that it would be ok to build the library with NetCDF et al. (not simple library) because all the libraries are available so it doesn't matter if it's built with them enabled?

Copy link
Contributor

@GeorgeGayno-NOAA GeorgeGayno-NOAA left a comment

Choose a reason for hiding this comment

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

I built your branch on WCOSS-Dell, then built UFS_UTILS using the simple wgrib2 library. The grib2 chgres_cube regression test passed.

@GeorgeGayno-NOAA
Copy link
Contributor

Maybe I don't understand your wording.

Do you mean that it would be ok to build the library with NetCDF et al. (not simple library) because all the libraries are available so it doesn't matter if it's built with them enabled?

Maybe I don't understand how wgrib2 works. I have only used the simple library functions. For example, I have never tried using the regrid option (which uses IPLIB) from a library call (is that even possible?) . In that case, would the wgrib2 library need to be built with IPLIB?

@kgerheiser
Copy link
Contributor Author

kgerheiser commented Nov 16, 2020

I had to look it up, and I suppose it's technically possible. Yes, the library would need to be compiled with ip to be able to re-grid with it.

The library can be called in a couple of different ways.

In the most basic form the wgrib2 library can be called in the same way as the executable by passing an array of strings as arguments, and it returns an integer code just as it would do on the command line.

Then, there's what you use, like grb2_mk_inv and grb2_inq which don't do anything fancy.

I think I'll leave it as a simple library for now. I don't think the library is widely used for re-gridding or things like that (or if at all). And then it would require UFS_UTILS to search for those libraries and have those modules loaded, which is not a big deal, but kinda un-necessary.

@GeorgeGayno-NOAA
Copy link
Contributor

I had to look it up, and I suppose it's technically possible. Yes, the library would need to be compiled with ip to be able to re-grid with it.

The library can be called in a couple of different ways.

In the most basic form the wgrib2 library can be called in the same way as the executable by passing an array of strings as arguments, and it returns an integer code just as it would do on the command line.

Then, there's what you use, like grb2_mk_inv and grb2_inq which don't do anything fancy.

I think I'll leave it as a simple library for now. I don't think the library is widely used for re-gridding or things like that (or if at all). And then it would require UFS_UTILS to search for those libraries and have those modules loaded, which is not a big deal, but kinda un-necessary.

Ok. I will do the merge.

@kgerheiser kgerheiser merged commit 58ee4ed into NOAA-EMC:develop Nov 16, 2020
@kgerheiser kgerheiser deleted the feature/dependentless-lib branch November 16, 2020 22:34
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.

wgrib2 library should be built without any extra features
2 participants