Re: OpenMP + TGeoManager

From: Andrei Gheata <Andrei.Gheata_at_cern.ch>
Date: Thu, 7 Jul 2011 15:14:33 +0200


Hi Akira,

You were too fast in trying that... This is just the first step for being able to do parallel navigation, but as you have noticed not all TGeo classes are yet thread safe. Working on that...

I will let you know when this is done. The time scale is ~2 months I suppose.

Cheers, Andrei

On 07/07/2011 06:00 AM, OKUMURA, Akira wrote:
> 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 - 15:14:41 CEST

This archive was generated by hypermail 2.2.0 : Fri Jul 08 2011 - 17:50:01 CEST