Skip to content
This repository was archived by the owner on Aug 26, 2020. It is now read-only.

Conversation

@mvsusp
Copy link
Contributor

@mvsusp mvsusp commented Dec 14, 2018

Description of changes:

  • Create libchangehostname library necessary to run mpi in SageMaker

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mvsusp mvsusp requested review from laurenyu and nadiaya December 14, 2018 22:32
.flake8 Outdated
[flake8]
application_import_names = sagemaker_containers, test
application_import_names = sagemaker_containers, test, libchangehostname
import-order-style = google
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: newline at the end

Copy link
Contributor

@laurenyu laurenyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about Windows? :)

module = Py_InitModule3(
"libchangehostname", LibchangehostnameMethods, "Returns the value of $SM_CURRENT_HOST");
}
#endif No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: newline at the end of the file


int libchangehostname(char *name, size_t len)
{
const char *val = getenv("SM_CURRENT_HOST");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't really like that it depends on an environment variable that might now be initialized yet.
I understand that right now we call it at 'the right' time, but since it's not really guaranteed by anyone I am worried that it might cause issues in the future.
Also sagemaker-containers is not just a library used by us, we also advertise and help customers to use it in BYOC use case.

Anyway we can switch to use json file or guarantee that it's called only after this environment variable is initialized?

@mvsusp mvsusp merged commit 73293cd into aws:mvs-openmpi Dec 14, 2018
@mvsusp mvsusp deleted the mvs-hostnamelib branch December 14, 2018 23:06
mvsusp added a commit that referenced this pull request Dec 19, 2018
* Generic MPI - Create library to changehostname when mpi starts (#153)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants