2014-02-16 17:02 GMT-07:00 Sikandar Mashayak <[email protected]>: > Hi Hossein > > Christoph figured out that the segfault issue, in the above case, occurred > because of wrong GROMACS precision specification > while building csg. > > By default, the csg was built assuming double precision for GROMACS though > the precision of an installed GROMACS was single. > > The precision of GROMACS library while building csg could be set by the > cmake option of -DGROMACS_DEFINITIONS= (i) blank (nothing) for single and > (ii) -DGMX_DOUBLE for double. > > The default value was -DGROMACS_DEFINITIONS=-DGMX_DOUBLE, and the gromacs > that ./build.sh installed was a single precision. > And hence, you get a segmentation fault! > > This issue is fixed by Christoph. Now cmake tries to guess the precision > from the actual installed GROMACS library, instead of > assuming it to be double. > > So pull the changes and check if it works. If you want to be certain, > manually specify the option -DGROMACS_DEFINITIONS > when you build csg. Sikandar is right, I just want to give some more details.
A while go, we had a similar issue in votca-ctp, where a user forgot to set GMX_DOBULE=ON, but was using a double precision library. After that (Jan. 2014) we switched to auto-detecting the precision of the gromacs library and preferred double precision if it is available. However, the only difference between single and double precision is the library name (ending in _d for double) and the fact that double precision needs a cpp flag -DGMX_DOULBE (as gromacs installs precision-independent headers). The only issue in the auto-detect was that we forgot to reset GROMACS_DEFINITIONS when trying different gromacs libraries, this is fixed now. Christoph > > I hope it helps. > > Cheers > Sikandar > > > > > On Sun, Feb 16, 2014 at 2:04 AM, Sikandar Mashayak <[email protected]> > wrote: >> >> Hi Christoph >> >> Segfault is occurring due to, in my particular case, bead->getResnr() is >> greater than the top.ResidueCount(). >> >> I checked topology using gmxdump, it looks fine to me. I am, however, not >> yet sure why is there inconsistency >> in the resdue counts. >> >> I have attached the input files for csg_stat, can you please check if you >> also get the segfault? >> >> Thanks >> Sikandar >> >> >> >> On Fri, Feb 14, 2014 at 9:21 PM, Christoph Junghans <[email protected]> >> wrote: >>> >>> 2014-02-14 12:59 GMT-07:00 Sikandar Mashayak <[email protected]>: >>> > Hi Christoph >>> > >>> > The output of the gdb backtrace is: >>> > >>> > #0 std::operator<< <char, std::char_traits<char>, std::allocator<char> >>> > > >>> > (__os=..., __str= >>> > Traceback (most recent call last): >>> > File >>> > >>> > "/usr/local/gcc-4.7.1/lib64/../share/gcc-4.7.1/python/libstdcxx/v6/printers.py", >>> > line 602, in to_string >>> > header = ptr.cast(reptype) - 1 >>> > RuntimeError: Cannot access memory at address 0x39 >>> > ) at >>> > >>> > /usr/local/gcc-4.7.1/build/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/basic_string.h:2755 >>> > #1 0x00007ffff7b81335 in votca::csg::GMXTopologyReader::ReadTopology >>> > (this=0x68ddb0, file="topol_nowf.tpr", top=...) >>> > at >>> > >>> > /home/mashaya1/Apps/votca/src/csg/src/libcsg/modules/io/gmxtopologyreader.cc:145 >>> This line 145 has been there for a long time, but my guess is that >>> something goes wrong with the residue numbers: >>> top.getResidue(res_offset + bead->getResnr())->getName() >>> >>> Can you check with gmdump, if the Residue numbers in your tpr start >>> with 0 and are contiguous. >>> >>> Christoph >>> >>> > #2 0x00007ffff7b47377 in votca::csg::CsgApplication::Run >>> > (this=0x7fffffffcbe0) >>> > at >>> > /home/mashaya1/Apps/votca/src/csg/src/libcsg/csgapplication.cc:215 >>> > #3 0x00007ffff7844fbc in votca::tools::Application::Exec(int, char**) >>> > () >>> > from /home/mashaya1/Apps/votca/lib/libvotca_tools.so.3 >>> > #4 0x000000000044fca8 in main (argc=7, argv=0x7fffffffd078) >>> > at /home/mashaya1/Apps/votca/src/csg/src/tools/csg_stat.cc:116 >>> > >>> > --- >>> > Sikandar >>> > >>> > >>> > On Thu, Feb 13, 2014 at 10:10 PM, Hossein Motevaselian >>> > <[email protected]> wrote: >>> >> >>> >> Thank you Christoph, >>> >> I finally installed it without any errors, but as Sikandar said I am >>> >> getting this segment fault error while using the votca commands. >>> >> I will follow your discussions. >>> >> Thanks again >>> >> >>> >> On Thursday, February 13, 2014 3:47:54 PM UTC-6, Christoph Junghans >>> >> wrote: >>> >>> >>> >>> 2014-02-13 14:34 GMT-07:00 Sikandar Mashayak <[email protected]>: >>> >>> > Hi >>> >>> > >>> >>> > On the same cluster (as Hossein), I was able to successfully >>> >>> > install >>> >>> > votca-tools and csg with the cmake option: >>> >>> > >>> >>> > -DBoost_INCLUDE_DIR=/usr/local/boost/boost-1.51.0/include/ >>> >>> > >>> >>> > Though, the installation is complete. I get the segmentation faults >>> >>> > when I >>> >>> > run any csg application, e.g., csg_stat . >>> >>> > >>> >>> > I am guessing this is related to boost. Am I right? I am not sure >>> >>> > how >>> >>> > to >>> >>> > trace the cause of the segmentation fault. >>> >>> Build with -DCMAKE_BUILD_TYPE=Debug and then run: >>> >>> $ gdb --args csg_stat options... >>> >>> in gdb type "run", it will run until the segault and then type "bt" >>> >>> (backtrace). >>> >>> >>> >>> Cheers, >>> >>> >>> >>> Christoph >>> >>> >>> >>> > >>> >>> > Thanks >>> >>> > Sikandar >>> >>> > >>> >>> > >>> >>> > On Thu, Feb 13, 2014 at 8:27 PM, Denis Andrienko >>> >>> > <[email protected]> >>> >>> > wrote: >>> >>> >> >>> >>> >> You might also need to specify >>> >>> >> >>> >>> >> >>> >>> >> -DBoost_FILESYSTEM_LIBRARY=/usr/local/boost/boost-1.51.0/lib/libboost_filesystem.so >>> >>> >> >>> >>> >> >>> >>> >> As I have already mentioned, boost has several bugs in major >>> >>> >> releases. >>> >>> >> We >>> >>> >> haven't tested 1.51, but I had to downgrade it in the latest >>> >>> >> UBUNTU >>> >>> >> release. >>> >>> >> We know that 1.49 and 1.54 are working. Also make sure that you >>> >>> >> don't >>> >>> >> have >>> >>> >> several versions installed at the same time: >>> >>> >> >>> >>> >> >>> >>> >> dpkg -s libboost-dev | grep 'Version' >>> >>> >> or >>> >>> >> cat /usr/include/boost/version.hpp | grep "BOOST_LIB_VERSION" >>> >>> >> >>> >>> >> -- >>> >>> >> You received this message because you are subscribed to the Google >>> >>> >> Groups >>> >>> >> "votca" group. >>> >>> >> To unsubscribe from this group and stop receiving emails from it, >>> >>> >> send >>> >>> >> an >>> >>> >> email to [email protected]. >>> >>> >> To post to this group, send email to [email protected]. >>> >>> >> Visit this group at http://groups.google.com/group/votca. >>> >>> >> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> > >>> >>> > >>> >>> > -- >>> >>> > You received this message because you are subscribed to the Google >>> >>> > Groups >>> >>> > "votca" group. >>> >>> > To unsubscribe from this group and stop receiving emails from it, >>> >>> > send >>> >>> > an >>> >>> > email to [email protected]. >>> >>> > To post to this group, send email to [email protected]. >>> >>> > Visit this group at http://groups.google.com/group/votca. >>> >>> > For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >>> >>> >>> >>> >>> -- >>> >>> Christoph Junghans >>> >>> Web: http://www.compphys.de >>> >> >>> >> -- >>> >> You received this message because you are subscribed to the Google >>> >> Groups >>> >> "votca" group. >>> >> To unsubscribe from this group and stop receiving emails from it, send >>> >> an >>> >> email to [email protected]. >>> >> To post to this group, send email to [email protected]. >>> >> Visit this group at http://groups.google.com/group/votca. >>> >> For more options, visit https://groups.google.com/groups/opt_out. >>> > >>> > >>> > -- >>> > You received this message because you are subscribed to the Google >>> > Groups >>> > "votca" group. >>> > To unsubscribe from this group and stop receiving emails from it, send >>> > an >>> > email to [email protected]. >>> > To post to this group, send email to [email protected]. >>> > Visit this group at http://groups.google.com/group/votca. >>> > For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >>> -- >>> Christoph Junghans >>> Web: http://www.compphys.de >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "votca" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at http://groups.google.com/group/votca. >>> For more options, visit https://groups.google.com/groups/opt_out. >> >> > > -- > You received this message because you are subscribed to the Google Groups > "votca" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/votca. > For more options, visit https://groups.google.com/groups/opt_out. -- Christoph Junghans Web: http://www.compphys.de -- You received this message because you are subscribed to the Google Groups "votca" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/votca. For more options, visit https://groups.google.com/groups/opt_out.
