Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#347 t/pdl_from_string.t has a failure if BADVAL_NAN=1

critical
open
nobody
None
5
2014-01-05
2014-01-05
Diab Jerius
No

perlDL shell v1.357
PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file
'COPYING' in the PDL distribution. This is free software and you
are welcome to redistribute it under certain conditions, see
the same file for details.

Summary of my PDL configuration

VERSION: PDL v2.007 (supports bad values)

$%PDL::Config = {
'BADVAL_PER_PDL' => '0',
'WITH_PROJ' => '0',
'POSIX_THREADS_INC' => undef,
'PDL_CONFIG_VERSION' => '0.005',
'FFTW_TYPE' => 'double',
'PDL_BUILD_DIR' => '/data/macabretmp/dj/PDL-2.007',
'FFTW_LIBS' => undef,
'WITH_FFTW' => '0',
'GSL_LIBS' => undef,
'WITH_IO_BROWSER' => '0',
'PROJ_INC' => undef,
'WHERE_PLPLOT_INCLUDE' => '0',
'HTML_DOCS' => '0',
'SKIP_KNOWN_PROBLEMS' => '0',
'WHERE_PLPLOT_LIBS' => '0',
'WITH_3D' => '0',
'WITH_POSIX_THREADS' => '1',
'POGL_VERSION' => '0.6702',
'FFTW_INC' => undef,
'HIDE_TRYLINK' => '1',
'HDF_INC' => undef,
'WITH_HDF' => '0',
'POGL_WINDOW_TYPE' => 'glut',
'WITH_GD' => '0',
'WITH_BADVAL' => '1',
'FITS_LEGACY' => '1',
'WITH_SLATEC' => '1',
'BADVAL_USENAN' => '1',
'WITH_DEVEL_REPL' => '0',
'TEMPDIR' => '/tmp',
'PROJ_LIBS' => undef,
'USE_POGL' => '0',
'PDL_BUILD_VERSION' => '2.007',
'GD_LIBS' => undef,
'GSL_INC' => undef,
'GD_INC' => undef,
'WITH_GSL' => '1',
'OPTIMIZE' => undef,
'PDLDOC_IGNORE_AUTOLOADER' => '0',
'HDF_LIBS' => undef,
'POSIX_THREADS_LIBS' => undef,
'MALLOCDBG' => {},
'WITH_MINUIT' => '1',
'WITH_PLPLOT' => '0',
'MINUIT_LIB' => undef
};
Summary of my perl5 (revision 5 version 16 subversion 3) configuration:

Platform:
osname=linux, osvers=2.6.32-5-amd64, archname=x86_64-linux_debian-6-thread-multi
uname='linux macabre 2.6.32-5-amd64 #1 smp mon sep 23 22:14:43 utc 2013 x86_64 gnulinux '
config_args='-de -Dprefix=/proj/axaf/ots/pkgs/perl-5.16/x86_64-linux_debian-6 -Uinstallusrbinperl -Dperladmin=none -Dstartperl=#!/usr/bin/env /proj/axaf/bin/perl -Dlocincpth=/proj/axaf/ots/include -Darchname=x86_64-linux_debian-6 -Dusethreads -Dotherlibdirs=/proj/axaf/simul/lib/perl5:/proj/axaf/simul/x86_64-linux_debian-6/lib/perl5 -Dloclibpth=/proj/axaf/ots/x86_64-linux_debian-6/lib -Dglibpth=/lib /usr/lib -Dldflags=-L/proj/axaf/ots/x86_64-linux_debian-6/lib -Wl,-rpath=/proj/axaf/ots/x86_64-linux_debian-6/lib -Duseshrplib'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/proj/axaf/ots/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/proj/axaf/ots/include'
ccversion='', gccversion='4.4.5', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags ='-L/proj/axaf/ots/x86_64-linux_debian-6/lib -Wl,-rpath=/proj/axaf/ots/x86_64-linux_debian-6/lib -fstack-protector'
libpth=/proj/axaf/ots/x86_64-linux_debian-6/lib /lib/../lib /usr/lib/../lib /lib /usr/lib /usr/lib/x86_64-linux-gnu
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.11.3.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.11.3'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/proj/axaf/ots/pkgs/perl-5.16/x86_64-linux_debian-6/lib/5.16.3/x86_64-linux_debian-6-thread-multi/CORE'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/proj/axaf/ots/x86_64-linux_debian-6/lib -fstack-protector'

If BADVAL_USENAN => 1, t/pdl_from_string.t fails a test:

not ok 29 - sets nan to bad
#   Failed test 'sets nan to bad'
#   at t/pdl_from_string.t line 183.
# Zeroeth bad value should be bad but it describes itself as 0

A TODO test fails, but it looks like it fails for the wrong reason:

not ok 37 - pdl 'nan' works by itself # TODO Sign of Nan depends on platform, still some loose ends
#   Failed (TODO) test 'pdl 'nan' works by itself'
#   at t/pdl_from_string.t line 277.
# pdl 'nan' gave me 0

Here's some code cribbed from the test :
use PDL;
use 5.10.1;

$bad_values = pdl q[nan inf -inf bad];
say $bad_values;
say $bad_values->isbad;

With the result:

[0 BAD BAD BAD]
[0 1 1 1]

I doubt it matters, but this fails on every Linux distribution I throw
it at (CentOS 6&7, Debian 6&7, Ubuntu 12.04, 13.10, Linux Mint
13,14,15,16), on both real (Intel Core2) and virtual (VirtualBox
running on a AMD 4386) machines.

Thanks,

Diab

Discussion