Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
9a72b78b
Unverified
Commit
9a72b78b
authored
Oct 31, 2022
by
kylasa
Committed by
GitHub
Oct 31, 2022
Browse files
Updated the key to retrieve correct rank of a process (#4756)
Merging this PR to the master branch
parent
ed66a209
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
tools/distpartitioning/parmetis_preprocess.py
tools/distpartitioning/parmetis_preprocess.py
+6
-5
No files found.
tools/distpartitioning/parmetis_preprocess.py
View file @
9a72b78b
...
@@ -26,17 +26,18 @@ def get_proc_info():
...
@@ -26,17 +26,18 @@ def get_proc_info():
MPI_WORLDSIZE appropriately as described above to retrieve total no. of
MPI_WORLDSIZE appropriately as described above to retrieve total no. of
processes, when needed.
processes, when needed.
MPI_LOCALRANKID is only valid on a single-node cluster. In a multi-node cluster
the correct key to use is PMI_RANK. In a multi-node cluster, MPI_LOCALRANKID
returns local rank of the process in the context of a particular node in which
it is unique.
Returns:
Returns:
--------
--------
integer :
integer :
Rank of the current process.
Rank of the current process.
"""
"""
env_variables
=
dict
(
os
.
environ
)
env_variables
=
dict
(
os
.
environ
)
if
"OMPI_COMM_WORLD_RANK"
in
env_variables
:
return
int
(
os
.
environ
.
get
(
"PMI_RANK"
)
or
0
)
local_rank
=
int
(
os
.
environ
.
get
(
"OMPI_COMM_WORLD_RANK"
)
or
0
)
elif
"MPI_LOCALRANKID"
in
env_variables
:
local_rank
=
int
(
os
.
environ
.
get
(
"MPI_LOCALRANKID"
)
or
0
)
return
local_rank
def
gen_edge_files
(
schema_map
,
output
):
def
gen_edge_files
(
schema_map
,
output
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment