Commit d51c31b9 authored by Oliver Heidmann's avatar Oliver Heidmann
Browse files

Merge branch 'develop' of git.mpimet.mpg.de:cdo into develop

parents f0fcfdcd ff401fb0
2017-05-15 Uwe Schulzweida
2017-08-15 Uwe Schulzweida
* Using CDI library version 1.8.3
* Version 1.9.0 release
2017-05-17 Uwe Schulzweida
* gridToCurvilinear: Check that nvertex of regular lonlat grid is 2 [Bug #7744]
2017-05-16 Uwe Schulzweida
* Renamed all .c files to .cc, code needs to be compiled with an ISO C++11 compiler!!!
2017-05-16 Uwe Schulzweida
* Using CDI library version 1.8.2
* Version 1.8.2 release
......
......@@ -93,6 +93,8 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/config/tap-driver.sh
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_options.m4 \
$(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
$(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
......@@ -240,7 +242,6 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENABLE_CDI_LIB = @ENABLE_CDI_LIB@
ENABLE_CGRIBEX = @ENABLE_CGRIBEX@
ENABLE_CXX = @ENABLE_CXX@
ENABLE_DATA = @ENABLE_DATA@
ENABLE_EXTRA = @ENABLE_EXTRA@
ENABLE_GRIB = @ENABLE_GRIB@
......@@ -258,6 +259,7 @@ FGREP = @FGREP@
GREP = @GREP@
GRIB_API_INCLUDE = @GRIB_API_INCLUDE@
GRIB_API_LIBS = @GRIB_API_LIBS@
HAVE_CXX11 = @HAVE_CXX11@
HDF5_INCLUDE = @HDF5_INCLUDE@
HDF5_LIBS = @HDF5_LIBS@
HDF5_ROOT = @HDF5_ROOT@
......
......@@ -1244,6 +1244,8 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([m4/acx_options.m4])
m4_include([m4/ax_cxx_compile_stdcxx.m4])
m4_include([m4/ax_cxx_compile_stdcxx_11.m4])
m4_include([m4/ax_pthread.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
......
{
"CXX" : "@CXX@",
"CC" : "@CC@",
"CPP" : "@CPP@",
"CPPFLAGS" : "@CPPFLAGS@",
"CXXFLAGS" : "@CXXFLAGS@",
"CFLAGS" : "@CFLAGS@",
"LDFLAGS" : "@LDFLAGS@",
"LIBS" : "@LIBS@",
......
......@@ -24,7 +24,7 @@ do
shift
done
#
if test -z "$COMP" ; then COMP=gcc ; fi
if test -z "$COMP" ; then COMP=gnu ; fi
#
set -x
#
......@@ -43,31 +43,22 @@ case "${HOSTNAME}" in
--with-proj=/opt/local \
--with-szlib=$HOME/local/libaec-0.3.2"
if test "$COMP" = icpc ; then
${CONFPATH}configure --enable-cxx \
$CDOLIBS \
CC=icc CXX="icpc --std=c++11" CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native"
elif test "$COMP" = icc ; then
${CONFPATH}configure \
$CDOLIBS \
CC=icc CFLAGS="-g -Wall -Wwrite-strings -O2 -qopt-report=5 -march=native"
elif test "$COMP" = clang++ ; then
${CONFPATH}configure --enable-cxx \
if test "$COMP" = intel ; then
${CONFPATH}configure \
$CDOLIBS \
CC=clang CXX="clang++ --std=c++11" CFLAGS="-g -Wall -O3"
CXX=icpc CXXFLAGS="-g -Wall -O2 -qopt-report=5 -march=native" \
CC=icc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native"
elif test "$COMP" = clang ; then
${CONFPATH}configure \
$CDOLIBS \
CC=clang CFLAGS="-g -Wall -Wwrite-strings -O3"
elif test "$COMP" = g++ ; then
${CONFPATH}configure --enable-cxx \
${CONFPATH}configure \
$CDOLIBS \
CC=gcc CXX="g++ --std=c++11" CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native"
elif test "$COMP" = gcc ; then
CXX=clang++ CXXFLAGS="-g -Wall -O3" \
CC=clang CFLAGS="-g -Wall -O3"
elif test "$COMP" = gnu ; then
${CONFPATH}configure --prefix=$HOME/local \
--enable-maintainer-mode \
$CDOLIBS \
CC=gcc CFLAGS="-g -pipe -Wall -W -Wfloat-equal -Wwrite-strings -pedantic -O3 -march=native -fstack-protector"
CXX=g++ CXXFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native -march=native" \
CC=gcc CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native -march=native"
# --with-libxml2=/usr
# --with-magics=/Users/m214003/local/magics-2.14.9
else
......@@ -92,35 +83,27 @@ case "${HOSTNAME}" in
--with-libxml2=/opt/local \
--with-proj=/opt/local"
if test "$COMP" = icpc ; then
${CONFPATH}configure --enable-cxx --prefix=$HOME/local \
$CDOLIBS \
CC=icc CXX=icpc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native" CXX=icpc
elif test "$COMP" = icc ; then
${CONFPATH}configure \
$CDOLIBS \
CC=icc CFLAGS="-g -Wall -Wwrite-strings -O2 -qopt-report=5 -march=native"
elif test "$COMP" = clang++ ; then
${CONFPATH}configure --enable-cxx \
if test "$COMP" = intel ; then
${CONFPATH}configure --prefix=$HOME/local --disable-openmp \
$CDOLIBS \
CC=clang CXX=clang++ CFLAGS="-g -Wall -O3"
CXX=icpc CXXFLAGS="-g -Wall -O2 -qopt-report=5 -march=native" \
CC=icc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native"
elif test "$COMP" = clang ; then
${CONFPATH}configure \
$CDOLIBS \
CC=clang CFLAGS="-g -Wall -Wwrite-strings -Ofast -march=native"
elif test "$COMP" = pgcc ; then
${CONFPATH}configure \
${CONFPATH}configure \
$CDOLIBS \
CC=pgcc CFLAGS="-g -fast"
elif test "$COMP" = g++ ; then
${CONFPATH}configure --enable-cxx \
CXX=clang++ CXXFLAGS="-g -Wall -O3" \
CC=clang CFLAGS="-g -Wall -O3"
elif test "$COMP" = pgi ; then
${CONFPATH}configure --disable-openmp \
$CDOLIBS \
CC=gcc CXX=g++ CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3"
CXX=pgc++ CXXFLAGS="-g -fast" \
CC=pgcc CFLAGS="-g -fast"
else
${CONFPATH}configure --prefix=$HOME/local \
--enable-maintainer-mode \
$CDOLIBS \
CC=gcc CFLAGS="-g -std=c11 -pipe -Wall -Wpointer-arith -Wwrite-strings -W -Wfloat-equal -pedantic -O3 -march=native -Wa,-q -fstack-protector -funsigned-char"
CXX=g++ CXXFLAGS="-g -pipe -Wall -W -Wfloat-equal -pedantic -O3 -march=native -Wa,-q -fstack-protector" \
CC=gcc CFLAGS="-g -pipe -Wall -W -Wfloat-equal -pedantic -O3 -march=native -Wa,-q -fstack-protector"
# --with-libxml2=/usr \
# --with-magics=/Users/m214003/local/Magics-2.18.14nio \
fi
......@@ -175,50 +158,6 @@ case "${HOSTNAME}" in
CC=gcc CFLAGS="-g -pipe -Wall -W -Wfloat-equal -pedantic -O3 -march=native -fstack-protector -Wa,-q"
fi
;;
# x86_64-squeeze-x64-linux
thunder*)
CDOLIBS="--with-grib_api=/sw/squeeze-x64/grib_api-1.13.0-static-gccsys \
--with-netcdf=/sw/squeeze-x64/netcdf-4.2-static \
--with-hdf5=/sw/squeeze-x64/hdf5-1.8.8-static \
--with-szlib=/sw/squeeze-x64/libaec-0.3.2-gcc48 \
--with-udunits2=/sw/squeeze-x64/udunits-2.1.19 \
--with-proj=/sw/squeeze-x64/proj-4.7.0 LIBS=-lz"
if test "$COMP" = icpc ; then
${CONFPATH}configure --enable-cxx --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
--with-fftw3 \
$CDOLIBS \
CC=icc CXX=icpc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native"
elif test "$COMP" = icc ; then
${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
--with-fftw3 \
$CDOLIBS \
CC=icc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native"
elif test "$COMP" = pgcc ; then
${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
$CDOLIBS \
CC=pgcc CFLAGS="-g -fast"
elif test "$COMP" = clang ; then
${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
--with-fftw3 \
$CDOLIBS \
CC=clang CXX=clang++ CFLAGS="-g -O2"
elif test "$COMP" = clang++ ; then
${CONFPATH}configure --enable-cxx --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
--with-fftw3 \
$CDOLIBS \
CC=clang CXX=clang++ CFLAGS="-g -O2"
elif test "$COMP" = g++ ; then
${CONFPATH}configure --enable-cxx \
$CDOLIBS \
CC=gcc CXX=g++ CFLAGS="-g -Wall -O3"
else
${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
--with-fftw3 \
$CDOLIBS \
CC=gcc CFLAGS='-g -Wall -O3'
fi
;;
# jessie workstation x64
breeze*)
CDOLIBS="--with-grib_api=/sw/jessie-x64/grib_api-1.14.3-static-gccsys \
......@@ -271,20 +210,23 @@ case "${HOSTNAME}" in
# --with-magics=/sw/rhel6-x64/graphics/magicsxx-2.18.15-gfxonly-gcc48 \
# --with-cmor=/sw/rhel6-x64/cmor-2.9.2-shared-gcc48 \
if test "$COMP" = icc ; then
if test "$COMP" = intel ; then
${CONFPATH}configure --prefix=$HOME/local \
--with-fftw3 \
$CDOLIBS \
CC=icc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native"
elif test "$COMP" = pgcc ; then
CXX=icpc CXXFLAGS="-g -Wall -O2 -qopt-report=5 -march=native" \
CC=icc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native"
elif test "$COMP" = pgi ; then
${CONFPATH}configure --disable-openmp \
$CDOLIBS \
CC=pgcc CFLAGS="-g -fast"
CXX=pgc++ CXXFLAGS="-g -fast" \
CC=pgcc CFLAGS="-g -fast"
else
${CONFPATH}configure --prefix=$HOME/local \
--with-fftw3 \
$CDOLIBS \
CC=gcc CFLAGS='-g -Wall -O3 -march=native -mavx2'
CXX=g++ CXXFLAGS='-g -Wall -O3 -march=native -mavx2' \
CC=gcc CFLAGS='-g -Wall -O3 -march=native -mavx2'
fi
;;
# x86_64-unknown-linux-gnu
......@@ -429,62 +371,6 @@ case "${HOSTNAME}" in
--with-szlib=$HOME/local/solaris10-x86 \
CC=cc CFLAGS="-g -mt -fast"
;;
# sx6-nec-superux12.2
cs*)
${CONFPATH}configure --prefix=$HOME/local \
--with-netcdf=/pool/netcdf/netcdf-3.6.0-p1 \
CC=cc \
CFLAGS="-O -Onooverlap,restrict=all -pvctl,fullmsg,noassume,loopcnt=1000000"
;;
sx6)
${CONFPATH}configure --host=sx6 --prefix=$HOME/local \
--with-netcdf=/pool/SX-6/netcdf/netcdf-3.6.0-p1 \
CC=sxcc AR=sxar \
CFLAGS="-O -Onooverlap,restrict=all -pvctl,fullmsg,noassume,loopcnt=1000000"
;;
es)
${CONFPATH}configure --host=sx6 --prefix=$HOME/local/ES \
--with-netcdf=/S/n010/home010/c0148/local/SX \
CC=escc AR=esar \
CFLAGS="-O -Onooverlap,restrict=all -pvctl,fullmsg,noassume,loopcnt=1000000"
;;
# x86_64-unknown-linux-gnu (rhel55)
wizard*)
LDFLAGS="-lpng"
export LDFLAGS
${CONFPATH}configure --prefix=$HOME/local/centos58-x64 \
--with-proj=/sw/centos58-x64/proj-4.7.0 \
--with-hdf5=/sw/centos58-x64/hdf5-1.8.10-patch1 \
--with-udunits2=/sw/centos58-x64/udunits-2.1.19 \
--with-grib_api=/sw/centos58-x64/grib_api-1.12.3 \
--with-netcdf=/sw/centos58-x64/netcdf-4.2.1.1 \
--with-szlib=/sw/centos58-x64/szip-2.1 \
CC=gcc CFLAGS="-g -Wall -O3"
;;
# powerpc-ibm-aix5.3.0.0
blizzard*)
${CONFPATH}configure --prefix=$HOME/local \
--with-netcdf=/sw/aix61/netcdf-4.2-threadsafe \
--with-hdf5=/sw/aix61/hdf5-1.8.8-threadsafe \
--with-szlib=/sw/aix61/szip-2.1-threadsafe \
--with-udunits2=/sw/aix61/udunits-2.1.14 \
--with-proj=/sw/aix53/proj-4.6.1 \
--with-curl=/sw/aix61/curl-7.21.3 \
AR="ar -X 64" LDFLAGS="-brtl -R/sw/aix61/openssl-1.0.0d/lib:/sw/aix61/zlib-1.2.6/lib" \
CC=xlc_r CFLAGS="-g -O3 -q64 -qhot -qstrict -qarch=auto -qtune=auto -qsmp=omp -DHAVE_MMAP -qthreaded"
;;
# powerpc-ibm-aix6.0.0.0
c1a*)
${CONFPATH}configure --prefix=$HOME/local \
--with-netcdf=/usr/local/apps/netcdf/3.6.3/LP64 \
--with-hdf5=/usr/local/apps/hdf5/1.8.1/LP64 \
--with-szlib=/usr/local/apps/szip/2.1/LP64 \
AR="ar -X 64" LDFLAGS="-brtl" \
CC=xlc_r CFLAGS="-g -O3 -q64 -qhot -qstrict -qarch=auto -qtune=auto -qsmp=omp -DHAVE_MMAP -qthreaded"
;;
*)
echo "configuration for hostname $HOSTNAME not found!"
;;
# x86_64-unknown-linux-gnu (cray)
brisi*)
${CONFPATH}configure \
......
This diff is collapsed.
......@@ -33,7 +33,9 @@ AC_CHECK_TOOL([CC],[gcc],[:])
AC_CHECK_TOOL([CXX],[g++],[:])
AC_PROG_CC_C99
AM_PROG_CC_C_O
AC_PROG_CXX
AC_C_RESTRICT
AX_CXX_COMPILE_STDCXX_11
AC_OPENMP
AC_CHECK_TOOL([AR],[ar],[:])
AC_CHECK_TOOL([CPP],[cpp],[:])
......@@ -46,7 +48,6 @@ AC_CHECK_TOOL([OBJDUMP],[objdump],[:])
AC_CHECK_TOOL([STRIP],[strip],[:])
AC_CHECK_TOOL([RANLIB],[ranlib],[:])
AC_PROG_INSTALL
AC_PROG_CXX
#
FC=no
export FC
......@@ -81,19 +82,33 @@ AC_CHECK_FUNCS(getrlimit)
AC_CHECK_FUNCS(gethostname)
# Check compiler version
case "$CXX" in
pgc*) CXX_VERSION=`$CXX -V | head -2 | tail -n 1`;;
*gcc*) CXX_VERSION=`$CXX --version | head -n 1`;;
g++*) CXX_VERSION=`$CXX --version | head -n 1`;;
clang*) CXX_VERSION=`$CXX --version | head -n 1`;;
icpc*) CXX_VERSION=`$CXX --version | head -n 1`;;
sxc*) CXX_VERSION=`$CXX -V 2>&1 | tail -n 1`;;
xlc*) CXX_VERSION=`$CXX -qversion 2>&1 | head -n 1`;;
*) CXX_VERSION=`$CXX -V 2>&1 | head -n 1 | grep -v error`;;
esac
case "$CC" in
pgcc*) COMP_VERSION=`$CC -V | head -2 | tail -n 1`;;
*gcc*) COMP_VERSION=`$CC --version | head -n 1`;;
g++*) COMP_VERSION=`$CC --version | head -n 1`;;
clang*) COMP_VERSION=`$CC --version | head -n 1`;;
icc*) COMP_VERSION=`$CC --version | head -n 1`;;
sxc*) COMP_VERSION=`$CC -V 2>&1 | tail -n 1`;;
xlc*) COMP_VERSION=`$CC -qversion 2>&1 | head -n 1`;;
*) COMP_VERSION=`$CC -V 2>&1 | head -n 1 | grep -v error`;;
pgc*) C_VERSION=`$CC -V | head -2 | tail -n 1`;;
*gcc*) C_VERSION=`$CC --version | head -n 1`;;
g++*) C_VERSION=`$CC --version | head -n 1`;;
clang*) C_VERSION=`$CC --version | head -n 1`;;
icc*) C_VERSION=`$CC --version | head -n 1`;;
sxc*) C_VERSION=`$CC -V 2>&1 | tail -n 1`;;
xlc*) C_VERSION=`$CC -qversion 2>&1 | head -n 1`;;
*) C_VERSION=`$CC -V 2>&1 | head -n 1 | grep -v error`;;
esac
if test -z "$COMP_VERSION" ; then COMP_VERSION="unknown"; fi;
AC_DEFINE_UNQUOTED(COMP_VERSION, ["$COMP_VERSION"], [Compiler version])
if test -z "$CXX_VERSION" ; then CXX_VERSION="unknown"; fi;
AC_DEFINE_UNQUOTED(CXX_VERSION, ["$CXX_VERSION"], [CXX Compiler version])
if test -z "$C_VERSION" ; then C_VERSION="unknown"; fi;
AC_DEFINE_UNQUOTED(C_VERSION, ["$C_VERSION"], [C Compiler version])
# Checks for username, hostname and system type
USERNAME=$LOGNAME
......@@ -144,6 +159,7 @@ AC_MSG_RESULT([$enable_data])
AC_SUBST([ENABLE_DATA],[$enable_data])
# ----------------------------------------------------------------------
CFLAGS="$CFLAGS ${OPENMP_CFLAGS}"
CXXFLAGS="$CXXFLAGS ${OPENMP_CFLAGS}"
# ----------------------------------------------------------------------
# Add configure options
......@@ -223,16 +239,6 @@ AC_MSG_RESULT([no])
AM_CONDITIONAL(BUILD_AVX2_TESTS, test x$ac_have_as_avx2 = xyes)
AC_ARG_ENABLE([cxx],
[AS_HELP_STRING([--enable-cxx],[Use CXX as default compiler [default=no]])],
[AS_IF([test "x$enable_cxx" != 'xno'],
[CC=$CXX
CXXFLAGS=$CFLAGS
enable_cxx=yes],
[enable_cxx=no])],
[enable_cxx=no])
AC_MSG_RESULT([$enable_cxx])
AC_SUBST([ENABLE_CXX],[$enable_cxx])
# ----------------------------------------------------------------------
AC_SUBST([CXXFLAGS])
AC_SUBST([CPPFLAGS])
......@@ -244,8 +250,10 @@ AC_SUBST([AM_CPPFLAGS])
AC_SUBST([AR])
# Checks for compiler
COMPILER="$CC $CFLAGS"
AC_DEFINE_UNQUOTED(COMPILER, ["$COMPILER"], [Compiler])
C_COMPILER="$CC $CFLAGS"
AC_DEFINE_UNQUOTED(C_COMPILER, ["$C_COMPILER"], [C Compiler])
CXX_COMPILER="$CXX $CXXFLAGS"
AC_DEFINE_UNQUOTED(CXX_COMPILER, ["$CXX_COMPILER"], [CXX Compiler])
AC_REQUIRE_AUX_FILE([tap-driver.sh])
AC_PROG_AWK
......
......@@ -82,6 +82,8 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/config/mkinstalldirs COPYING
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_options.m4 \
$(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
$(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
......@@ -150,7 +152,6 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENABLE_CDI_LIB = @ENABLE_CDI_LIB@
ENABLE_CGRIBEX = @ENABLE_CGRIBEX@
ENABLE_CXX = @ENABLE_CXX@
ENABLE_DATA = @ENABLE_DATA@
ENABLE_EXTRA = @ENABLE_EXTRA@
ENABLE_GRIB = @ENABLE_GRIB@
......@@ -168,6 +169,7 @@ FGREP = @FGREP@
GREP = @GREP@
GRIB_API_INCLUDE = @GRIB_API_INCLUDE@
GRIB_API_LIBS = @GRIB_API_LIBS@
HAVE_CXX11 = @HAVE_CXX11@
HDF5_INCLUDE = @HDF5_INCLUDE@
HDF5_LIBS = @HDF5_LIBS@
HDF5_ROOT = @HDF5_ROOT@
......
......@@ -2,7 +2,7 @@
This section describes how to build {\CDO} from the sources on a UNIX system.
{\CDO} uses the GNU configure and build system for compilation.
The only requirement is a working ANSI C99 compiler.
The only requirement is a working ISO C++11 and ANSI C99 compiler.
%First go to the \href{http://www.mpimet.mpg.de/cdo/download.html}{\texttt{download}} page
%(\texttt{http://www.mpimet.mpg.de/\\,cdo/download.html}) to get the latest distribution,
......
......@@ -17,6 +17,7 @@ AS_CASE([$with_threads],
ENABLE_THREADS=yes],[AC_MSG_ERROR([multithreaded settings NOT found])])
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
CC="$PTHREAD_CC"
AS_ECHO(["CC:$CC CFLAGS:$CFLAGS LIBS:$LIBS"])],
[*],[THREADS_ROOT=$with_threads
......
This diff is collapsed.
# =============================================================================
# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
# =============================================================================
#
# SYNOPSIS
#
# AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional])
#
# DESCRIPTION
#
# Check for baseline language coverage in the compiler for the C++11
# standard; if necessary, add switches to CXX and CXXCPP to enable
# support.
#
# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX
# macro with the version set to C++11. The two optional arguments are
# forwarded literally as the second and third argument respectively.
# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for
# more information. If you want to use this macro, you also need to
# download the ax_cxx_compile_stdcxx.m4 file.
#
# LICENSE
#
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 18
AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX])
AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])])
......@@ -27,16 +27,16 @@ const char *filetypestr(int filetype)
{
switch ( filetype )
{
case CDI_FILETYPE_GRB: return ("GRIB"); break;
case CDI_FILETYPE_GRB2: return ("GRIB2"); break;
case CDI_FILETYPE_NC: return ("NetCDF"); break;
case CDI_FILETYPE_NC2: return ("NetCDF2"); break;
case CDI_FILETYPE_NC4: return ("NetCDF4"); break;
case CDI_FILETYPE_NC4C: return ("NetCDF4 classic"); break;
case CDI_FILETYPE_SRV: return ("SERVICE"); break;
case CDI_FILETYPE_EXT: return ("EXTRA"); break;
case CDI_FILETYPE_IEG: return ("IEG"); break;
default: return ("");
case CDI_FILETYPE_GRB: return ("GRIB");
case CDI_FILETYPE_GRB2: return ("GRIB2");
case CDI_FILETYPE_NC: return ("NetCDF");
case CDI_FILETYPE_NC2: return ("NetCDF2");
case CDI_FILETYPE_NC4: return ("NetCDF4");
case CDI_FILETYPE_NC4C: return ("NetCDF4 classic");
case CDI_FILETYPE_SRV: return ("SERVICE");
case CDI_FILETYPE_EXT: return ("EXTRA");
case CDI_FILETYPE_IEG: return ("IEG");
default: return ("");
}
}
......@@ -49,7 +49,7 @@ const char *datatypestr(int datatype)
snprintf(str, sizeof(str), "%d bit packed", datatype);
if ( datatype == CDI_DATATYPE_PACK ) return ("P0");
else if ( datatype > 0 && datatype <= 32 ) return (str);
else if ( datatype > 0 && datatype <= 32 ) return (str);
else if ( datatype == CDI_DATATYPE_CPX32 ) return ("C32");
else if ( datatype == CDI_DATATYPE_CPX64 ) return ("C64");
else if ( datatype == CDI_DATATYPE_FLT32 ) return ("32 bit floats");
......@@ -60,7 +60,7 @@ const char *datatypestr(int datatype)
else if ( datatype == CDI_DATATYPE_UINT8 ) return ("U8");
else if ( datatype == CDI_DATATYPE_UINT16 ) return ("U16");
else if ( datatype == CDI_DATATYPE_UINT32 ) return ("U32");
else return ("");
else return ("");
}
static
......
......@@ -2870,11 +2870,11 @@ static void read_record(int streamID, struct mapping vars[], int vlistID)
streamReadRecord(streamID, buffer, &nmiss);
for ( size_t i = 0; i < gridsize; i++ )
{
/* Wrong: (lat x basin, lev ) gridsize * levelID + i */
/* Wrong: (basin x lat, lev) gridsize * levelID + i * chardim - ( int ) floor(i / latdim) * gridsize + ( int ) floor(i/latdim)
/* Wrong: (basin x lev, lat ) gridsize/latdim * levdim * ( i - ( int ) floor(i/latdim) * latdim ) + ( int ) floor(i/latdim) + gridsize/latdim * levelID; */
/* Wrong: (lat x lev, basin ) latdim * levdim * ( int ) floor(i/latdim) + ( i - ( int ) floor(i/latdim) * latdim ) + levelID * latdim*/
/* (lev x lat, basin ) */
// Wrong: (lat x basin, lev ) gridsize * levelID + i
// Wrong: (basin x lat, lev) gridsize * levelID + i * chardim - ( int ) floor(i / latdim) * gridsize + ( int ) floor(i/latdim)
// Wrong: (basin x lev, lat ) gridsize/latdim * levdim * ( i - ( int ) floor(i/latdim) * latdim ) + ( int ) floor(i/latdim) + gridsize/latdim * levelID;
// Wrong: (lat x lev, basin ) latdim * levdim * ( int ) floor(i/latdim) + ( i - ( int ) floor(i/latdim) * latdim ) + levelID * latdim
// (lev x lat, basin )
int newIndex;
if ( levdim > 1 && type == GRID_CURVILINEAR )
newIndex = i + gridsize*levelID;
......
......@@ -54,7 +54,7 @@ void *Derivepar(void *argument)
double *full_press = NULL;
double minval, maxval;
int instNum, tableNum;
gribcode_t gribcodes = {0};
gribcode_t gribcodes = {};
cdoInitialize(argument);
......
......@@ -51,7 +51,7 @@ void *EOF3d(void * argument)
enum {EOF3D_, EOF3D_TIME, EOF3D_SPATIAL};
size_t temp_size = 0, npack = 0;
int i, varID, levelID;
int varID, levelID;
int missval_warning = 0;
int nmiss, ngrids, n = 0, nlevs = 0;
int offset;
......@@ -169,7 +169,7 @@ void *EOF3d(void * argument)
eigenvectors[varID] = (double **) Malloc(n_eig*sizeof(double *));
eigenvalues[varID] = (double **) Malloc(nts*sizeof(double *));
for ( i = 0; i < n; i++ )
for ( int i = 0; i < n; i++ )
{
if ( i < n_eig )
{
......@@ -205,7 +205,7 @@ void *EOF3d(void * argument)
streamReadRecord(streamID1, in, &nmiss);
offset = gridsize * levelID;
for ( i = 0; i < gridsize; ++i )
for ( int i = 0; i < gridsize; ++i )
{
if ( ! DBL_IS_EQUAL(in[i], missval ) )
{
......@@ -374,7 +374,7 @@ void *EOF3d(void * argument)
} /* for ( eofID = 0; eofID < n_eig; eofID++ ) */
if ( eigv ) Free(eigv);
for ( i = 0; i < n; i++ )
for ( int i = 0; i < n; i++ )
if ( cov[i] ) Free(cov[i]);
} /* for ( varID = 0; varID < nvars; varID++ ) */
......@@ -407,7 +407,7 @@ void *EOF3d(void * argument)
for ( varID=0; varID<nvars; varID++ )
varID2[varID] = vlistDefVar(vlistID2, gridID2, zaxisID2, TSTEP_INSTANT);
ngrids = vlistNgrids(vlistID2);
for ( i = 0; i < ngrids; i++ )
for ( int i = 0; i < ngrids; i++ )
vlistChangeGridIndex(vlistID2, i, gridID2);
int streamID3 = streamOpenWrite(cdoStreamName(2), cdoFiletype());
......@@ -449,14 +449,14 @@ void *EOF3d(void * argument)
if ( tsID < n_eig )
{
nmiss = 0;
for ( i = 0; i < gridsize; i++ )
for ( int i = 0; i < gridsize; i++ )
if ( DBL_IS_EQUAL(eigenvectors[varID][tsID][offset + i], missval) ) nmiss++;
streamDefRecord(streamID3, varID, levelID);
streamWriteRecord(streamID3, &eigenvectors[varID][tsID][offset], nmiss);
}
}
if ( DBL_IS_EQUAL(eigenvalues[varID][tsID][i], missval) ) nmiss = 1;
if ( DBL_IS_EQUAL(eigenvalues[varID][tsID][0], missval) ) nmiss = 1;
else nmiss = 0;
streamDefRecord(streamID2, varID, 0);
streamWriteRecord(streamID2, eigenvalues[varID][tsID],nmiss);
......@@ -465,7 +465,7 @@ void *EOF3d(void * argument)
for ( varID = 0; varID < nvars; varID++)
{
for ( i = 0; i < nts; i++)
for ( int i = 0; i < nts; i++)
{
Free(datafields[varID][i]);
if ( i < n_eig )
......