-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget_local_rank
executable file
·24 lines (23 loc) · 952 Bytes
/
get_local_rank
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
#
# Copyright (C) 2002-2019 the Network-Based Computing Laboratory
# (NBCL), The Ohio State University.
#
# Contact: Dr. D. K. Panda ([email protected])
#
# For detailed copyright and licensing information, please refer to the
# copyright file COPYRIGHT in the top level directory.
#
# Name : get_local_rank
#
# Description : This script is used to set the affinity between an MPI
# process and the GPU on the system.
#
# The processes rank on a node is normally used to do this
# and different MPI launchers expose this information through
# different environment variables. For example, MVAPICH2 uses
# MV2_COMM_WORLD_LOCAL_RANK and OpenMPI uses
# OMPI_COMM_WORLD_LOCAL_RANK. For other MPI libraries, please
# set the LOCAL_RANK variable below to the appropriate one.
export LOCAL_RANK=$MV2_COMM_WORLD_LOCAL_RANK
exec $*