dump the processor ID

skyopener's picture
Submitted by skyopener on Mon, 06/30/2014 - 14:42

Hello everyone,

Is it possible to dump the processor ID of a particle locating when the simulation operates in parallel?
Or the original processor ID?
Your hint will be highly appreciated.
Thanks
Kai

richti83's picture

richti83 | Tue, 07/01/2014 - 07:24

in dump_custom.cpp:
1st in parse_fields add:

} else if (strcmp(arg[iarg],"proc") == 0) {
pack_choice[i] = &DumpCustom::pack_proc;
vtype[i] = INT;
}

2nd add:

void DumpCustom::pack_proc(int n)
{
for (int i = 0; i < nchoose; i++) {
buf[n] = comm->me;
n += size_one;
}
}

and finaly in dump_custom.h add

void pack_proc(int);

recompile LIGGGHTS
make clean
make fedora (or whatever makefile you are using)
or of you have installed the cfdemcouplingtoolbox type cfdemCompLIG

In your inputscript add proc keyword to your dump custom line.

Maybe Christoph can add this user-contribution to the next LIGGGHTS Release (take 30min from our IBAF support-contingent).

Best,
Christian.

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

skyopener's picture

skyopener | Fri, 07/04/2014 - 12:55

Hi Christian,
Extremely appreciate your detailed response. Thanks!
It seems that this quantity has been dumped in my previous simulation. However, the input script is missing.
The problem has been solved with your suggestion.
Thanks again!

Best wishes.
Kai