[mcstas-users] Source Parallelization
Peter Kjær Willendrup
pkwi at fysik.dtu.dk
Tue Apr 11 09:04:40 CEST 2017
Dear Federico,
If I remember correctly, until after the scope of INITIALIZE, mcget_ncount() will return the total number of neutron histories.
So what we typically do in INITIALIZE is to assign some normalisation constants, including 1.0/mcget_ncount(). For an example, look at the ESS_butterfly.comp.
Alternatively, you may also simply
#ifdef USE_MPI
/* We always repeat by the number of nodes in an MPI run */
p /= mpi_node_count;
#endif
- example taken from Virtual_input.comp.
Best and hope this helps,
Peter
Peter Kjær Willendrup
Senior Research Engineer, Special Advisor
DTU Physics
[cid:image001.gif at 01CCCAF1.5E6331F0]
Technical University of Denmark
[cid:image002.gif at 01CCCAF1.5E6331F0]
Department of Physics
Fysikvej
Building 307
DK-2800 Kongens Lyngby
Direct +45 2125 4612
Mobil +45 2125 4612
Fax +45 4593 2399
pkwi at fysik.dtu.dk<mailto:pkwi at fysik.dtu.dk>
On 10 Apr 2017, at 15:54 , Federico M. Bertalot <federicobertalot at cnea.gov.ar<mailto:federicobertalot at cnea.gov.ar>> wrote:
Hello,
i have written my own source component, and in order to normalize the results i defined the weight of each neutron as:
p=1.0/mcget_ncount()
it works fine for one processor, but for more processors mcget_ncount() seems to return the number of neutron histories running on each processor, instead of the total number of neutron histories. Then, the normalization of the results changes with the number of processors. Which is the best solution to this problem?
Thank you very much,
Federico.
_______________________________________________
mcstas-users mailing list
mcstas-users at mcstas.org<mailto:mcstas-users at mcstas.org>
http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20170411/21147639/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 58 bytes
Desc: image001.gif
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20170411/21147639/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 1055 bytes
Desc: image002.gif
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20170411/21147639/attachment-0001.gif>
More information about the mcstas-users
mailing list