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

add a build summary to the autotools and cmake builds #256

Closed
edwardhartnett opened this issue May 11, 2020 · 6 comments
Closed

add a build summary to the autotools and cmake builds #256

edwardhartnett opened this issue May 11, 2020 · 6 comments
Assignees
Milestone

Comments

@edwardhartnett
Copy link
Contributor

The netcdf-c package prints a very helpful summary of the build choices at the end of the configure step.

It would be great if the netcdf-fortran package did the same.

Not only have I found these very helpful, but I was just told by some others at NOAA that they find the netcdf-c build summary very helpful in understanding their build.

@WardF
Copy link
Member

WardF commented May 12, 2020

We've had this in the C library for a while, and it's been on the back burner for the Fortran library for a while. Let me see if I can add this for the impending release, now that #212 has been addressed (after a fashion, by forcing the appropriate compiler flags when necessary, until a fix can be made in the code).

@WardF WardF self-assigned this May 12, 2020
@WardF WardF added this to the 4.5.3 milestone May 12, 2020
@edwardhartnett
Copy link
Contributor Author

This is so popular that I have been asked to add it to the CMake build of one (and probably more in future) variation of the sprawling GFS (https://www.ncdc.noaa.gov/data-access/model-data/model-datasets/global-forcast-system-gfs) build.

NetCDF and HDF5 were specifically mentioned as providing very helpful information, the kind that should be provided to those who build the GFS. As you can imagine, there are many options!

So I will watch your CMake efforts with interest. ;-)

@WardF
Copy link
Member

WardF commented May 14, 2020

Juggling a bunch of balls but will see what I can do; I seem to recall there was more effort than expected to bring the cmake and autotools variables into parity in the C branch. When Russ added cmake to Fortran, that was based on the initial C library attempt which has since been rewritten. I'll get a summary form going, hopefully there aren't too many unexpected surprises lurking.

@edwardhartnett
Copy link
Contributor Author

I believe the best path is, as is done with netcdf-c, a libnetcdf.settings.in file which gets substituted values:

Indeed it is work and effort to make sure both autotools and CMake give the correct answers. ;-) I just messed that up with the szip values, and Greg fixed them for me.

But in spite of the effort it is super-useful to scientists and sysadmins. I also routinely look at the summary when building netcdf-c or HDF5 to ensure I got my options correct...

# NetCDF C Configuration Summary
==============================

# General
-------
NetCDF Version:		@PACKAGE_VERSION@
Dispatch Version:       @NC_DISPATCH_VERSION@
Configured On:		@CONFIG_DATE@
Host System:		@host_cpu@-@host_vendor@-@host_os@
Build Directory: 	@abs_top_builddir@
Install Prefix:         @prefix@

# Compiling Options
-----------------
C Compiler:		@CC_VERSION@
...

@edwardhartnett
Copy link
Contributor Author

THis was in the most recent release and has already proven very useful. I added a similar summary to the next NOAA model build system, and plan to also add one to PIO.

THanks @WardF for adding this.

@WardF
Copy link
Member

WardF commented Jun 22, 2020

No problem; it's been on the list for a while, thanks for motivating us to finall add it!

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

2 participants