GlobalArrays / ga

Partitioned Global Address Space (PGAS) library for distributed arrays
http://hpc.pnl.gov/globalarrays/
Other
101 stars 38 forks source link

determine hostid using ascii chars #356

Closed edoapra closed 2 weeks ago

edoapra commented 3 weeks ago

This commit avoids using the non standard hostid() call and the Cray specific PMI_gethostid. It simply uses ascii characters from hostname to generate a long integer. I have tested it using NWChem and ExaChem on Cray systems.

bjpalmer commented 3 weeks ago

Since the names can be up to 255 characters and there doesn't seem to be any formal standard on what format they take and where the unique identifying characters are located, maybe it would be better if we ditched an integer host ID altogether and just stored the names as the host identifier. This would require replacing all the long int hostid comparisons with strcmps. This should be straightforward, although tedious.

edoapra commented 3 weeks ago

Since the names can be up to 255 characters and there doesn't seem to be any formal standard on what format they take and where the unique identifying characters are located, maybe it would be better if we ditched an integer host ID altogether and just stored the names as the host identifier. This would require replacing all the long int hostid comparisons with strcmps. This should be straightforward, although tedious.

I agree. This code can only handle up to 12 characters.

bjpalmer commented 3 weeks ago

@edoapra, I just created a new branch, feature/unique_names, that uses host names instead of host IDs. See if that works for you.

edoapra commented 3 weeks ago

@edoapra, I just created a new branch, feature/unique_names, that uses host names instead of host IDs. See if that works for you.

First test on frontier looks good

bjpalmer commented 2 weeks ago

What is the consensus on this? Should we call it good and merge it into develop?

edoapra commented 2 weeks ago

What is the consensus on this? Should we call it good and merge it into develop?

Yes, I would merge your hostname based branch