Hi, I would like to submit a couple of patches to fix issue I found in netcdf-4.1.1. Namely: * fix building with openmpi-1.4.3[1] * fix implicit function declaration * fix parallel build failure for fortran part[2] I hope you'll accept it before final 4.1.2 release. Best regards, Kacper Kowalik [1] http://bugs.gentoo.org/show_bug.cgi?id=347893 [2] http://bugs.gentoo.org/show_bug.cgi?id=296174
Fix implicit function declarations --- libsrc/nc.c +++ libsrc/nc.c @@ -15,7 +15,7 @@ # include <mpp/shmem.h> # include <intrinsics.h> #endif -#ifdef HAVE_UNISTD +#ifdef HAVE_UNISTD_H #include <unistd.h> #endif --- fortran/fort-nc4.c +++ fortran/fort-nc4.c @@ -30,6 +30,14 @@ /* These are in libsrc4/nc4vars.c... */ int nc_inq_var_chunking_ints(int ncid, int varid, int *contiguousp, int *chunksizesp); int nc_def_var_chunking_ints(int ncid, int varid, int contiguous, int *chunksizes); +int nc_set_var_chunk_cache_ints(int ncid, int varid, int size, int nelems, int preemption); +int nc_get_var_chunk_cache_ints(int ncid, int varid, int *sizep, int *nelemsp, int *preemptionp); + +/* These are in libsrc4/nc4file.c... */ +int nc_set_chunk_cache_ints(int size, int nelems, int preemption); +int nc_get_chunk_cache_ints(int *sizep, int *nelemsp, int *preemptionp); +int nc_create_par_fortran(const char *path, int cmode, int comm, int info, int *ncidp); +int nc_open_par_fortran(const char *path, int mode, int comm, int info, int *ncidp); FCALLSCFUN5(NF_INT, nc_create_par_fortran, NF_CREATE_PAR, nf_create_par, STRING, FINT2CINT, FINT2CINT, FINT2CINT, PCINT2FINT) --- libncdap3/oc/daplex.c +++ libncdap3/oc/daplex.c @@ -86,6 +86,8 @@ SCAN_PROG }; +int daperror(DAPparsestate* state, const char* msg); + /**************************************************/ int --- libncdap3/oc/ocinternal.c +++ libncdap3/oc/ocinternal.c @@ -37,6 +37,8 @@ #endif extern OCnode* makeunlimiteddimension(void); +int occurlopen(CURL** curlp); +void occurlclose(CURL* curl); #ifdef WIN32 #include <fcntl.h> --- libncdap3/oc/dapparse.c +++ libncdap3/oc/dapparse.c @@ -11,6 +11,7 @@ static OCtype octypefor(Object etype); static char* scopeduplicates(OClist* list); static int check_int32(char* val, long* value); +void setwordchars(DAPlexstate* lexstate, int kind); /****************************************************/ --- libncdap3/ncdap3.c +++ libncdap3/ncdap3.c @@ -4,6 +4,7 @@ * $Header: /var/cvsroot/gentoo-x86/sci-libs/netcdf/files/netcdf-4.1.1-implicits.patch,v 1.2 2010/12/05 11:38:45 xarthisius Exp $ *********************************************************************/ #include "config.h" +#include "netcdf3.h" #include "ncdap3.h" #include "dispatch3.h" #include "dapdispatch3.h" --- libncdap3/oc/dapparselex.h +++ libncdap3/oc/dapparselex.h @@ -88,4 +88,5 @@ extern void daplexinit(char* input, DAPlexstate** lexstatep); extern void daplexcleanup(DAPlexstate** lexstatep); +void dassetup(DAPparsestate* state); #endif /*DAPPARSELEX_H*/
Ensure hdf5.h is included before netcdf.h to avoid build error with openmpi >= 1.4.1 --- libsrc4/nc4internal.h +++ libsrc4/nc4internal.h @@ -8,13 +8,13 @@ #include <config.h> #include <stdio.h> +#include <hdf5.h> #include "error.h" #include <stdlib.h> #include <ctype.h> #include <stdarg.h> #include <string.h> #include "netcdf3.h" -#include <hdf5.h> #include <netcdf.h> #ifdef USE_PARALLEL --- libncdap4/ncdap4.h +++ libncdap4/ncdap4.h @@ -12,9 +12,9 @@ #include <stdio.h> #include "config.h" +#include "nc4internal.h" #include "netcdf.h" #include "nc.h" -#include "nc4internal.h" #include "ncdap.h" #include "getvara.h" #include "constraints3.h"
Avoid building fortran modules twice, just install them instead. https://bugs.gentoo.org/296174 --- netcdf-4.1.1/f90/Makefile.am +++ netcdf-4.1.1/f90/Makefile.am @@ -101,17 +101,23 @@ # Some fortran compilers change the file names of .mod files to all # uppercase. Just to be special. if UPPER_CASE_MOD -nodist_include_HEADERS = TYPESIZES.mod NETCDF.mod -TYPESIZES.mod: typeSizes.o -NETCDF.mod: $(NETCDF_O) -BUILT_SOURCES = TYPESIZES.mod +NETCDF_MODULES = TYPESIZES.mod NETCDF.mod else -nodist_include_HEADERS = typesizes.mod netcdf.mod -typesizes.mod: typeSizes.o -netcdf.mod: $(NETCDF_O) -BUILT_SOURCES = typesizes.mod +NETCDF_MODULES = typesizes.mod netcdf.mod endif +install-data-local: + test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" + @list='$(NETCDF_MODULES)'; test -n "$(includedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ + done + # This is what we are building: a convenience library of F90 functions. noinst_LTLIBRARIES = libnetcdff90.la
Attachment:
signature.asc
Description: OpenPGP digital signature
netcdfgroup
archives: