Skip to content

Commit 177e723

Browse files
authored
prefix def with test
1 parent 02792ff commit 177e723

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

MCintegration/mc_multicpu_test.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from integrators import MonteCarlo, MarkovChainMonteCarlo
66

77

8-
def init_process(rank, world_size, fn, backend="gloo"):
8+
def test_init_process(rank, world_size, fn, backend="gloo"):
99
# Set MASTER_ADDR and MASTER_PORT appropriately
1010
# Assuming environment variables are set by the cluster's job scheduler
1111
master_addr = os.getenv("MASTER_ADDR", "localhost")
@@ -18,7 +18,7 @@ def init_process(rank, world_size, fn, backend="gloo"):
1818
fn(rank, world_size)
1919

2020

21-
def run_mcmc(rank, world_size):
21+
def test_run_mcmc(rank, world_size):
2222
# Instantiate the MarkovChainMonteCarlo class
2323
bounds = [(-1, 1), (-1, 1)]
2424
n_eval = 8000000
@@ -55,4 +55,4 @@ def two_integrands(x, f):
5555

5656
if __name__ == "__main__":
5757
world_size = 8 # Number of processes to launch
58-
mp.spawn(init_process, args=(world_size, run_mcmc), nprocs=world_size, join=True)
58+
mp.spawn(test_init_process, args=(world_size, test_run_mcmc), nprocs=world_size, join=True)

0 commit comments

Comments
 (0)