Skip to content

Commit ec89d88

Browse files
authored
Merge pull request #2300 from edwardhartnett/ejh_par
fixed parallel functions for netcdf-fortran build
2 parents 62c1220 + 5d1d09b commit ec89d88

File tree

3 files changed

+15
-19
lines changed

3 files changed

+15
-19
lines changed

include/ncdispatch.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,20 @@
8080
#define ATOMICTYPEMAX3 NC_DOUBLE
8181
#define ATOMICTYPEMAX5 NC_UINT64
8282

83-
#ifdef USE_PARALLEL
83+
#if !defined HDF5_PARALLEL && !defined USE_PNETCDF
84+
typedef int MPI_Comm;
85+
typedef int MPI_Info;
86+
#define MPI_COMM_WORLD 0
87+
#define MPI_INFO_NULL 0
88+
#endif
89+
8490
/* Define a struct to hold the MPI info so it can be passed down the
8591
* call stack. This is used internally by the netCDF library. It
8692
* should not be used by netcdf users. */
8793
typedef struct NC_MPI_INFO {
8894
MPI_Comm comm;
8995
MPI_Info info;
9096
} NC_MPI_INFO;
91-
#endif
9297

9398
/* Define known dispatch tables and initializers */
9499

libdispatch/CMakeLists.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@
66
# See netcdf-c/COPYRIGHT file for more info.
77
SET(libdispatch_SOURCES dcopy.c dfile.c ddim.c datt.c dattinq.c dattput.c dattget.c derror.c dvar.c dvarget.c dvarput.c dvarinq.c ddispatch.c nclog.c dstring.c dutf8.c dinternal.c doffsets.c ncuri.c nclist.c ncbytes.c nchashmap.c nctime.c nc.c nclistmgr.c utf8proc.h utf8proc.c dpathmgr.c dutil.c drc.c dauth.c dreadonly.c dnotnc4.c dnotnc3.c dinfermodel.c
88
daux.c dinstance.c
9-
dcrc32.c dcrc32.h dcrc64.c ncexhash.c ncxcache.c ncjson.c ds3util.c)
10-
11-
# if parallel I/O is enabled (PnetCDF or/and HDF5)
12-
IF(ENABLE_PARALLEL)
13-
SET(libdispatch_SOURCES ${libdispatch_SOURCES} dparallel.c)
14-
ENDIF(ENABLE_PARALLEL)
9+
dcrc32.c dcrc32.h dcrc64.c ncexhash.c ncxcache.c ncjson.c ds3util.c dparallel.c)
1510

1611
# Netcdf-4 only functions. Must be defined even if not used
1712
SET(libdispatch_SOURCES ${libdispatch_SOURCES} dgroup.c dvlen.c dcompound.c dtype.c denum.c dopaque.c dfilter.c)

libdispatch/Makefile.am

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,13 @@ noinst_LTLIBRARIES = libdispatch.la
1515
libdispatch_la_CPPFLAGS = ${AM_CPPFLAGS}
1616

1717
# The source files.
18-
libdispatch_la_SOURCES = dcopy.c dfile.c ddim.c datt.c \
19-
dattinq.c dattput.c dattget.c derror.c dvar.c dvarget.c dvarput.c \
20-
dvarinq.c dinternal.c ddispatch.c dutf8.c nclog.c dstring.c ncuri.c \
21-
nclist.c ncbytes.c nchashmap.c nctime.c nc.c nclistmgr.c dauth.c \
22-
doffsets.c dpathmgr.c dutil.c dreadonly.c dnotnc4.c dnotnc3.c \
23-
dinfermodel.c daux.c dinstance.c \
24-
dcrc32.c dcrc32.h dcrc64.c ncexhash.c ncxcache.c ncjson.c ds3util.c
25-
26-
if ENABLE_PARALLEL
27-
libdispatch_la_SOURCES += dparallel.c
28-
endif
18+
libdispatch_la_SOURCES = dcopy.c dfile.c ddim.c datt.c dattinq.c \
19+
dattput.c dattget.c derror.c dvar.c dvarget.c dvarput.c dvarinq.c \
20+
dinternal.c ddispatch.c dutf8.c nclog.c dstring.c ncuri.c nclist.c \
21+
ncbytes.c nchashmap.c nctime.c nc.c nclistmgr.c dauth.c doffsets.c \
22+
dpathmgr.c dutil.c dreadonly.c dnotnc4.c dnotnc3.c dinfermodel.c \
23+
daux.c dinstance.c dcrc32.c dcrc32.h dcrc64.c ncexhash.c ncxcache.c \
24+
ncjson.c ds3util.c dparallel.c
2925

3026
# Add the utf8 codebase
3127
libdispatch_la_SOURCES += utf8proc.c utf8proc.h

0 commit comments

Comments
 (0)