Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
09226fc8
Commit
09226fc8
authored
Jun 05, 2015
by
Thomas Jahns
🤸
Browse files
Fix linking of mo_cdi.
* Original patch by Nathanael Hübbe.
parent
e465e15d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/Makefile.am
View file @
09226fc8
...
...
@@ -113,8 +113,14 @@ libcdi_la_SOURCES = \
vlist_var.h
\
zaxis.c
\
zaxis.h
\
stream.c
\
swap.c
stream.c
\
swap.c
\
iterator.c
\
iterator.h
\
iterator_fallback.c
\
iterator_fallback.h
\
iterator_grib.c
\
iterator_grib.h
# cfortran.h is an optional part of libcdi
libcdi_la_USE_FC_extra_sources
=
\
...
...
@@ -129,15 +135,6 @@ EXTRA_DIST += \
$(libcdi_la_USE_FC_extra_sources)
if
HAVE_LIBGRIB_API
libcdi_la_SOURCES
+=
\
iterator.c
\
iterator.h
\
iterator_fallback.c
\
iterator_fallback.h
\
iterator_grib.c
\
iterator_grib.h
endif
libcdiresunpack_la_SOURCES
=
\
resource_unpack.c
...
...
src/Makefile.in
View file @
09226fc8
...
...
@@ -83,25 +83,17 @@ host_triplet = @host@
@USE_FC_TRUE@
am__append_2
=
\
@USE_FC_TRUE@
$(libcdi_la_USE_FC_extra_sources)
@HAVE_LIBGRIB_API_TRUE@
am__append_3
=
\
@HAVE_LIBGRIB_API_TRUE@ iterator.c
\
@HAVE_LIBGRIB_API_TRUE@ iterator.h
\
@HAVE_LIBGRIB_API_TRUE@ iterator_fallback.c
\
@HAVE_LIBGRIB_API_TRUE@ iterator_fallback.h
\
@HAVE_LIBGRIB_API_TRUE@ iterator_grib.c
\
@HAVE_LIBGRIB_API_TRUE@ iterator_grib.h
@ENABLE_CDI_LIB_TRUE@@USE_MPI_TRUE@
am__append_4
=
libcdipio.la
@ENABLE_CDI_LIB_TRUE@@USE_MPI_TRUE@
am__append_5
=
cdipio.h cdipio.inc
@ENABLE_CDI_LIB_FALSE@@USE_MPI_TRUE@
am__append_6
=
libcdipio.la
@ENABLE_CDI_LIB_TRUE@
am__append_7
=
pkgconfig/cdi.pc
@ENABLE_CDI_LIB_TRUE@@USE_MPI_TRUE@
am__append_8
=
pkgconfig/cdipio.pc
@CREATE_ISOC_TRUE@
am__append_9
=
mo_cdi.
$(OBJEXT)
@ENABLE_CDI_LIB_TRUE@@USE_MPI_TRUE@
am__append_3
=
libcdipio.la
@ENABLE_CDI_LIB_TRUE@@USE_MPI_TRUE@
am__append_4
=
cdipio.h cdipio.inc
@ENABLE_CDI_LIB_FALSE@@USE_MPI_TRUE@
am__append_5
=
libcdipio.la
@ENABLE_CDI_LIB_TRUE@
am__append_6
=
pkgconfig/cdi.pc
@ENABLE_CDI_LIB_TRUE@@USE_MPI_TRUE@
am__append_7
=
pkgconfig/cdipio.pc
@CREATE_ISOC_TRUE@
am__append_8
=
mo_cdi.
$(OBJEXT)
#CLEANFILES += cdilib.c
@CREATE_ISOC_TRUE@
am__append_10
=
mo_cdi.
$(FCMODEXT)
mo_cdi.
$(OBJEXT)
mo_cdi.f90
@ENABLE_CDI_LIB_TRUE@
am__append_11
=
pkgconfig/cdi.pc
@CREATE_ISOC_TRUE@
am__append_9
=
mo_cdi.
$(FCMODEXT)
mo_cdi.
$(OBJEXT)
mo_cdi.f90
@ENABLE_CDI_LIB_TRUE@
am__append_10
=
pkgconfig/cdi.pc
@ENABLE_CDI_LIB_TRUE@@USE_MPI_TRUE@
am__append_11
=
pkgconfig/cdipio.pc
@ENABLE_CDI_LIB_TRUE@@USE_MPI_TRUE@
am__append_12
=
pkgconfig/cdipio.pc
@ENABLE_CDI_LIB_TRUE@@USE_MPI_TRUE@
am__append_13
=
pkgconfig/cdipio.pc
subdir
=
src
DIST_COMMON
=
$(srcdir)
/Makefile.in
$(srcdir)
/Makefile.am
\
$(srcdir)
/config.h.in
$(top_srcdir)
/config/mkinstalldirs
\
...
...
@@ -189,13 +181,11 @@ am__libcdi_la_SOURCES_DIST = basetime.c basetime.h binary.c binary.h \
tablepar.h taxis.c taxis.h timebase.c timebase.h tsteps.c
\
util.c varscan.c varscan.h version.c vlist.c vlist.h
\
vlist_att.c vlist_att.h vlist_var.c vlist_var.h zaxis.c
\
zaxis.h stream.c swap.c
cfortran.h cdiFortran
.c iterator.
c
\
iterator.h
iterator_fallback.c iterator_fallback.h
\
iterator_grib.
c iterator_grib.h
zaxis.h stream.c swap.c
iterator
.c iterator.
h
\
iterator_fallback.c iterator_fallback.h
iterator_grib.c
\
iterator_grib.
h cfortran.h cdiFortran.c
am__objects_1
=
cdiFortran.lo
@USE_FC_TRUE@
am__objects_2
=
$(am__objects_1)
@HAVE_LIBGRIB_API_TRUE@
am__objects_3
=
iterator.lo
\
@HAVE_LIBGRIB_API_TRUE@ iterator_fallback.lo iterator_grib.lo
am_libcdi_la_OBJECTS
=
basetime.lo binary.lo calendar.lo cdf.lo
\
cdf_int.lo cdi_error.lo cdi_util.lo cgribexlib.lo dmemory.lo
\
cksum.lo cdi_cksum.lo error.lo extralib.lo file.lo
\
...
...
@@ -207,8 +197,8 @@ am_libcdi_la_OBJECTS = basetime.lo binary.lo calendar.lo cdf.lo \
stream_ieg.lo stream_fcommon.lo cdi_int.lo stream_record.lo
\
stream_srv.lo stream_var.lo table.lo taxis.lo timebase.lo
\
tsteps.lo util.lo varscan.lo version.lo vlist.lo vlist_att.lo
\
vlist_var.lo zaxis.lo stream.lo swap.lo
$(am__objects_2)
\
$(am__objects_
3
)
vlist_var.lo zaxis.lo stream.lo swap.lo
iterator.lo
\
iterator_fallback.lo iterator_grib.lo
$(am__objects_
2
)
libcdi_la_OBJECTS
=
$(am_libcdi_la_OBJECTS)
AM_V_lt
=
$
(
am__v_lt_@AM_V@
)
am__v_lt_
=
$
(
am__v_lt_@AM_DEFAULT_V@
)
...
...
@@ -494,9 +484,9 @@ top_srcdir = @top_srcdir@
#
EXTRA_DIST
=
cdilib.c mo_cdi.f90
$(libcdi_la_USE_FC_extra_sources)
noinst_LTLIBRARIES
=
libcdiresunpack.la
$(am__append_1)
\
$(am__append_
6
)
@ENABLE_CDI_LIB_TRUE@
lib_LTLIBRARIES
=
libcdi.la
$(am__append_
4
)
@ENABLE_CDI_LIB_TRUE@
include_HEADERS
=
cdi.h cdi.inc
$(am__append_
5
)
$(am__append_
5
)
@ENABLE_CDI_LIB_TRUE@
lib_LTLIBRARIES
=
libcdi.la
$(am__append_
3
)
@ENABLE_CDI_LIB_TRUE@
include_HEADERS
=
cdi.h cdi.inc
$(am__append_
4
)
AM_CFLAGS
=
$(PPM_CORE_CFLAGS)
$(YAXT_CFLAGS)
$(MPI_C_INCLUDE)
libcdi_la_SOURCES
=
basetime.c basetime.h binary.c binary.h calendar.c
\
calendar.h cdf.c cdf.h cdf_int.c cdf_int.h cdi.h cdi_error.c
\
...
...
@@ -517,8 +507,9 @@ libcdi_la_SOURCES = basetime.c basetime.h binary.c binary.h calendar.c \
stream_var.c swap.h table.c table.h tablepar.h taxis.c taxis.h
\
timebase.c timebase.h tsteps.c util.c varscan.c varscan.h
\
version.c vlist.c vlist.h vlist_att.c vlist_att.h vlist_var.c
\
vlist_var.h zaxis.c zaxis.h stream.c swap.c
$(am__append_2)
\
$(am__append_3)
vlist_var.h zaxis.c zaxis.h stream.c swap.c iterator.c
\
iterator.h iterator_fallback.c iterator_fallback.h
\
iterator_grib.c iterator_grib.h
$(am__append_2)
# cfortran.h is an optional part of libcdi
libcdi_la_USE_FC_extra_sources
=
\
...
...
@@ -568,12 +559,11 @@ libcdi_la_LIBADD = $(UUID_C_LIB)
#
#cdilib.o: cdilib.c
# $(COMPILE) -c $<
LOCALTARGETS
=
$(am__append_7)
$(am__append_8)
$(am__append_9)
LOCALTARGETS
=
$(am__append_6)
$(am__append_7)
$(am__append_8)
#
CLEANFILES
=
`
ls
*
~
`
$(am__append_10)
$(am__append_11)
\
$(am__append_12)
CLEANFILES
=
`
ls
*
~
`
$(am__append_9)
$(am__append_10)
$(am__append_11)
@ENABLE_CDI_LIB_TRUE@
PKGCONFIG_FILES
=
pkgconfig/cdi.pc
\
@ENABLE_CDI_LIB_TRUE@
$(am__append_1
3
)
@ENABLE_CDI_LIB_TRUE@
$(am__append_1
2
)
all
:
config.h
$(MAKE)
$(AM_MAKEFLAGS)
all-am
...
...
src/iterator_grib.c
View file @
09226fc8
...
...
@@ -170,9 +170,7 @@ destructSuper:
fail:
return
NULL
;
}
#endif
#ifdef HAVE_LIBGRIB_API
static
void
cdiGribIterator_ensureBuffer
(
CdiGribIterator
*
me
,
size_t
requiredSize
)
{
if
(
me
->
bufferSize
<
requiredSize
)
...
...
@@ -536,6 +534,7 @@ void cdiGribIterator_readFieldF(CdiIterator* super, float* buffer, size_t* nmiss
for
(
size_t
i
=
valueCount
;
i
--
;
)
buffer
[
i
]
=
(
float
)
temp
[
i
];
free
(
temp
);
}
#endif
/**
@Function cdiGribIterator_delete
...
...
@@ -550,7 +549,12 @@ void cdiGribIterator_readFieldF(CdiIterator* super, float* buffer, size_t* nmiss
*/
void
cdiGribIterator_delete
(
CdiGribIterator
*
me
)
{
#ifdef HAVE_LIBGRIB_API
if
(
me
)
cdiGribIterator_condestruct
(
me
,
NULL
,
0
);
#else
(
void
)
me
;
xabort
(
"CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"
);
#endif
}
...
...
@@ -573,7 +577,12 @@ void cdiGribIterator_delete(CdiGribIterator* me)
*/
int
cdiGribIterator_inqEdition
(
CdiGribIterator
*
me
)
{
#ifdef HAVE_LIBGRIB_API
return
(
int
)
gribEditionNumber
(
me
->
gribHandle
);
#else
(
void
)
me
;
xabort
(
"CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"
);
#endif
}
/**
...
...
@@ -592,7 +601,14 @@ int cdiGribIterator_inqEdition(CdiGribIterator* me)
*/
int
cdiGribIterator_getLong
(
CdiGribIterator
*
me
,
const
char
*
key
,
long
*
result
)
{
#ifdef HAVE_LIBGRIB_API
return
grib_get_long
(
me
->
gribHandle
,
key
,
result
);
#else
(
void
)
me
;
(
void
)
key
;
(
void
)
result
;
xabort
(
"CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"
);
#endif
}
/**
...
...
@@ -613,9 +629,17 @@ int cdiGribIterator_getLength(CdiGribIterator* me, const char* key, size_t* resu
{
#ifdef HAVE_GRIB_GET_LENGTH
return
grib_get_length
(
me
->
gribHandle
,
key
,
result
);
#else
Error
(
"unimplemented"
);
#elif defined(HAVE_LIBGRIB_API)
(
void
)
me
;
(
void
)
key
;
(
void
)
result
;
Error
(
"grib_get_length() is not available, so cdiGribIterator_getLength() can't be used"
);
return
-
1
;
#else
(
void
)
me
;
(
void
)
key
;
(
void
)
result
;
xabort
(
"CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"
);
#endif
}
...
...
@@ -635,7 +659,15 @@ int cdiGribIterator_getLength(CdiGribIterator* me, const char* key, size_t* resu
*/
int
cdiGribIterator_getString
(
CdiGribIterator
*
me
,
const
char
*
key
,
char
*
result
,
size_t
*
length
)
{
#ifdef HAVE_LIBGRIB_API
return
grib_get_string
(
me
->
gribHandle
,
key
,
result
,
length
);
#else
(
void
)
me
;
(
void
)
key
;
(
void
)
result
;
(
void
)
length
;
xabort
(
"CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"
);
#endif
}
/**
...
...
@@ -655,7 +687,13 @@ int cdiGribIterator_getString(CdiGribIterator* me, const char* key, char* result
*/
long
cdiGribIterator_inqLongValue
(
CdiGribIterator
*
me
,
const
char
*
key
)
{
#ifdef HAVE_LIBGRIB_API
return
gribGetLong
(
me
->
gribHandle
,
key
);
#else
(
void
)
me
;
(
void
)
key
;
xabort
(
"CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"
);
#endif
}
/**
...
...
@@ -676,7 +714,14 @@ long cdiGribIterator_inqLongValue(CdiGribIterator* me, const char* key)
*/
long
cdiGribIterator_inqLongDefaultValue
(
CdiGribIterator
*
me
,
const
char
*
key
,
long
defaultValue
)
{
#ifdef HAVE_LIBGRIB_API
return
gribGetLongDefault
(
me
->
gribHandle
,
key
,
defaultValue
);
#else
(
void
)
me
;
(
void
)
key
;
(
void
)
defaultValue
;
xabort
(
"CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"
);
#endif
}
/**
...
...
@@ -697,7 +742,13 @@ long cdiGribIterator_inqLongDefaultValue(CdiGribIterator* me, const char* key, l
*/
char
*
cdiGribIterator_inqStringValue
(
CdiGribIterator
*
me
,
const
char
*
key
)
{
#ifdef HAVE_LIBGRIB_API
return
gribCopyString
(
me
->
gribHandle
,
key
);
#else
(
void
)
me
;
(
void
)
key
;
xabort
(
"CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"
);
#endif
}
/**
...
...
@@ -716,7 +767,14 @@ char* cdiGribIterator_inqStringValue(CdiGribIterator* me, const char* key)
*/
int
cdiGribIterator_getDouble
(
CdiGribIterator
*
me
,
const
char
*
key
,
double
*
result
)
{
#ifdef HAVE_LIBGRIB_API
return
grib_get_double
(
me
->
gribHandle
,
key
,
result
);
#else
(
void
)
me
;
(
void
)
key
;
(
void
)
result
;
xabort
(
"CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"
);
#endif
}
/**
...
...
@@ -735,7 +793,14 @@ int cdiGribIterator_getDouble(CdiGribIterator* me, const char* key, double* resu
*/
int
cdiGribIterator_getSize
(
CdiGribIterator
*
me
,
const
char
*
key
,
size_t
*
result
)
{
#ifdef HAVE_LIBGRIB_API
return
grib_get_size
(
me
->
gribHandle
,
key
,
result
);
#else
(
void
)
me
;
(
void
)
key
;
(
void
)
result
;
xabort
(
"CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"
);
#endif
}
/**
...
...
@@ -754,7 +819,15 @@ int cdiGribIterator_getSize(CdiGribIterator* me, const char* key, size_t* result
*/
int
cdiGribIterator_getLongArray
(
CdiGribIterator
*
me
,
const
char
*
key
,
long
*
result
,
size_t
*
size
)
{
#ifdef HAVE_LIBGRIB_API
return
grib_get_long_array
(
me
->
gribHandle
,
key
,
result
,
size
);
#else
(
void
)
me
;
(
void
)
key
;
(
void
)
result
;
(
void
)
size
;
xabort
(
"CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"
);
#endif
}
/**
...
...
@@ -773,7 +846,15 @@ int cdiGribIterator_getLongArray(CdiGribIterator* me, const char* key, long* res
*/
int
cdiGribIterator_getDoubleArray
(
CdiGribIterator
*
me
,
const
char
*
key
,
double
*
result
,
size_t
*
size
)
{
#ifdef HAVE_LIBGRIB_API
return
grib_get_double_array
(
me
->
gribHandle
,
key
,
result
,
size
);
#else
(
void
)
me
;
(
void
)
key
;
(
void
)
result
;
(
void
)
size
;
xabort
(
"CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"
);
#endif
}
/**
...
...
@@ -793,7 +874,13 @@ int cdiGribIterator_getDoubleArray(CdiGribIterator* me, const char* key, double*
*/
double
cdiGribIterator_inqDoubleValue
(
CdiGribIterator
*
me
,
const
char
*
key
)
{
#ifdef HAVE_LIBGRIB_API
return
gribGetDouble
(
me
->
gribHandle
,
key
);
#else
(
void
)
me
;
(
void
)
key
;
xabort
(
"CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"
);
#endif
}
/**
...
...
@@ -814,7 +901,12 @@ double cdiGribIterator_inqDoubleValue(CdiGribIterator* me, const char* key)
*/
double
cdiGribIterator_inqDoubleDefaultValue
(
CdiGribIterator
*
me
,
const
char
*
key
,
double
defaultValue
)
{
#ifdef HAVE_LIBGRIB_API
return
gribGetDoubleDefault
(
me
->
gribHandle
,
key
,
defaultValue
);
}
#else
(
void
)
me
;
(
void
)
key
;
(
void
)
defaultValue
;
xabort
(
"CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with"
);
#endif
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment