Pallavi-Banerjee21 / votca

Automatically exported from code.google.com/p/votca
0 stars 0 forks source link

spce/ibi_dlpoly tutorial segfaults with new dlpoly readers #153

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
spce/ibi_dlpoly $ csg_inverse --options settings.xml --nowait
For a more verbose log see: inverse.log
We are doing Method: ibi
Prepare (dir step_000)
Using initial guess from dist CG-CG.dist_A.tgt for CG-CG
######################################################
# WARNING using this simulator is still experimental #
# If you find a problem report it under:             #
# http://code.google.com/p/votca/issues/list         #
######################################################
step 0 done
Doing iteration 1 (dir step_001)
Simulation with dlpoly
Make update for ibi
Calculating rdfs with csg_stat using 4 tasks
################################################################################
################################################################################
######
#                                                                               

     #
# ERROR:                                                                        

     #
# critical: 'csg_stat --nt 4 --options 
/home/junghans/votca/src/csg-tutorials/spce/ibi_dlpoly/settings.xml --top .dlpf 
--trj .dlph --begin 0 --first-frame 0' failed #
# For details see the logfile 
/home/junghans/votca/src/csg-tutorials/spce/ibi_dlpoly/inverse.log              
                                                       #
#                                                                               

     #
################################################################################
################################################################################
######
Terminated

Details:

$ gdb --args csg_stat --options ../settings.xml --top .dlpf --trj .dlph
GNU gdb (Gentoo 7.5.1 p2) 7.5.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /home/junghans/votca/bin/csg_stat...done.
(gdb) run
Starting program: /home/junghans/votca/bin/csg_stat --options ../settings.xml 
--top .dlpf --trj .dlph
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
begin to calculate distribution functions
# of bonded interactions: 0
# of non-bonded interactions: 1
    matches[0] = 'MOLECULES 1'
    matches[1] = 'MOLECULES '
    matches[2] = '1'
Read from topology file FIELD : 'MOLECULES ' - 1
Read from topology file FIELD : 'CG ' - 'NUMMOLS' - 2180
Read from topology file FIELD : 'ATOMS' - 1
Atom identification in maps '1:no:CG#1'
Read from topology file FIELD : 'FINISH' - done with 'CG '
Read from topology file FIELD : 'EOF' - done with topology (directive 'close' 
not read!)
Read from initial configuration file : ' Coarse-grained water' - header
Read from initial configuration file : '0 3' - directives line

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff615b2f3 in std::string::length() const () from 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/libstdc++.so.6
(gdb) bt
#0  0x00007ffff615b2f3 in std::string::length() const () from 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/libstdc++.so.6
#1  0x000000000046d10a in boost::detail::lexical_stream_limited_src<char, 
std::char_traits<char>, false>::operator<< <std::allocator<char> > 
(this=0x7fffffffc190, str=
    <error reading variable: Cannot access memory at address 0xffffffffffffffe8>) at /usr/include/boost/lexical_cast.hpp:1620
#2  0x0000000000477e95 in boost::detail::lexical_cast_do_cast<int, 
std::string>::lexical_cast_impl (arg=<error reading variable: Cannot access 
memory at address 0xffffffffffffffe8>)
    at /usr/include/boost/lexical_cast.hpp:2236
#3  0x00000000004773b1 in boost::lexical_cast<int, std::string> (arg=<error 
reading variable: Cannot access memory at address 0xffffffffffffffe8>)
    at /usr/include/boost/lexical_cast.hpp:2405
#4  0x00007ffff7b8e361 in votca::csg::DLPOLYTopologyReader::ReadTopology 
(this=0x69eba0, file=".dlpf", top=...)
    at /home/junghans/votca/src/csg/src/libcsg/modules/io/dlpolytopologyreader.cc:320
#5  0x00007ffff7b68267 in votca::csg::CsgApplication::Run (this=0x7fffffffd190) 
at /home/junghans/votca/src/csg/src/libcsg/csgapplication.cc:215
#6  0x00007ffff7813c77 in votca::tools::Application::Exec (this=0x7fffffffd190, 
argc=7, argv=0x7fffffffd658) at 
/home/junghans/votca/src/tools/src/libtools/application.cc:149
#7  0x0000000000476116 in main (argc=7, argv=0x7fffffffd658) at 
/home/junghans/votca/src/csg/src/tools/csg_stat.cc:116
(gdb) 

Original issue reported on code.google.com by christop...@gmail.com on 17 Dec 2013 at 4:48

GoogleCodeExporter commented 8 years ago
it's again a wrong CONFIG format:
###
Read from initial configuration file : '0 3' - directives line
###

meaning that:
-------------
keytrj (# of atom vectors -1) = 0
imcon (pbc_type) = 3 (do you have triclinic PBC?)
natoms = ???

same problem as before (issue #139)!

Original comment by abruk...@googlemail.com on 17 Dec 2013 at 4:56

GoogleCodeExporter commented 8 years ago
Doesn't the manual Version 4.02.0, July 2011, section 5.1.2.2 say:
megatm integer - Optinal, total number of particles (crystalographic entities)

?

Original comment by christop...@gmail.com on 17 Dec 2013 at 5:33

GoogleCodeExporter commented 8 years ago
well, it may say that indeed, but I have always aimed at compatibility with 
DL_POLY Classic (2.0), which requires the third number in that line - natoms.

Otherwise, the code in dlpolytrajectoryreader has to be amended too, for 
obtaining natoms as a result of reading and seeking the next non-numeric 
"timestep" line or EOF etc. For DLPC we'd anyway better read in natoms, and 
DLP-4.0 will accept it too.

Original comment by abruk...@googlemail.com on 17 Dec 2013 at 5:44

GoogleCodeExporter commented 8 years ago
Then line 320 needs to go into a try and catch block with an error message that 
the number of atoms are missing. segfaults without error message are unwanted.

Original comment by christop...@gmail.com on 17 Dec 2013 at 6:30

GoogleCodeExporter commented 8 years ago
btw if your commit message contains "fixes issue 153", this issue will be 
closed automatically once the commit arrives in the main repository.

Original comment by christop...@gmail.com on 17 Dec 2013 at 6:50

GoogleCodeExporter commented 8 years ago
that's what I did.

now it will catch it and complain!

Original comment by abruk...@googlemail.com on 17 Dec 2013 at 9:27

GoogleCodeExporter commented 8 years ago

Original comment by christop...@gmail.com on 17 Dec 2013 at 11:10