Skip to content

Commit 9433c90

Browse files
committed
fix: set HOST in platform config to empty string for force accurate instance hostname resolution
1 parent ced2030 commit 9433c90

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎ipsframework/services.py‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2983,9 +2983,13 @@ def create_platform_config_file(prefix, working_dir, cores_per_instance, **kwarg
29832983
platform_config = ConfigObj()
29842984
platform_config.filename = str(platform_config_file_path)
29852985

2986-
# Though in a batch submission context this may not have much
2987-
# meaning.
2988-
platform_config['HOST'] = socket.gethostname()
2986+
# Note that in a batch submission context this may not have much
2987+
# meaning. In any case, this is intentionally set to the empty
2988+
# string so that the instance will set to the actual hostname it
2989+
# is running on; if we set it here it will always be set to the
2990+
# head node regardless of the actual node on which the instance
2991+
# runs.
2992+
platform_config['HOST'] = ''
29892993

29902994
# Regardless, faithfully duplicate the MPIRUN setting from the
29912995
# top-level platform config, which is what the user has set. Same

0 commit comments

Comments
 (0)