[Gate-users] Quick Fix for addProcess bug on MacOSX (and Linux)

Jérôme Suhard jerome at suhard.fr
Mon Mar 8 15:44:27 CET 2010


Hi All,
We are trying here to get last Gate version working properly. As everybody
around, we are experiencing some troubles with physics processes.

Here is what we have found so far :
Processes are bounded in a vector theListOfProcesses (GateVProcess).
At the initialization stage, the size of this vector increases (to contain
all the available processes) and for an unknown (to us) reason, the number
of items in this vector falls back to zero. And moreover, this vector still
continues to increase to contain the remaining processes.
Under Macosx, those remaining processes are eMultipleScattering and
hMultipleScattering. Unexpectedly, under Linux, those processes are not
available anymore, but all the other processes are present (the 44's).
Why this vector content is erased at some point ?

We also remarked that the creation of the vector ListOfProcesses is done in
a reverse order between MacOS and Linux.
That is to say that hMultipleScattering is the first item of ListOfProcesses
 in Linux and the last in MacOSX. So, with Mac platform, just 2 processes
are available and 44 processes for Linux platform, probably due to the
erasure of the vector theListOfProcesses.

As the benchmarks don't use eMultipleScattering  and hMultipleScatterring,
Linux users aren't affected with this strange behavior.... but that should
be problem for those who are interested in these particular processes.

So, here is the temporary "fix" for MacOSX :

Go to the root directory of Gate's source
>
Clean temporary directory :
>
rm tmp/Darwin-g++/Gate/Gate*PB*

Go to the "physics" source directory :

> cd source/physics/src/
>

Apply a prefix for files ending by "PB.cc" (they contain processes) :

> for f in *PB.cc ; do mv ${f} macos_${f} ; done
>

Back to the root directory of Gate's source :

> cd ../../..
>

Just compile like normal Gate :

> make
>

Enjoy ! (46 physics processes are now available)

[Acquisition-0] Slice 15 from 562.5 to 600 s [slice=37.5 s], final stop at
600 s.
[G4]  clearing up the projection data matrices ... done
[Core-0] End of macro benchmarks/benchSPECT/benchSPECT.mac

real    50m21.213s

P-S: for remove "macos_" prefix and return to Gate 6 normal version :

> cd source/physics/src/
>
for f in macos_*PB.cc ; do mv ${f} ${f#macos_} ; done
>

For Linux, just rename GatehMultipleScatteringPB.cc to
GateHMultipleScatteringPB.cc and GateeMultipleScatteringPB.cc to
GateEMultipleScatteringPB.cc in the physics source directory and compile it.


Best regards,
Jérôme Suhard

INSERM, Unite 892, France


More information about the Gate-users mailing list