[gate-users] Re: gate-users Digest, Vol 20, Issue 1

Vandana Kohli kohli.vandana at gmail.com
Wed Nov 2 23:57:56 CET 2005


Thanks Patrice. I will be trying it out hopefully nextweek. Also, If we are
writing ECAT7 output along with the root where else would I need to make
changes??
Just one more question, see below

On 11/1/05, patrice descourt <patrice.descourt at univ-brest.fr> wrote:
>
> Dear Vandana
>
> you do not have to bother about installing geant or gate on each node,
> MPI logs on each node via rsh or ssh depending on your parameterization.
>
> Below are outlines along which you can get parallel jobs
>
>
> I will be pleased to give the final codes in a directory when I have
> written those because for now I only focus on the second implementation
> which is far more cumbersome.
>
> The first one should not present any problems :
>
> You just have to install MPI and compile Geant and Gate with mpicc which
> replaces gcc
>
> and run Gate via mpirun :
>
> mpirun -np #number of nodes your_compiled_code.exe
>
> you have to include
>
> #include "mpi.h" in each file using MPI library e.g Gate.cc and
> G4RunManager.hh >>>Are these the only two files where we have to include "
> mpi.h" ???
>
>
>
>
> In Gate.cc you need at the beginning of main()
>
> to add
>
> MPI::Init(argc,argv); : this is to initialize MPI
>
> at the end of Gate.cc main()
>
> you put
>
> MPI::Finalize();
>
>
> in G4RunManager::DoEventLoop()
>
> you put
>
> G4int proc_number = MPI::COMM_WORLD.Get_size();
> G4int proc_ID = MPI::COMM_WORLD.Get_rank();
>
> before the for loop
>
> which you replace with
>
> for(i_event = proc_ID; i_event<n_event; i_event += proc_number)
>
> now for the output, I review the ROOT one but the scheme is the same
> for any GateVOutputModule :
>
> in GateToRoot.hh you put #include "mpi.h"
>
> and put at the beginning of GateToRoot:RecordBeginOfAcquisition
>
> G4int proc_ID = MPI::COMM_WORLD.Get_rank();
>
> and replace each GetFilePath() by GetFilePath()+"proc_"+proc_ID
>
> I will give all the codes when this is all implemented
>
> Cheers
> P.Descourt
> _______________________________________________
> gate-users mailing list
> gate-users at lphe1pet1.epfl.ch
> http://lphe1pet1.epfl.ch/mailman/listinfo/gate-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20051102/8aa06270/attachment.htm>


More information about the Gate-users mailing list