epfl-ecps / channelflow

Channelflow is a software system for numerical analysis of the incompressible fluid flow in channel geometries, written in C++ and MPI-parallelized.
GNU General Public License v2.0
67 stars 29 forks source link

Compilation with Parallel NETCDF 4.7.4 #28

Open akrause2014 opened 3 years ago

akrause2014 commented 3 years ago

When compiling channelflow on ARCHER2 (https://www.archer2.ac.uk) with parallel NETCDF enabled, i.e. -DWITH_NETCDF=Parallel, the following error occurred, although netcdf_par.h was present:

-- Looking for include file netcdf_par.h - not found
FATALERRORcould not include netcdf_par.h [Required by WITH_NETCDF=Parallel]

This is caused by netcdf_par.h not including a macro definition. Changing CMakeLists.txt (line 141) to

CHECK_INCLUDE_FILES("netcdf.h;netcdf_par.h" HAVE_NETCDF_PAR_H)

and including <netcdf.h> before line 30 in channelflow/flowfield.cpp fixed the issue.

Version: Cray netcdf hdf5 parallel 4.7.4.2