Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

determine hostid using ascii chars #356

Closed
wants to merge 1 commit into from

Conversation

edoapra
Copy link
Contributor

@edoapra edoapra commented Oct 28, 2024

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
Copy link
Member

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
Copy link
Contributor Author

edoapra commented Oct 29, 2024

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
Copy link
Member

@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
Copy link
Contributor Author

edoapra commented Oct 31, 2024

@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
Copy link
Member

bjpalmer commented Nov 7, 2024

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

@edoapra
Copy link
Contributor Author

edoapra commented Nov 7, 2024

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

Yes, I would merge your hostname based branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants