#2112: move CCTK_MyHost and friends into flesh --------------------------+------------------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: new Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: Carpet PUGH driver --------------------------+-------------------------------------------------
Comment (by rhaas):
Ok, so that way to go seems to be to combine these things (or bite the bullet and send strings hopen that there is no cluster out there that uses "localhost.localdomain" for all of its compute nodes.
So I'd use a combination of
1. a compile time chosen, fixed string 1. the current time from gettimeofday() or time() on rank 0 1. the process ID of rank 0 1. a random number as returned by random() on rank 0 (no use of /dev/random which is not in POSIX and I have seem chroot jails where it was not provided) 1. the name of the parfile (per rank, they should be identical among all ranks on a host) 1. the name of the executable (per rank, they should be identical among all ranks on a host)
to create a hopefully unique name for the shared memory section on each node.
Before I spend any actual time on this, would this actually be something that you would find useful? I would also really like to keep this simple since a GetHostID functionality is useful but not essential.