Commit d1014dfc authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

read MEMTYPE from environment

parent e081697a
......@@ -4,7 +4,7 @@
Name: cdo
#BuildRequires:
Version: 1.5.5rc4
Version: 1.5.5rc5
Release: 1
Summary: Climate Data Operators
License: GNU GENERAL PUBLIC LICENSE Version 2, June 1991
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for cdo 1.5.5rc4.
# Generated by GNU Autoconf 2.68 for cdo 1.5.5rc5.
#
# Report bugs to <http://code.zmaw.de/projects/cdo>.
#
......@@ -570,8 +570,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='cdo'
PACKAGE_TARNAME='cdo'
PACKAGE_VERSION='1.5.5rc4'
PACKAGE_STRING='cdo 1.5.5rc4'
PACKAGE_VERSION='1.5.5rc5'
PACKAGE_STRING='cdo 1.5.5rc5'
PACKAGE_BUGREPORT='http://code.zmaw.de/projects/cdo'
PACKAGE_URL=''
 
......@@ -787,7 +787,6 @@ enable_fast_install
enable_dependency_tracking
with_gnu_ld
enable_libtool_lock
with_gnu_ld
enable_largefile
with_threads
with_zlib
......@@ -815,12 +814,8 @@ LDFLAGS
LIBS
CPPFLAGS
CPP
CPPFLAGS
CXX
CXXFLAGS
LDFLAGS
LIBS
CPPFLAGS
CCC
CXXCPP'
ac_subdirs_all='libcdi'
......@@ -1365,7 +1360,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 cdo 1.5.5rc4 to adapt to many kinds of systems.
\`configure' configures cdo 1.5.5rc5 to adapt to many kinds of systems.
 
Usage: $0 [OPTION]... [VAR=VALUE]...
 
......@@ -1435,7 +1430,7 @@ fi
 
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of cdo 1.5.5rc4:";;
short | recursive ) echo "Configuration of cdo 1.5.5rc5:";;
esac
cat <<\_ACEOF
 
......@@ -1573,7 +1568,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
cdo configure 1.5.5rc4
cdo configure 1.5.5rc5
generated by GNU Autoconf 2.68
 
Copyright (C) 2010 Free Software Foundation, Inc.
......@@ -2120,7 +2115,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 cdo $as_me 1.5.5rc4, which was
It was created by cdo $as_me 1.5.5rc5, which was
generated by GNU Autoconf 2.68. Invocation command line was
 
$ $0 $@
......@@ -3015,7 +3010,7 @@ fi
 
# Define the identity of the package.
PACKAGE='cdo'
VERSION='1.5.5rc4'
VERSION='1.5.5rc5'
 
 
cat >>confdefs.h <<_ACEOF
......@@ -19242,7 +19237,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 cdo $as_me 1.5.5rc4, which was
This file was extended by cdo $as_me 1.5.5rc5, which was
generated by GNU Autoconf 2.68. Invocation command line was
 
CONFIG_FILES = $CONFIG_FILES
......@@ -19308,7 +19303,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="\\
cdo config.status 1.5.5rc4
cdo config.status 1.5.5rc5
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
 
......
# Process this file with autoconf to produce a configure script.
AC_INIT([cdo], [1.5.5rc4], [http://code.zmaw.de/projects/cdo])
AC_INIT([cdo], [1.5.5rc5], [http://code.zmaw.de/projects/cdo])
CONFIG_ABORT=yes
AC_CONFIG_AUX_DIR(config)
......
......@@ -100,6 +100,7 @@ void *CDIwrite(void *argument)
off_t fsize;
unsigned int seed = 1;
const char *gridfile;
char *envstr;
double file_size, data_size = 0;
double tw, t0;
double *levels = NULL;
......@@ -111,6 +112,13 @@ void *CDIwrite(void *argument)
cdoInitialize(argument);
envstr = getenv("MEMTYPE");
if ( envstr )
{
if ( strcmp(envstr, "float") == 0 ) memtype = MEMTYPE_FLOAT;
else if ( strcmp(envstr, "double") == 0 ) memtype = MEMTYPE_DOUBLE;
}
if ( cdoVerbose ) cdoPrint("parameter: <grid, <nlevs, <ntimesteps, <nvars>>>>");
// operatorInputArg("<grid, <nlevs, <ntimesteps, <nvars>>>>");
......@@ -194,7 +202,8 @@ void *CDIwrite(void *argument)
streamDefRecord(streamID, varID, levelID);
if ( memtype == MEMTYPE_FLOAT )
{
for ( i = 0; i < gridsize; ++i ) farray[i] = vars[varID][levelID][i];
double *darray = vars[varID][levelID];
for ( i = 0; i < gridsize; ++i ) farray[i] = darray[i];
streamWriteRecordFloat(streamID, farray, 0);
data_size += gridsize*4;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment