Skip to content

Commit 1e7ad9f

Browse files
committed
Added slurm support in 1D
1 parent 9e3f633 commit 1e7ad9f

14 files changed

+34
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ gcn_distr_2d_gpu_gen.py
2525
gcn_distr_2d_gpu_floor_edit.py
2626
gcn_distr_2d_gpu_floor_old.py
2727
gcn_distr_2d_gpu_floor_gpu_gen.py
28+
*.pt

gcn_distr.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,17 @@ def main():
682682
outputs = None
683683
if "OMPI_COMM_WORLD_RANK" in os.environ.keys():
684684
os.environ["RANK"] = os.environ["OMPI_COMM_WORLD_RANK"]
685+
# Initialize distributed environment with SLURM
686+
if "SLURM_PROCID" in os.environ.keys():
687+
os.environ["RANK"] = os.environ["SLURM_PROCID"]
688+
689+
if "SLURM_NTASKS" in os.environ.keys():
690+
os.environ["WORLD_SIZE"] = os.environ["SLURM_NTASKS"]
691+
692+
if "MASTER_ADDR" not in os.environ.keys():
693+
os.environ["MASTER_ADDR"] = "127.0.0.1"
694+
695+
os.environ["MASTER_PORT"] = "1234"
685696
dist.init_process_group(backend='nccl')
686697
rank = dist.get_rank()
687698
size = dist.get_world_size()
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# ninja log v5
2+
0 18678 1619116367000000000 /global/cscratch1/sd/alokt/CAGNET/sparse-extension/build/temp.linux-x86_64-3.8/sparse_coo_tensor.o 73197118b8a3cab5
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
ninja_required_version = 1.3
2+
cxx = c++
3+
4+
cflags = -pthread -B /usr/common/software/pytorch/1.7.1-gpu/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/common/software/sles15_cgpu/cuda/10.2.89/include -I/usr/common/software/pytorch/1.7.1-gpu/lib/python3.8/site-packages/torch/include -I/usr/common/software/pytorch/1.7.1-gpu/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/usr/common/software/pytorch/1.7.1-gpu/lib/python3.8/site-packages/torch/include/TH -I/usr/common/software/pytorch/1.7.1-gpu/lib/python3.8/site-packages/torch/include/THC -I/usr/common/software/pytorch/1.7.1-gpu/include/python3.8 -c
5+
post_cflags = -lcusparse -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1013"' -DTORCH_EXTENSION_NAME=sparse_coo_tensor_cpp -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++14
6+
ldflags =
7+
8+
rule compile
9+
command = $cxx -MMD -MF $out.d $cflags -c $in -o $out $post_cflags
10+
depfile = $out.d
11+
deps = gcc
12+
13+
14+
15+
build /global/cscratch1/sd/alokt/CAGNET/sparse-extension/build/temp.linux-x86_64-3.8/sparse_coo_tensor.o: compile /global/cscratch1/sd/alokt/CAGNET/sparse-extension/sparse_coo_tensor.cpp
16+
17+
18+
19+
20+
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)