Skip to content
GitLab
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
6f094172
Commit
6f094172
authored
Feb 02, 2012
by
Uwe Schulzweida
Browse files
Set revision number to 1.5.5
parent
2bffbaba
Changes
7
Hide whitespace changes
Inline
Side-by-side
.gitattributes
View file @
6f094172
...
...
@@ -183,6 +183,8 @@ src/make_cdilib -text
src/make_fint.c -text
src/mo_cdi.f90 -text
src/model.c -text
src/namespace.c -text
src/namespace.h -text
src/pio_util.c -text
src/pio_util.h -text
src/pkgconfig/cdi.pc.in -text
...
...
configure
View file @
6f094172
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for cdi 1.5.
4
.
# Generated by GNU Autoconf 2.68 for cdi 1.5.
5
.
#
# Report bugs to <http://code.zmaw.de/projects/cdi>.
#
...
...
@@ -570,8 +570,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='cdi'
PACKAGE_TARNAME='cdi'
PACKAGE_VERSION='1.5.
4
'
PACKAGE_STRING='cdi 1.5.
4
'
PACKAGE_VERSION='1.5.
5
'
PACKAGE_STRING='cdi 1.5.
5
'
PACKAGE_BUGREPORT='http://code.zmaw.de/projects/cdi'
PACKAGE_URL=''
...
...
@@ -812,7 +812,6 @@ enable_dependency_tracking
with_gnu_ld
with_sysroot
enable_libtool_lock
with_gnu_ld
enable_largefile
with_threads
with_zlib
...
...
@@ -844,25 +843,16 @@ LDFLAGS
LIBS
CPPFLAGS
CPP
CPPFLAGS
FC
FCFLAGS
LDFLAGS
LIBS
FPP
FPPFLAGS
F77
FFLAGS
LDFLAGS
LIBS
CXX
CXXFLAGS
LDFLAGS
LIBS
CPPFLAGS
CCC
CXXCPP
CPPFLAGS
FCMODEXT'
...
...
@@ -1406,7 +1396,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures cdi 1.5.
4
to adapt to many kinds of systems.
\`configure' configures cdi 1.5.
5
to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
...
...
@@ -1476,7 +1466,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of cdi 1.5.
4
:";;
short | recursive ) echo "Configuration of cdi 1.5.
5
:";;
esac
cat <<\_ACEOF
...
...
@@ -1633,7 +1623,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
cdi configure 1.5.
4
cdi configure 1.5.
5
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
...
...
@@ -2348,7 +2338,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by cdi $as_me 1.5.
4
, which was
It was created by cdi $as_me 1.5.
5
, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
...
...
@@ -3280,7 +3270,7 @@ fi
# Define the identity of the package.
PACKAGE='cdi'
VERSION='1.5.
4
'
VERSION='1.5.
5
'
cat >>confdefs.h <<_ACEOF
...
...
@@ -27371,7 +27361,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by cdi $as_me 1.5.
4
, which was
This file was extended by cdi $as_me 1.5.
5
, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
...
...
@@ -27437,7 +27427,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
cdi config.status 1.5.
4
cdi config.status 1.5.
5
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
...
...
configure.ac
View file @
6f094172
# Process this file with autoconf to produce a configure script.
AC_INIT([cdi], [1.5.
4
], [http://code.zmaw.de/projects/cdi])
AC_INIT([cdi], [1.5.
5
], [http://code.zmaw.de/projects/cdi])
echo "configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}"
...
...
src/Makefile.am
View file @
6f094172
...
...
@@ -49,6 +49,8 @@ libcdi_la_SOURCES = \
ieglib.c
\
institution.c
\
model.c
\
namespace.c
\
namespace.h
\
pio_util.c
\
pio_util.h
\
service.h
\
...
...
src/Makefile.in
View file @
6f094172
...
...
@@ -89,7 +89,7 @@ am_libcdi_la_OBJECTS = basetime.lo binary.lo calendar.lo cdf.lo \
cdf_int.lo cdi_error.lo cdi_util.lo cdiFortran.lo
\
cgribexlib.lo dmemory.lo error.lo extralib.lo file.lo
\
gaussgrid.lo gribapi.lo grid.lo ieglib.lo institution.lo
\
model.lo pio_util.lo servicelib.lo stream_cdf.lo
\
model.lo
namespace.lo
pio_util.lo servicelib.lo stream_cdf.lo
\
stream_cgribex.lo stream_ext.lo stream_grb.lo
\
stream_gribapi.lo stream_history.lo stream_ieg.lo
\
stream_int.lo stream_record.lo stream_srv.lo stream_var.lo
\
...
...
@@ -336,6 +336,8 @@ libcdi_la_SOURCES = \
ieglib.c
\
institution.c
\
model.c
\
namespace.c
\
namespace.h
\
pio_util.c
\
pio_util.h
\
service.h
\
...
...
@@ -503,6 +505,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/ieglib.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/institution.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/model.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/namespace.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/pio_util.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/servicelib.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/stream.Plo@am__quote@
...
...
src/namespace.c
0 → 100644
View file @
6f094172
#include
<limits.h>
#include
<stdlib.h>
#include
<stdio.h>
#include
"cdi.h"
#include
"namespace.h"
#include
"pio_util.h"
static
int
nNamespaces
=
1
;
static
int
activeNamespace
=
0
;
static
int
serialHLF
=
1
;
static
int
*
hasLocalFiles
=
&
serialHLF
;
static
int
serialRS
=
STAGE_DEFINITION
;
static
statusCode
*
resStatus
=
(
statusCode
*
)
&
serialRS
;
enum
{
intbits
=
sizeof
(
int
)
*
CHAR_BIT
,
nspbits
=
4
,
idxbits
=
intbits
-
nspbits
,
nspmask
=
((
1
<<
nspbits
)
-
1
)
<<
idxbits
,
idxmask
=
(
1
<<
idxbits
)
-
1
,
};
enum
{
NUM_NAMESPACES
=
1
<<
nspbits
,
NUM_IDX
=
1
<<
idxbits
,
};
void
namespaceShowbits
(
int
n
,
char
*
name
)
{
int
i
;
unsigned
mask
;
char
bitvalues
[
intbits
+
1
];
mask
=
1
;
for
(
i
=
0
;
i
<
intbits
;
i
++
)
{
bitvalues
[
i
]
=
((
unsigned
)
n
&
mask
)
?
'1'
:
'0'
;
mask
<<=
1
;
}
bitvalues
[
intbits
]
=
'\0'
;
fprintf
(
stdout
,
"%s: %s
\n
"
,
name
,
bitvalues
);
}
int
namespaceIdxEncode
(
namespaceTuple_t
tin
)
{
xassert
(
tin
.
nsp
<
NUM_NAMESPACES
&&
tin
.
idx
<
NUM_IDX
);
return
(
tin
.
nsp
<<
idxbits
)
+
tin
.
idx
;
}
int
namespaceIdxEncode2
(
int
nsp
,
int
idx
)
{
xassert
(
nsp
<
NUM_NAMESPACES
&&
idx
<
NUM_IDX
);
return
(
nsp
<<
idxbits
)
+
idx
;
}
namespaceTuple_t
namespaceResHDecode
(
int
resH
)
{
namespaceTuple_t
tin
;
tin
.
idx
=
resH
&
idxmask
;
tin
.
nsp
=
(
int
)(((
unsigned
)(
resH
&
nspmask
))
>>
idxbits
);
return
tin
;
}
void
namespaceInit
(
int
nspn
,
int
*
argHasLocalFile
)
{
#ifdef USE_MPI
int
nspID
;
xassert
(
nspn
<=
NUM_NAMESPACES
&&
nspn
>=
1
);
nNamespaces
=
nspn
;
if
(
nspn
>=
1
)
{
hasLocalFiles
=
xmalloc
(
nspn
*
sizeof
(
hasLocalFiles
[
0
]
));
for
(
nspID
=
0
;
nspID
<
nspn
;
nspID
++
)
hasLocalFiles
[
nspID
]
=
argHasLocalFile
[
nspID
];
resStatus
=
xmalloc
(
nspn
*
sizeof
(
resStatus
[
0
]
));
}
#endif
}
void
namespaceCleanup
(
void
)
{
if
(
nNamespaces
>
1
)
{
free
(
hasLocalFiles
);
hasLocalFiles
=
NULL
;
free
(
resStatus
);
}
}
int
namespaceGetNumber
()
{
return
nNamespaces
;
}
void
pioNamespaceSetActive
(
int
nId
)
{
#ifdef USE_MPI
if
(
nId
>=
nNamespaces
||
nId
<
0
)
abort
();
activeNamespace
=
nId
;
#endif
}
int
namespaceGetActive
()
{
return
activeNamespace
;
}
int
namespaceHasLocalFile
(
int
nId
)
{
if
(
nId
>=
nNamespaces
||
nId
<
0
)
abort
();
return
hasLocalFiles
?
hasLocalFiles
[
nId
]
:
0
;
}
int
namespaceAdaptKey
(
int
key
,
int
nspTarget
)
{
namespaceTuple_t
tin
;
int
nsp
;
if
(
key
==
CDI_UNDEFID
)
return
CDI_UNDEFID
;
tin
.
idx
=
key
&
idxmask
;
tin
.
nsp
=
(
int
)(((
unsigned
)(
key
&
nspmask
))
>>
idxbits
);
xassert
(
tin
.
nsp
==
nspTarget
);
nsp
=
namespaceGetActive
();
return
namespaceIdxEncode2
(
nsp
,
tin
.
idx
);
}
int
namespaceAdaptKey2
(
int
key
)
{
namespaceTuple_t
tin
;
int
nsp
;
if
(
key
==
CDI_UNDEFID
)
return
CDI_UNDEFID
;
tin
.
idx
=
key
&
idxmask
;
tin
.
nsp
=
(
int
)(((
unsigned
)(
key
&
nspmask
))
>>
idxbits
);
nsp
=
namespaceGetActive
();
return
namespaceIdxEncode2
(
nsp
,
tin
.
idx
);
}
void
namespaceDefResStatus
(
statusCode
argResStatus
)
{
int
nsp
=
namespaceGetActive
();
resStatus
[
nsp
]
=
argResStatus
;
}
statusCode
namespaceInqResStatus
(
void
)
{
int
nsp
=
namespaceGetActive
();
return
resStatus
[
nsp
];
}
/*
* Local Variables:
* c-file-style: "Java"
* c-basic-offset: 2
* indent-tabs-mode: nil
* show-trailing-whitespace: t
* require-trailing-newline: t
* End:
*/
src/namespace.h
0 → 100644
View file @
6f094172
#ifndef NAMESPACE_H
#define NAMESPACE_H
typedef
enum
{
STAGE_DEFINITION
=
0
,
STAGE_TIMELOOP
=
1
,
STAGE_CLEANUP
=
2
}
statusCode
;
typedef
struct
{
int
idx
;
int
nsp
;
statusCode
resStatus
;
}
namespaceTuple_t
;
void
namespaceCleanup
(
void
);
void
namespaceInit
(
int
,
int
*
);
void
namespaceShowbits
(
int
,
char
*
);
int
namespaceGetNumber
(
void
);
int
namespaceGetActive
(
void
);
int
namespaceIdxEncode
(
namespaceTuple_t
);
int
namespaceIdxEncode2
(
int
,
int
);
namespaceTuple_t
namespaceResHDecode
(
int
);
int
namespaceHasLocalFile
(
int
);
int
namespaceAdaptKey
(
int
,
int
);
int
namespaceAdaptKey2
(
int
);
void
namespaceDefResStatus
(
statusCode
);
statusCode
namespaceInqResStatus
(
void
);
#endif
/*
* Local Variables:
* c-file-style: "Java"
* c-basic-offset: 2
* indent-tabs-mode: nil
* show-trailing-whitespace: t
* require-trailing-newline: t
* End:
*/
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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