diff --git a/docs/building-with-autotools.md b/docs/building-with-autotools.md new file mode 100644 index 0000000000..962fd20cbb --- /dev/null +++ b/docs/building-with-autotools.md @@ -0,0 +1,199 @@ +Build Instructions for NetCDF-C using autoconf/automake/libtool {#netCDF-autotools} +=========================================== + +[TOC] + +# Overview {#autotools_overview} + +A CMake build of netCDF is also supported. Users should consider using +the CMake build, which builds netCDF on a wider range of platforms, +include Microsoft Windows with Visual Studio. The autotools based +build may eventually be retired; users may considering transitioning +to the CMake build. See \ref netCDF-CMake. + +We also provide pre-built binary downloads for the shared versions of +netCDF for use with Visual Studio. + +# Requirements {#autotools_requirements} +The following packages are required to build netCDF-C. + +* netCDF-C Source Code +* Optional Requirements: + * HDF5 Libraries for netCDF4/HDF5 support. + * libcurl for DAP support. + +
+# NetCDF C Configuration Summary +============================== + +# General +------- +NetCDF Version: 4.9.4-development +Dispatch Version: 5 +Configured On: Wed Aug 7 06:53:22 MDT 2024 +Host System: x86_64-pc-linux-gnu +Build Directory: /home/ed/netcdf-c +Install Prefix: /usr/local/netcdf-c-4.9.3 +Plugin Install Prefix: N.A. + +# Compiling Options +----------------- +C Compiler: /usr/bin/gcc +CFLAGS: -fno-strict-aliasing +CPPFLAGS: -I/usr/local/hdf5-1.14.3/include +LDFLAGS: -L/usr/local/hdf5-1.14.3/lib +AM_CFLAGS: +AM_CPPFLAGS: +AM_LDFLAGS: +Shared Library: yes +Static Library: yes +Extra libraries: -lhdf5_hl -lhdf5 -lm -lz -lsz -lzstd -lxml2 -lcurl +XML Parser: libxml2 + +# Features +-------- +Benchmarks: no +NetCDF-2 API: yes +HDF4 Support: no +HDF5 Support: yes +CDF5 Support: yes +NC-4 Parallel Support: no +PnetCDF Support: no + +DAP2 Support: yes +DAP4 Support: yes +Byte-Range Support: yes + +S3 Support: no +S3 SDK: none + +NCZarr Support: yes +NCZarr Zip Support: no + +Diskless Support: yes +MMap Support: no +ERANGE Fill Support: no +Relaxed Boundary Check: yes + +Quantization: yes +Logging: no +SZIP Write Support: yes +Standard Filters: bz2 deflate szip zstd +ZSTD Support: yes +Parallel Filters: yes ++ +Important settings include: +* Install Prefix - this is where netCDF will be installed. +* HDF5 Support - must be 'yes' to use netcdf-4/HDF5 files. +* NC-4 Parallel Support - Must be 'yes' to use HDF5 parallel I/O. +* PnetCDF Support - Must be 'yes' to use pnetcdf library for parallel I/O with classic netCDF files. +* Standard Filters - Must include 'zstd' if zstandard compression is to be used. +* DAP2/DAP4 Support - Must be 'yes' if OPeNDAP is to be used. + +## Building {#autotools_building} + +The compiler can be executed directly with 'make'. + +> $ make + +## Testing {#autotools_testing} + +Testing can be executed with: + +> $ make check + +## Installation {#autotools_installation} + +Once netCDF has been built and tested, it may be installed using the following command: + +> $ make install + + diff --git a/docs/building-with-cmake.md b/docs/building-with-cmake.md index 3448976b4b..a47caa301a 100644 --- a/docs/building-with-cmake.md +++ b/docs/building-with-cmake.md @@ -5,9 +5,16 @@ Build Instructions for NetCDF-C using CMake {#netCDF-CMake} # Overview {#cmake_overview} -Starting with netCDF-C 4.3.0, we are happy to announce the inclusion of CMake support. CMake will allow for building netCDF on a wider range of platforms, include Microsoft Windows with Visual Studio. CMake support also provides robust unit and regression testing tools. We will also maintain the standard autotools-based build system in parallel. +Starting with netCDF-C 4.3.0, we are happy to announce the inclusion +of CMake support. CMake will allow for building netCDF on a wider +range of platforms, include Microsoft Windows with Visual Studio. +CMake support also provides robust unit and regression testing tools. +We will also maintain the standard autotools-based build system in +parallel. -In addition to providing new build options for netCDF-C, we will also provide pre-built binary downloads for the shared versions of netCDF for use with Visual Studio. +In addition to providing new build options for netCDF-C, we will also +provide pre-built binary downloads for the shared versions of netCDF +for use with Visual Studio. # Requirements {#cmake_requirements} @@ -67,6 +74,24 @@ If you have libraries installed in a custom directory, you may need to specify t > $ cmake [Source Directory] -DCMAKE\_PREFIX\_PATH=/usr/custom_libraries/ +#### Building with Parallel I/O. {#cmake_parallel_io} + +NetCDF will build with parallel I/O if the C compiler is an MPI +compiler, and HDF5 was built for parallel I/O. To build netcdf-c for +parallel I/O, first build HDF5 for parallel I/O, then build netcdf-c +like this: + +> $ CC=mpicc cmake [Source Directory] -DNETCDF\_ENABLE\_PARALLEL_TESTS=ON + +The parallel I/O tests will only run if the additional configure +option is used: NETCDF_ENABLE_PARALLEL_TESTS. Those tests run (by default) +with mpiexec, on 4, 16, or 32 processors. If mpiexec cannot be used on +your login-nodes, a different command can be used to launch the +parallel I/O tests. Used the NETCDF_MPIEXEC option to set a +different parallel I/O job launcher: + +> $ CC=mpicc cmake [Source Directory] -DNETCDF\_ENABLE\_PARALLEL_TESTS=ON -DNETCDF\_MPIEXEC='srun -A account' + ## Building {#cmake_building} The compiler can be executed directly with 'make' or the appropriate command for the configurator which was used.