Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions mcstas-comps/misc/KDSource.comp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ INITIALIZE

snprintf (filenamefoo, sizeof filenamefoo, "test%i.txt", (int)iproc);

mcset_ncount (ncount* nprocs);
if (!mcdotrace){
mcset_ncount (ncount* nprocs);
}

if (nskip && !mcpl_seek (kdsource->plist->file, nskip)) {
fprintf (stderr, "ERROR(%s): Could not seek ahead in MCPL file.\n", NAME_CURRENT_COMP);
exit (-1);
Expand All @@ -137,7 +140,7 @@ TRACE
double nrm;
mcpl_particle_t part;
KDS_rand_sample2 (_rand01_opague, (void*)_particle->randstate, kdsource, &part, 1, -1.0, NULL, 1);

#ifdef USE_MPI
const uint64_t iproc = (uint64_t)mpi_node_rank;
#else
Expand Down
6 changes: 4 additions & 2 deletions mcstas-comps/misc/MCPL_input.comp
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,10 @@ INITIALIZE
printf ("Message(%s): MCPL file (%s) produced with %s.\n", NAME_CURRENT_COMP, resolved_filename, mcpl_hdr_srcname (inputfile));
printf ("Message(%s): MCPL file (%s) contains %lu particles.\n", NAME_CURRENT_COMP, resolved_filename, (long unsigned)nparticles);
}
mcset_ncount (nparticles);

if (!mcdotrace) {
mcset_ncount (nparticles);
}

if (repeat_count > 1 && v_smear == 0 && pos_smear == 0 && dir_smear == 0) {
fprintf (
stdout,
Expand Down
6 changes: 5 additions & 1 deletion mcstas-comps/misc/MCPL_input_once.comp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,11 @@ INITIALIZE
// tell all nodes the value, so they can set ncount for themselves
MPI_Bcast (&total_index, 1, MPI_UINT64_T, 0, MPI_COMM_WORLD);
#endif
mcset_ncount (total_index); // will be divided by mpi_node_count before starting the raytrace

if (!mcdotrace) {
mcset_ncount (total_index); // will be divided by mpi_node_count before starting the raytrace
}

%}

TRACE
Expand Down
Loading