Commit 2eba98f6 authored by Uwe Schulzweida's avatar Uwe Schulzweida

Merge branch 'develop'

parents 27f8c631 3509120d
......@@ -30,6 +30,15 @@
"dir": "/users/ram/builds/cdo",
"username": "ram",
"CC": ["icc","pgcc","cray","gcc"]
},
"wanglung": {
"hostname": "wanglung.mpi.zmaw.de",
"dir": "/home/zmaw/m300064/builds/remote"
},
"ubuntu-32bit": {
"hostname": "cdo4windows-ubuntu.mpimet.mpg.de",
"dir": "/home/mpimet/build/cdo",
"username":"mpimet"
}
},
......@@ -59,6 +68,44 @@
"configureCall": "./configure --disable-openmp CC=gcc CFLAGS='-g -O2'",
"makeCall": "make -j 12",
"sync": true
},
"localGCC": {
"doc": "local builder with default GCC - VPATH build",
"hostname": "luthien",
"configureCall": "/home/ram/src/cdo/configure --enable-openmp CC=gcc CFLAGS='-g -O2'",
"makeCall": "make -j 12",
"sync": false
},
"macOSGCC": {
"hostname": "wanglung",
"configureCall": "./configure CC=gcc CFLAGS='-g -O2'",
"makeCall": "make -j 12",
"sync": true
},
"macOSCLANG": {
"hostname": "wanglung",
"configureCall": "./configure CC=clang CFLAGS='-g -O2'",
"makeCall": "make -j 12",
"sync": true
},
"macOSCLANG++": {
"hostname": "wanglung",
"configureCall": "./configure --enable-cxx CC=clang CXX=clang++ CFLAGS='-g -O2'",
"makeCall": "make -j 12",
"sync": true
},
"macOSG++": {
"hostname": "wanglung",
"configureCall": "./configure --enable-cxx CC=gcc CXX=g++ CFLAGS='-g -O2'",
"makeCall": "make -j 12",
"sync": true
},
"linux32bit": {
"hostname": "ubuntu-32bit",
"configureCall": "./configure --with-netcdf ",
"makeCall": "make -j 3",
"username":"mpimet",
"sync": true
}
}
}
......@@ -3,6 +3,11 @@
* using CDI library version 1.7.2
* Version 1.7.2 released
2016-06-13 Uwe Schulzweida
* mul: wrong result for missval*0 (bug fix)
* expr: nmiss lost for time constant fields (bug fix)
2016-06-07 Uwe Schulzweida
* select: file structure may change with time constant variables (bug fix)
......
......@@ -15,6 +15,7 @@ Version 1.7.2 (25 June 2016):
Fixed bugs:
* Error reading Gaussian reduced GRIB files [Bug #6780 #6819]
* Installation error with OpenMP [Bug #6523]
* mul: wrong result for missval*0 (bug was introduced in 1.7.1)
* shaded, contour, grfill: set NAN missvals to -9e33 [Bug: #6677]
Version 1.7.1 (25 February 2016):
......
......@@ -15,10 +15,10 @@ if @userConfig.empty? then
exit(1)
end
# get setup from the environment
@debug = true # == Rake.verbose ? true : false
@debug = Rake.application.options.silent ? false : true
@user = ENV['USER']
# default configure call
@defautConfigureCall = lambda {|cc| "./config/default CC=#{cc}"}
# internal variables
@_help = {}
# }}}
# helper methods {{{ ===========================================================
......@@ -139,67 +139,95 @@ end
#
# construct task from builder object
def builder2task(builder,useHostAsName=false,syncSource=true)
baseTaskName = useHostAsName ? builder.host : "#{builder.host}#{builder.compiler.upcase}"
syncTaskName = "#{baseTaskName}_sync"
configTaskName = "#{baseTaskName}_conf"
buildTaskName = "#{baseTaskName}_make"
cleanTaskName = "#{baseTaskName}_clean"
checkTaskName = "#{baseTaskName}_check"
checkVTaskName = "#{baseTaskName}_checkV"
modlistTaskName = "#{baseTaskName}_mods"
showLogTaskName = "#{baseTaskName}_showLog"
baseTaskName = useHostAsName ? builder.host : "#{builder.host}#{builder.compiler.upcase}"
toDo = lambda {|what| "#{baseTaskName}_#{what}".to_sym}
if syncSource then
#desc "sync files for host: #{builder.host}, branch: #{getBranchName}"
task syncTaskName.to_sym do |t|
@_help[:sync] = "sync files for host: #{builder.host}, branch: #{getBranchName}" unless @_help.has_key?(:sync)
task toDo[:sync] do |t|
dbg("sync source code for branch:" + getBranchName)
doSync(builder)
end
end
#desc "configure on host: %s, compiler %s, branch: %s" % [builder.host, builder.compiler, getBranchName]
task configTaskName.to_sym do |t|
@_help[:conf]= \
"configure on host: %s, compiler %s, branch: %s" % [builder.host, builder.compiler, getBranchName] unless @_help.has_key?(:conf)
task toDo[:conf] do |t|
dbg("call #{builder.configureCall}")
execute("#{builder.configureCall}",builder)
end
#desc "build on host: %s, compiler %s, branch: %s" % [builder.host, builder.compiler, getBranchName]
task buildTaskName.to_sym do |t|
@_help[:make] = \
"build on host: %s, compiler %s, branch: %s" % [builder.host, builder.compiler, getBranchName] unless @_help.has_key?(:make)
task toDo[:make].to_sym do |t|
execute("make -j4",builder)
end
#desc "check on host: %s, compiler %s, branch: %s" % [builder.host, builder.compiler, getBranchName]
task checkTaskName.to_sym do |t|
@_help[:check] = \
"check on host: %s, compiler %s, branch: %s" % [builder.host, builder.compiler, getBranchName] unless @_help.has_key?(:check)
task toDo[:check] do |t|
execute("make check",builder)
end
#desc "build on host: %s, compiler %s, branch: %s" % [builder.host, builder.compiler, getBranchName]
task cleanTaskName.to_sym do |t|
@_help[:clean] = \
"build on host: %s, compiler %s, branch: %s" % [builder.host, builder.compiler, getBranchName] unless @_help.has_key?(:clean)
task toDo[:clean] do |t|
execute("make clean",builder)
end
#desc "check on host: %s, compiler %s, branch: %s" % [builder.host, builder.compiler, getBranchName]
task checkVTaskName.to_sym do |t|
@_help[:checkV] = \
"check on host: %s, compiler %s, branch: %s" % [builder.host, builder.compiler, getBranchName] unless @_help.has_key?(:checkV)
task toDo[:checkV] do |t|
execute("./src/cdo -V",builder)
end
# show remote config.log file
task showLogTaskName.to_sym do |t|
@_help[:showLog] = "show remote config.log file" unless @_help.has_key?(:make)
task toDo[:showLog] do |t|
execute("cat config.log",builder)
end
# get the auto loaded modules on the target machine
task modlistTaskName.to_sym do |t|
@_help[:cmd] = "execute command within the target build dir, e.g. rake localGCC_cmd['pwd']" unless @_help.has_key?(:cmd)
task toDo[:cmd] ,:cmd do |t, args|
warn "No command given!!" && exit(1) if args.cmd.nil?
execute(args.cmd,builder)
end
@_help[:mods] = "get the auto loaded modules on the target machine"
task toDo[:mods] do |t|
execute("module list", builder)
end
@_help[:log] = "log everything to <host|localTask>.log"
file baseTaskName+".log" do |t|
sh "rake #{baseTaskName} > #{t.name} 2>&1"
sh "finished".colorize(color: :green)
end
desc builder.docstring
task baseTaskName.to_sym => [syncSource ? syncTaskName : nil,
configTaskName,
buildTaskName,
checkTaskName].compact.map(&:to_sym)
task baseTaskName.to_sym => [syncSource ? toDo[:sync] : nil,
toDo[:conf],
toDo[:make],
toDo[:check]].compact.map(&:to_sym)
end
# }}}
def getUsername(builderConfig, hostConfig)
username = nil
username = @user if [builderConfig['hostname'],hostConfig['hostname']].include?('localhost')
return username unless username.nil?
username = builderConfig['username'] if builderConfig.has_key?('username')
return username unless username.nil?
username = hostConfig['username'] if hostConfig.has_key?('username')
return username unless username.nil?
username = @userConfig["remoteUser"] if @userConfig.has_key?('remoteUser')
return username unless username.nil?
warn "Could not find username!!"
exit(1)
end
# constuct builders out of user configuration {{{ ==============================
Builder = Struct.new(:host,:hostname,:username,:compiler,:targetDir,:configureCall,:isLocal?,:docstring)
# 1) construct builders from host configuration
......@@ -220,33 +248,42 @@ Builder = Struct.new(:host,:hostname,:username,:compiler,:targetDir,:configureCa
"builder on #{config['hostname']}, CC=#{cc}")
builder2task(builder)
}
} if config.has_key?('CC')
}
# 2) construct builders from manual configuration
@userConfig["builders"].each {|builderName,config|
@userConfig["builders"].each {|builderName,builderConfig|
hostConfig = @userConfig['hosts'][builderConfig['hostname']]
warn "Hostconfig not found!!!!" and exit(1) if hostConfig.nil?
username, hostname = getUsername(builderConfig,hostConfig), hostConfig['hostname']
if username.nil? or hostname.nil? then
puts [username, hostname].join(' - ').colorize(color: :red)
warn "Missing connection info!"
exit(1)
else
puts [username, hostname].join(' - ').colorize(color: :green) if false
end
builder = Builder.new(builderName,
@userConfig['hosts'][config["hostname"]]['hostname'],
('localhost' == config['hostname'] \
or 'localhost' == @userConfig['hosts'][config['hostname']]['hostname']) \
? @user \
: ( config.has_key?('username') \
? config['username'] \
: @userConfig["remoteUser"]),
hostname,
username,
'', # CC can be empty here, because it should be set by the given configureCall
[@userConfig['hosts'][config['hostname']]['dir'],builderName,getBranchName].join(File::SEPARATOR),
config['configureCall'],
( 'localhost' == config['hostname'] \
or 'localhost' == @userConfig['hosts'][config['hostname']]['hostname'] ),
config.has_key?('docstring') \
? config['docstring'] \
: "builder on #{config['hostname']}: #{config['configureCall']}")
[hostConfig['dir'],builderName,getBranchName].join(File::SEPARATOR),
builderConfig['configureCall'],
[builderConfig['hostname'],hostConfig['hostname']].include?('localhost'),
builderConfig.has_key?('docstring') \
? builderConfig['docstring'] \
: "builder on #{builderConfig['hostname']}: #{builderConfig['configureCall']}")
builder2task(builder,true, config['sync'])
builder2task(builder,true, builderConfig['sync'])
} if @userConfig.has_key?('builders')
# }}}
#
desc "execute listed tasks in parallel, each of them in a separate xterm"
task :par do |t|
# remove all tasks from the stack
Rake.application.top_level_tasks.clear
......@@ -261,8 +298,19 @@ task :par do |t|
sh "xterm -hold -e 'rake #{t}' "
}
end
desc "show help on all hidden tasks"
task :help do
@_help.each {|t,help|
sep = :log == t ? '.' : '_'
puts "rake <host|localTask>#{sep}#{t}".ljust(35,' ') + "# #{help}" }
end
task :default do |t|
sh "rake -sT"
end
# check connections {{{
desc "check available connections"
task :checkConnections do |t|
pp Parallel.map(@userConfig["hosts"]) {|host, config|
hostname = config['hostname']
......@@ -286,7 +334,6 @@ end
# }}}
#
# check internals {{{
desc "check some internals"
task :checkInterals do
dbg(@srcDir)
dbg(getBranchName)
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for cdo 1.7.2.
# Generated by GNU Autoconf 2.68 for cdo 1.7.2rc6.
#
# Report bugs to <http://mpimet.mpg.de/cdo>.
#
......@@ -570,8 +570,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='cdo'
PACKAGE_TARNAME='cdo'
PACKAGE_VERSION='1.7.2'
PACKAGE_STRING='cdo 1.7.2'
PACKAGE_VERSION='1.7.2rc6'
PACKAGE_STRING='cdo 1.7.2rc6'
PACKAGE_BUGREPORT='http://mpimet.mpg.de/cdo'
PACKAGE_URL=''
......@@ -640,8 +640,6 @@ XML2_LIBS
MAGICS_INCLUDE
MAGICS_ROOT
MAGICS_LIBS
UDUNITS_INCLUDE
UDUNITS_LDFLAGS
CURL_INCLUDE
CURL_LDFLAGS
PROJ_INCLUDE
......@@ -655,6 +653,8 @@ ENABLE_GRIBAPI
GRIB_API_LIBS
GRIB_API_INCLUDE
CMOR_LIBS
UDUNITS_INCLUDE
UDUNITS_LDFLAGS
NETCDF_LIBS
NETCDF_INCLUDE
NETCDF_ROOT
......@@ -823,6 +823,7 @@ with_threads
with_szlib
with_hdf5
with_netcdf
with_udunits2
with_cmor
with_grib_api
enable_grib
......@@ -833,7 +834,6 @@ enable_ieg
with_fftw3
with_proj
with_curl
with_udunits2
with_magics
with_libxml2
enable_cdi_lib
......@@ -1395,7 +1395,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.7.2 to adapt to many kinds of systems.
\`configure' configures cdo 1.7.2rc6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1465,7 +1465,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of cdo 1.7.2:";;
short | recursive ) echo "Configuration of cdo 1.7.2rc6:";;
esac
cat <<\_ACEOF
......@@ -1518,6 +1518,8 @@ Optional Packages:
location of HDF5 library
--with-netcdf=<yes|no|directory> (default=no)
location of NetCDF library (lib and include subdirs)
--with-udunits2=<directory>
Specify location of UDUNITS2 library.
--with-cmor=<directory> Specify location of CMOR library.
--with-grib_api=<yes|no|directory> (default=no)
location of GRIB_API library (lib and include
......@@ -1526,8 +1528,6 @@ Optional Packages:
--with-proj=<directory> Specify location of PROJ library for cartographic
projections.
--with-curl=<directory> Specify location of CURL library.
--with-udunits2=<directory>
Specify location of UDUNITS2 library.
--with-magics=<yes|no|directory>
location of magics library (lib and include subdirs)
--with-libxml2=<yes|no|directory>
......@@ -1613,7 +1613,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
cdo configure 1.7.2
cdo configure 1.7.2rc6
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
......@@ -2206,7 +2206,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.7.2, which was
It was created by cdo $as_me 1.7.2rc6, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
......@@ -3155,7 +3155,7 @@ fi
# Define the identity of the package.
PACKAGE='cdo'
VERSION='1.7.2'
VERSION='1.7.2rc6'
cat >>confdefs.h <<_ACEOF
......@@ -19242,6 +19242,200 @@ fi
# ----------------------------------------------------------------------
# Link application with UDUNITS2 library
# Check whether --with-udunits2 was given.
if test "${with_udunits2+set}" = set; then :
withval=$with_udunits2; case "$with_udunits2" in #(
no) :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for udunits2 library" >&5
$as_echo_n "checking for udunits2 library... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5
$as_echo "suppressed" >&6; } ;; #(
yes) :
for ac_header in udunits2.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "udunits2.h" "ac_cv_header_udunits2_h" "$ac_includes_default"
if test "x$ac_cv_header_udunits2_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_UDUNITS2_H 1
_ACEOF
fi
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ut_parse" >&5
$as_echo_n "checking for library containing ut_parse... " >&6; }
if ${ac_cv_search_ut_parse+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char ut_parse ();
int
main ()
{
return ut_parse ();
;
return 0;
}
_ACEOF
for ac_lib in '' udunits2; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_search_ut_parse=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_ut_parse+:} false; then :
break
fi
done
if ${ac_cv_search_ut_parse+:} false; then :
else
ac_cv_search_ut_parse=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ut_parse" >&5
$as_echo "$ac_cv_search_ut_parse" >&6; }
ac_res=$ac_cv_search_ut_parse
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
$as_echo "#define HAVE_LIBUDUNITS2 1" >>confdefs.h
else
as_fn_error $? "Could not link to udunits2 library!" "$LINENO" 5
fi
UDUNITS_LDFLAGS=" -ludunits2"
UDUNITS_INCLUDE=""
;; #(
*) :
UDUNITS_ROOT=$with_udunits2
if test -d "$UDUNITS_ROOT"; then :
LDFLAGS="$LDFLAGS -L$UDUNITS_ROOT/lib"
CPPFLAGS="$CPPFLAGS -I$UDUNITS_ROOT/include"
for ac_header in udunits2.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "udunits2.h" "ac_cv_header_udunits2_h" "$ac_includes_default"
if test "x$ac_cv_header_udunits2_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_UDUNITS2_H 1
_ACEOF
fi
done
for ac_header in udunits2/udunits2.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "udunits2/udunits2.h" "ac_cv_header_udunits2_udunits2_h" "$ac_includes_default"
if test "x$ac_cv_header_udunits2_udunits2_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_UDUNITS2_UDUNITS2_H 1
_ACEOF
fi
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ut_parse" >&5
$as_echo_n "checking for library containing ut_parse... " >&6; }
if ${ac_cv_search_ut_parse+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char ut_parse ();
int
main ()
{
return ut_parse ();
;
return 0;
}
_ACEOF
for ac_lib in '' udunits2; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_search_ut_parse=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_ut_parse+:} false; then :
break
fi
done
if ${ac_cv_search_ut_parse+:} false; then :
else
ac_cv_search_ut_parse=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ut_parse" >&5
$as_echo "$ac_cv_search_ut_parse" >&6; }
ac_res=$ac_cv_search_ut_parse
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
$as_echo "#define HAVE_LIBUDUNITS2 1" >>confdefs.h
else
as_fn_error $? "Could not link to udunits2 library!" "$LINENO" 5
fi
UDUNITS_LDFLAGS=" -L$UDUNITS_ROOT/lib -ludunits2"
UDUNITS_INCLUDE=" -I$UDUNITS_ROOT/include"
else
as_fn_error $? "$UDUNITS_ROOT is not a directory! UDUNITS2 suppressed" "$LINENO" 5
fi ;; #(
*) :
;;
esac
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the UDUNITS2 library" >&5
$as_echo_n "checking for the UDUNITS2 library... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5
$as_echo "suppressed" >&6; }
fi
# ----------------------------------------------------------------------
# Link application with CMOR library
CMOR_LIBS=''
......@@ -20161,200 +20355,6 @@ $as_echo_n "checking for the CURL library... " >&6; }
$as_echo "suppressed" >&6; }
fi
# ----------------------------------------------------------------------
# Link application with UDUNITS2 library
# Check whether --with-udunits2 was given.
if test "${with_udunits2+set}" = set; then :
withval=$with_udunits2; case "$with_udunits2" in #(
no) :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for udunits2 library" >&5
$as_echo_n "checking for udunits2 library... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5
$as_echo "suppressed" >&6; } ;; #(
yes) :
for ac_header in udunits2.h