Skip to content

Commit b0fd838

Browse files
authored
Update mc_multicpu_test.py
1 parent 177e723 commit b0fd838

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

MCintegration/mc_multicpu_test.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@
22
import torch.distributed as dist
33
import torch.multiprocessing as mp
44
import os
5+
import pytest
56
from integrators import MonteCarlo, MarkovChainMonteCarlo
67

8+
@pytest.fixture
9+
def rank():
10+
return 0
11+
12+
@pytest.fixture
13+
def world_size():
14+
return 8
715

816
def test_init_process(rank, world_size, fn, backend="gloo"):
917
# Set MASTER_ADDR and MASTER_PORT appropriately

0 commit comments

Comments
 (0)