Ticket #2173 (closed: fixed)
EQSANS: merge EQSANSTofOffset and EQSANSTofStructure
Reported by: | Mathieu Doucet | Owned by: | Mathieu Doucet |
---|---|---|---|
Priority: | minor | Milestone: | Iteration 27 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Janik Zikovsky |
Description
It appears as though those two will always be called one after the other in both frame skipping and non frame skipping modes. So it makes more sense to merge them.
Change History
comment:1 Changed 10 years ago by Nick Draper
- Status changed from new to assigned
- Owner set to Mathieu Doucet
comment:2 Changed 10 years ago by Mathieu Doucet
- Status changed from assigned to verify
- Resolution set to fixed
comment:3 Changed 10 years ago by Mathieu Doucet
- Status changed from verify to reopened
- Resolution fixed deleted
comment:4 Changed 10 years ago by Mathieu Doucet
- Status changed from reopened to verify
- Resolution set to fixed
comment:5 Changed 10 years ago by Janik Zikovsky
- Status changed from verify to verifying
- Tester set to Janik Zikovsky
comment:6 Changed 10 years ago by Janik Zikovsky
- Status changed from verifying to reopened
- Resolution fixed deleted
The following code segfaults reliably for me. Can you check if you get a segfault as well? One possible cause is that I am running with some modified LoadEventNexus code, so if you can't reproduce I will try rolling back to see if it is the cause:
Load(Filename="/home/8oz/Code/Mantid/Test/Data/EQSANS_1466_event.nxs",OutputWorkspace="EQSANS_1466_event",LoaderName="LoadEventNexus") SumSpectra(InputWorkspace="EQSANS_1466_event",OutputWorkspace="eq_orig_summed",IncludeMonitors="0") Rebin(InputWorkspace="eq_orig_summed",OutputWorkspace="eq_orig_summed",Params="0,10,17000") EQSANSTofStructure("EQSANS_1466_event", "EQSANS_1466_event_offset", FrameSkipping=False) SumSpectra(InputWorkspace="EQSANS_1466_event_offset",OutputWorkspace="eq_summed",IncludeMonitors="0") Rebin(InputWorkspace="eq_summed",OutputWorkspace="eq_summed",Params="0,10,17000")
Thread [1] (Suspended: Signal 'SIGSEGV' received. Description: Segmentation fault.) 58 std::_Rb_tree<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::_Select1st<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::_S_right() stl_tree.h:517 0x00007ffff7a3c2aa 57 std::_Rb_tree<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::_Select1st<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::_M_erase() stl_tree.h:970 0x00007ffff7a3aa48 56 std::_Rb_tree<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::_Select1st<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::~_Rb_tree() stl_tree.h:614 0x00007ffff7a39905 55 std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::~map() stl_map.h:87 0x00007ffff7a392ce 54 Poco::Message::~Message() Message.cpp:103 0x00007fffef8bfc14 53 qMetaTypeDeleteHelper<Poco::Message>() qmetatype.h:134 0x00000000009aaf16 52 QMetaType::destroy() 0x00007ffff42d29a2 51 QMetaCallEvent::~QMetaCallEvent() 0x00007ffff42d87d1 50 QCoreApplicationPrivate::sendPostedEvents() 0x00007ffff42cac31 49 <symbol is not available> 0x00007ffff42f4653 48 g_main_context_dispatch() 0x00007fffecb28342 47 <symbol is not available> 0x00007fffecb2c2a8 46 g_main_context_iteration() 0x00007fffecb2c45c 45 QEventDispatcherGlib::processEvents() 0x00007ffff42f4193 44 <symbol is not available> 0x00007ffff501ba4e 43 QCoreApplication::processEvents() 0x00007ffff42cb02f 42 MantidUI::runAlgorithmAsync_PyCallback() MantidUI.cpp:1699 0x00000000009cee47 41 meth_MantidUI_runAlgorithmAsync_PyCallback() sipqtipart0.cpp:1745 0x0000000000a500ad 40 call_function() ceval.c:3750 0x00007ffff3486b70 39 PyEval_EvalFrameEx() ceval.c:2412 0x00007ffff3486b70 38 PyEval_EvalCodeEx() ceval.c:3000 0x00007ffff34888b0 37 fast_function() ceval.c:3846 0x00007ffff3486beb 36 call_function() ceval.c:3771 0x00007ffff3486beb 35 PyEval_EvalFrameEx() ceval.c:2412 0x00007ffff3486beb 34 PyEval_EvalCodeEx() ceval.c:3000 0x00007ffff34888b0 33 PyEval_EvalCode() ceval.c:541 0x00007ffff3488982 32 PythonScript::executeScript() PythonScript.cpp:381 0x00000000008884af 31 PythonScript::exec() PythonScript.cpp:338 0x0000000000888317 30 ScriptManagerWidget::runScriptCode() ScriptManagerWidget.cpp:556 0x00000000008b59d0 29 ScriptManagerWidget::executeAll() ScriptManagerWidget.cpp:478 0x00000000008b54eb 28 ScriptManagerWidget::execute() ScriptManagerWidget.cpp:455 0x00000000008b53e3 27 ScriptManagerWidget::qt_metacall() moc_ScriptManagerWidget.cxx:161 0x0000000000acaffa 26 QMetaObject::activate() 0x00007ffff42dfb27 25 QAction::activated() 0x00007ffff4f617b1 24 QAction::activate() 0x00007ffff4f62f71 23 QAction::event() 0x00007ffff4f65257 22 QApplicationPrivate::notify_helper() 0x00007ffff4f68fdc 21 QApplication::notify() 0x00007ffff4f6eaed 20 MantidApplication::notify() MantidApplication.cpp:25 0x000000000099654f 19 QCoreApplication::notifyInternal() 0x00007ffff42c7cdc 18 <symbol is not available> 0x00007ffff4fa47d6 17 <symbol is not available> 0x00007ffff4fa65e7 16 QApplication::notify() 0x00007ffff4f706e4 15 MantidApplication::notify() MantidApplication.cpp:25 0x000000000099654f 14 QCoreApplication::notifyInternal() 0x00007ffff42c7cdc 13 <symbol is not available> 0x00007ffff50164ba 12 <symbol is not available> 0x00007ffff5018ac0 11 QApplication::x11ProcessEvent() 0x00007ffff4fefcb4 10 <symbol is not available> 0x00007ffff501c0e2 9 g_main_context_dispatch() 0x00007fffecb28342 8 <symbol is not available> 0x00007fffecb2c2a8 7 g_main_context_iteration() 0x00007fffecb2c45c 6 QEventDispatcherGlib::processEvents() 0x00007ffff42f4193 5 <symbol is not available> 0x00007ffff501ba4e 4 QEventLoop::processEvents() 0x00007ffff42c6a02 3 QEventLoop::exec() 0x00007ffff42c6dec 2 QCoreApplication::exec() 0x00007ffff42caebb 1 main() main.cpp:175 0x00000000007ec1f7
comment:7 Changed 10 years ago by Mathieu Doucet
- Milestone changed from Iteration 27 to Iteration 28
EQSANSTofStructure needs a workspace2D with 20000 bins. We should move this ticket to Iteration 28 and I'll add proper checks.
comment:9 Changed 10 years ago by Mathieu Doucet
- Status changed from reopened to accepted
- Milestone changed from Iteration 28 to Iteration 27
Should now work. You need to do a Rebin to get a Workspace2D beforehand. The algo will complain but won't seg fault if you give it an event workspace.
Load(Filename="/home/mantid/workspace/mantid/Test/Data/EQSANS_1466_event.nxs",OutputWorkspace="EQSANS_1466_event",LoaderName="LoadEventNexus") Rebin(InputWorkspace="EQSANS_1466_event",OutputWorkspace="eq_orig_summed",Params="0,10,20000") EQSANSTofStructure("eq_orig_summed", "EQSANS_1466_event_offset", FrameSkipping=False)
comment:10 Changed 10 years ago by Mathieu Doucet
- Status changed from accepted to verify
- Resolution set to fixed
comment:12 Changed 10 years ago by Janik Zikovsky
- Status changed from verifying to closed
Working; no longer segfaults with an EventWorkspace. The Workspace2D with 20000 bins had to go to ManagedWorkspace, which took 5 minutes to create and then 10 minutes to run the algorithm. You would likely get 100-1000x faster results with an event-aware algorithm (I think you just need to go through the events and change each event's TOF).
comment:13 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 3020