OpenMP + TGeoManager

From: OKUMURA, Akira <oxon_at_astro.isas.jaxa.jp>
Date: Wed, 6 Jul 2011 21:00:41 -0700


Hello ROOTers, (probably Andrei)

I found a new method TGeoManager::SetMultiThread recently committed to the SVN trunk. I tried this method with OpenMP in order to improve the speed of my ray-tracing simulation, but a seg fault happens in my code.

My ray-tracing code is based on the ROOT geometry library and it is available at https://sourceforge.net/projects/robast/

The main part of ray tracing is done in a class AOpticsManager which is derived from TGeoManager.

http://robast.svn.sourceforge.net/viewvc/robast/trunk/src/AOpticsManager.cxx?view=markup&pathrev=50

I attache the recent version of the class in my local drive. When I execute AOpticsManager::TraceNonSequential(ARay& ray) in my script, TGeoManager::InitTrack causes a seg fault. The following is a part of the error message.



#6 0x00002ad863513b87 in TGeoNavigator::InitTrack(double const*, double const*) () from /usr/local/root_svn/lib/libGeom.so
#7 0x00002ad863c2bffe in AOpticsManager::TraceNonSequential (this=0x1370b870,

    ray=...) at src/AOpticsManager.cxx:68
#8 0x00002ad863c2cd18 in AOpticsManager::TraceNonSequential (

    .omp_data_i=0x41ef60c0) at src/AOpticsManager.cxx:228
#9 0x00002ad863c2cc63 in AOpticsManager::TraceNonSequential (

    .omp_data_i=0x7fff1e74f910) at src/AOpticsManager.cxx:215
#10 0x00002ad863e92f52 in ?? () from /usr/lib64/libgomp.so.1
#11 0x00002ad85f6d373d in start_thread () from /lib64/libpthread.so.0
#12 0x00002ad85f9bc4bd in clone () from /lib64/libc.so.6


I get the above error with SL 5.5 w/ GCC 4.1.2, and similar message with OS X 10.6.8 w/ GCC 4.2.

I would like to know how I can remove this error and how to write the correct code to make the tracking engine work with OpenMP.

Regards,

--
OKUMURA, Akira oxon@{astro.isas.jaxa.jp,stanford.edu}
Institute of Space and Astronautical Science (ISAS/JAXA)
Now at KIPAC/SLAC/Stanford
Varian Physics #306, 382 Via Pueblo Mall, MC 4060
Stanford, CA 94305-4060
TEL 650-736-0971/FAX 650-724-5065
Skype : okumura.akira

Received on Thu Jul 07 2011 - 06:01:06 CEST

This archive was generated by hypermail 2.2.0 : Thu Jul 07 2011 - 17:50:01 CEST