fritzo / pomagma

An inference engine for extensional untyped λ-calculus
Other
17 stars 2 forks source link

HDF5 write error? #13

Closed fritzo closed 9 years ago

fritzo commented 9 years ago
$ make test
...
------------------------------------------------------------------------------
Testing sk
cd /home/fritz/fritzo/pomagma/data/test/debug/atlas/sk

POMAGMA_SIZE=1023 \
  POMAGMA_LOG_FILE=/home/fritz/fritzo/pomagma/data/test/debug/atlas/sk/test.log \
  POMAGMA_LOG_LEVEL=2 \
  /home/fritz/fritzo/pomagma/build/debug/src/surveyor/sk.init \
  /home/fritz/fritzo/pomagma/data/test/debug/atlas/sk/0.h5 \
  /home/fritz/fritzo/pomagma/pomagma/theory/sk.compiled \
  /home/fritz/fritzo/pomagma/pomagma/language/sk.language \
  8
# took 21.5 sec

==== LOG FILE ====
29803   21.1967     INFO    sampler.m_arity_sample_count.load() = 1153
29803   21.1967     INFO    sampler.m_compound_arity_sample_count.load() = 766
29803   21.1967     INFO    Dumping structure to file /home/fritz/fritzo/pomagma/data/test/debug/atlas/sk/0.h5
29803   21.1981     ERROR   HDF5-DIAG: Error detected in HDF5 (1.8.11) thread 47574156267328:
  #000: ../../../src/H5Dio.c line 234 in H5Dwrite(): can't prepare for writing data
    major: Dataset
    minor: Write failed
  #001: ../../../src/H5Dio.c line 355 in H5D__pre_write(): no output buffer
    major: Invalid arguments to routine
    minor: Bad value

    /home/fritz/fritzo/pomagma/include/pomagma/platform/hdf5.hpp : 516
    void pomagma::hdf5::Dataset::write_all(const std::vector<_RealType>&) [with T = short unsigned int]

56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
warning: File "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
==== STACK TRACE ====
[New LWP 29803]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/home/fritz/fritzo/pomagma/build/debug/src/surveyor/sk.init /home/fritz/fritzo/'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00002b44ba8c2cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
To enable execution of this file add
    add-auto-load-safe-path /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20-gdb.py
line to your configuration file "/home/fritz/.gdbinit".
To completely disable this security protection add
    set auto-load safe-path /
line to your configuration file "/home/fritz/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
    info "(gdb)Auto-loading safe path"

Thread 1 (Thread 0x2b44b8af4f40 (LWP 29803)):
#0  0x00002b44ba8c2cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00002b44ba8c60d8 in __GI_abort () at abort.c:89
#2  0x00002b44b8f67579 in pomagma::hdf5::Dataset::write_all (this=this@entry=0x7fff01cd1970, source=...) at /home/fritz/fritzo/pomagma/include/pomagma/platform/hdf5.hpp:510
#3  0x00002b44b8f749a5 in pomagma::detail::dump (carrier=..., rel=..., file=..., name=...) at /home/fritz/fritzo/pomagma/include/pomagma/platform/structure.hpp:339
#4  0x00002b44b8f75f13 in pomagma::detail::dump (signature=..., file=...) at /home/fritz/fritzo/pomagma/include/pomagma/platform/structure.hpp:505
#5  0x00002b44b8f763d9 in pomagma::dump (signature=..., filename=...) at /home/fritz/fritzo/pomagma/include/pomagma/platform/structure.hpp:538
#6  0x00002b44b8f63989 in pomagma::Structure::dump (this=this@entry=0x2b44b8f05640 , filename=...) at /home/fritz/fritzo/pomagma/src/microstructure/structure.cpp:36
#7  0x00002b44b8ce003f in pomagma::dump_structure (filename=...) at /home/fritz/fritzo/pomagma/src/surveyor/theory.hpp:24
#8  0x0000000000401f0c in main (argc=, argv=) at /home/fritz/fritzo/pomagma/src/surveyor/init_main.cpp:66

cd /home/fritz/fritzo/pomagma

make[1]: *** [batch-test] Error 250
make[1]: Leaving directory `/home/fritz/fritzo/pomagma'
make: *** [test] Error 2

fritzo commented 9 years ago

I suspect HDF5 has a bug whereby empty datasets cannot be written. This bug was encountered when infering NCLOSED in SK, which has no proven NCLOSED elements, and thus must save an empty dataset.

fritzo commented 9 years ago

Fixed in ce7b9bf3a9bcd7917204e7099dad47d29ab91550