expert mode segmentation error

Asked by nabanita ganguly

Hi Ma5 Team,
       I am a new user of MadAnalysis. I am trying to implement an analysis in the expert mode and have encountered a problem.
The process that I am studying is p p>z z +2jet(all inclusive). For that , I generated the events using Madgraph. I am interested in the reconstruction level analysis. So I imported the lhco.gz file to Madanalysis in the -R mode and it worked fine.
I then tried to write some code on my own (related to invariant mass) in addition to the codes generated in normal mode (i.e. codes in user.cpp) and tried to run it in the expert mode.My sample is still lhco.gz.
The .cpp file compiled without any problem.But after launching my sample via ./MadAnalysis5job, I got the following::

 * SampleAnalyzer for MadAnalysis 5 - Welcome.
    * Initializing all components
      - version: 1.2 (2015/07/24)
      - general: everything is default.
      - extracting the list of event samples...
      - analyzer 'myanalysis'
    * Running over files ...
    * 1/1 zz2jh_delphes_events.lhco.gz
        => file size: 452.69 ko
        => sample format: LHCO file produced by an unknown generator (cross section assumed in pb).
        => progress: [===================================]
        => total number of events: 6933 ( analyzed: 6933 ; skipped: 0 )
    * Finalizing all components ...
    * Total number of processed events: 6933.

 *** Break *** segmentation violation

===========================================================
There was a crash (#7 0xb715eeab in SigHandler(ESignals) () from /home/rimpi/root/lib/libCore.so).
This is the entire stack trace of all threads:
===========================================================
#0 0xb777b424 in __kernel_vsyscall ()
#1 0xb6c708f3 in waitpid () from /lib/i386-linux-gnu/libc.so.6
#2 0xb6bf7c23 in ?? () from /lib/i386-linux-gnu/libc.so.6
#3 0xb6d70e2b in system () from /lib/i386-linux-gnu/libpthread.so.0
#4 0xb715782b in TUnixSystem::Exec(char const*) () from /home/rimpi/root/lib/libCore.so
#5 0xb715c210 in TUnixSystem::StackTrace() () from /home/rimpi/root/lib/libCore.so
#6 0xb715ed97 in TUnixSystem::DispatchSignals(ESignals) () from /home/rimpi/root/lib/libCore.so
#7 0xb715eeab in SigHandler(ESignals) () from /home/rimpi/root/lib/libCore.so
#8 0xb71558d2 in sighandler(int) () from /home/rimpi/root/lib/libCore.so
#9 <signal handler called>
#10 0xb6e4c0d2 in std::ostream::sentry::sentry(std::ostream&) () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#11 0xb6e4c876 in std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int) () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#12 0x08053e96 in MA5::myanalysis::Finalize(MA5::SampleFormat const&, std::vector<MA5::SampleFormat, std::allocator<MA5::SampleFormat> > const&) ()
#13 0xb77175db in MA5::SampleAnalyzer::Finalize(std::vector<MA5::SampleFormat, std::allocator<MA5::SampleFormat> >&, MA5::EventFormat&) () from /home/rimpi/Documents/madanalysis5/tools/SampleAnalyzer/Lib/libprocess_for_ma5.so
#14 0x0804f4de in main ()
===========================================================

The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#10 0xb6e4c0d2 in std::ostream::sentry::sentry(std::ostream&) () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#11 0xb6e4c876 in std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int) () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#12 0x08053e96 in MA5::myanalysis::Finalize(MA5::SampleFormat const&, std::vector<MA5::SampleFormat, std::allocator<MA5::SampleFormat> > const&) ()
#13 0xb77175db in MA5::SampleAnalyzer::Finalize(std::vector<MA5::SampleFormat, std::allocator<MA5::SampleFormat> >&, MA5::EventFormat&) () from /home/rimpi/Documents/madanalysis5/tools/SampleAnalyzer/Lib/libprocess_for_ma5.so
#14 0x0804f4de in main ()
===========================================================

Segmentation fault (core dumped)
#################################################################################################################################################
To see what is happening I tried to print some variable (e.g. invariant mass) and well, it printed without any complication.
I am not understanding the issue at all.Please help.

Regards,
Nabanita.

Question information

Language:
English Edit question
Status:
Solved
For:
MadAnalysis 5 Edit question
Assignee:
No assignee Edit question
Solved by:
Benjamin Fuks
Solved:
Last query:
Last reply:
Revision history for this message
Benjamin Fuks (fuks) said :
#1

Dear Nabanita,

I would need material to reproduce the issue (your c++ code and the events).

Cheers,

Benjamin

On 20 Aug 2015, at 10:32 , nabanita ganguly <email address hidden> wrote:

> New question #270577 on MadAnalysis 5:
> https://answers.launchpad.net/madanalysis5/+question/270577
>
> Hi Ma5 Team,
> I am a new user of MadAnalysis. I am trying to implement an analysis in the expert mode and have encountered a problem.
> The process that I am studying is p p>z z +2jet(all inclusive). For that , I generated the events using Madgraph. I am interested in the reconstruction level analysis. So I imported the lhco.gz file to Madanalysis in the -R mode and it worked fine.
> I then tried to write some code on my own (related to invariant mass) in addition to the codes generated in normal mode (i.e. codes in user.cpp) and tried to run it in the expert mode.My sample is still lhco.gz.
> The .cpp file compiled without any problem.But after launching my sample via ./MadAnalysis5job, I got the following::
>
>
> * SampleAnalyzer for MadAnalysis 5 - Welcome.
> * Initializing all components
> - version: 1.2 (2015/07/24)
> - general: everything is default.
> - extracting the list of event samples...
> - analyzer 'myanalysis'
> * Running over files ...
> * 1/1 zz2jh_delphes_events.lhco.gz
> => file size: 452.69 ko
> => sample format: LHCO file produced by an unknown generator (cross section assumed in pb).
> => progress: [===================================]
> => total number of events: 6933 ( analyzed: 6933 ; skipped: 0 )
> * Finalizing all components ...
> * Total number of processed events: 6933.
>
> *** Break *** segmentation violation
>
>
>
> ===========================================================
> There was a crash (#7 0xb715eeab in SigHandler(ESignals) () from /home/rimpi/root/lib/libCore.so).
> This is the entire stack trace of all threads:
> ===========================================================
> #0 0xb777b424 in __kernel_vsyscall ()
> #1 0xb6c708f3 in waitpid () from /lib/i386-linux-gnu/libc.so.6
> #2 0xb6bf7c23 in ?? () from /lib/i386-linux-gnu/libc.so.6
> #3 0xb6d70e2b in system () from /lib/i386-linux-gnu/libpthread.so.0
> #4 0xb715782b in TUnixSystem::Exec(char const*) () from /home/rimpi/root/lib/libCore.so
> #5 0xb715c210 in TUnixSystem::StackTrace() () from /home/rimpi/root/lib/libCore.so
> #6 0xb715ed97 in TUnixSystem::DispatchSignals(ESignals) () from /home/rimpi/root/lib/libCore.so
> #7 0xb715eeab in SigHandler(ESignals) () from /home/rimpi/root/lib/libCore.so
> #8 0xb71558d2 in sighandler(int) () from /home/rimpi/root/lib/libCore.so
> #9 <signal handler called>
> #10 0xb6e4c0d2 in std::ostream::sentry::sentry(std::ostream&) () from /usr/lib/i386-linux-gnu/libstdc++.so.6
> #11 0xb6e4c876 in std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int) () from /usr/lib/i386-linux-gnu/libstdc++.so.6
> #12 0x08053e96 in MA5::myanalysis::Finalize(MA5::SampleFormat const&, std::vector<MA5::SampleFormat, std::allocator<MA5::SampleFormat> > const&) ()
> #13 0xb77175db in MA5::SampleAnalyzer::Finalize(std::vector<MA5::SampleFormat, std::allocator<MA5::SampleFormat> >&, MA5::EventFormat&) () from /home/rimpi/Documents/madanalysis5/tools/SampleAnalyzer/Lib/libprocess_for_ma5.so
> #14 0x0804f4de in main ()
> ===========================================================
>
>
> The lines below might hint at the cause of the crash.
> If they do not help you then please submit a bug report at
> http://root.cern.ch/bugs. Please post the ENTIRE stack trace
> from above as an attachment in addition to anything else
> that might help us fixing this issue.
> ===========================================================
> #10 0xb6e4c0d2 in std::ostream::sentry::sentry(std::ostream&) () from /usr/lib/i386-linux-gnu/libstdc++.so.6
> #11 0xb6e4c876 in std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int) () from /usr/lib/i386-linux-gnu/libstdc++.so.6
> #12 0x08053e96 in MA5::myanalysis::Finalize(MA5::SampleFormat const&, std::vector<MA5::SampleFormat, std::allocator<MA5::SampleFormat> > const&) ()
> #13 0xb77175db in MA5::SampleAnalyzer::Finalize(std::vector<MA5::SampleFormat, std::allocator<MA5::SampleFormat> >&, MA5::EventFormat&) () from /home/rimpi/Documents/madanalysis5/tools/SampleAnalyzer/Lib/libprocess_for_ma5.so
> #14 0x0804f4de in main ()
> ===========================================================
>
>
> Segmentation fault (core dumped)
> #################################################################################################################################################
> To see what is happening I tried to print some variable (e.g. invariant mass) and well, it printed without any complication.
> I am not understanding the issue at all.Please help.
>
> Regards,
> Nabanita.
>
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

Revision history for this message
nabanita ganguly (nabanita-rimpi) said :
#2

Hi Benjamin,
  Yes sure.Can I get your mail id so that I can email you the details?

Regards,
Nabanita

Revision history for this message
Benjamin Fuks (fuks) said :
#3

Hi,

The event file may be too large. Please share it on some dropbox or gdrive.

Cheers,

Benjamin

On 20 Aug 2015, at 17:11 , nabanita ganguly <email address hidden> wrote:

> Question #270577 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/270577
>
> nabanita ganguly posted a new comment:
> Hi Benjamin,
> Yes sure.Can I get your mail id so that I can email you the details?
>
> Regards,
> Nabanita
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

Revision history for this message
nabanita ganguly (nabanita-rimpi) said :
#4
Revision history for this message
Benjamin Fuks (fuks) said :
#5

Hi Nabanita,

The way you treat the output of your analysis corresponds to the old expert mode way and not the new one. For the latter, see 1405.3982. You can learn how histogram and cutflows are now treated. In the case you still want to use the old way, you must edit Build/Main/main.cpp and replace (see line 30)
     if (!manager.Initialize(argc,argv,"pdg.ma5",true)) return 1;
by
   if (!manager.Initialize(argc,argv,"pdg.ma5")) return 1;

Cheers,

Benjamin

On 21 Aug 2015, at 09:57 , nabanita ganguly <email address hidden> wrote:

> Question #270577 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/270577
>
> nabanita ganguly posted a new comment:
> Hi Benjamin,
> Thank you for your reply. This is the gdrive link for the respective files:
>
> https://drive.google.com/file/d/0B3TJ06--_4BballJY3ZQVUs3Sk0/view?usp=sharing
> https://drive.google.com/file/d/0B3TJ06--_4BbelBBaHhnWEk0b1U/view?usp=sharing
> https://drive.google.com/file/d/0B3TJ06--_4BbcEdiZkREOGs2TTA/view?usp=sharing
> https://drive.google.com/file/d/0B3TJ06--_4BbZVUyRFhackxrNG8/view?usp=sharing
>
>
> Regards,
> Nabanita
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

Revision history for this message
nabanita ganguly (nabanita-rimpi) said :
#6

Hi Benjamin,

Thank you so much for pointing this out. It is now working.

I have one more question. I am handling the lhco file in the expert mode. If I know correctly then the lhco format does not have the information about the cross-section of the associated process. In that case, I won't be able to get any plots.

So, can the cross-section be added by hand in user.cpp?

Revision history for this message
Best Benjamin Fuks (fuks) said :
#7

Hi Nabanita,

> So, can the cross-section be added by hand in user.cpp?
Sure, at the time the output root files are created.

Cheers,

Benjamin

Revision history for this message
nabanita ganguly (nabanita-rimpi) said :
#8

Hi Benjamin,

Thanks again. It is clear now.

Regards,
Nabanita

Revision history for this message
nabanita ganguly (nabanita-rimpi) said :
#9

Thanks Benjamin Fuks, that solved my question.