5
5
from integrators import MonteCarlo , MarkovChainMonteCarlo
6
6
7
7
8
- def init_process (rank , world_size , fn , backend = "gloo" ):
8
+ def test_init_process (rank , world_size , fn , backend = "gloo" ):
9
9
# Set MASTER_ADDR and MASTER_PORT appropriately
10
10
# Assuming environment variables are set by the cluster's job scheduler
11
11
master_addr = os .getenv ("MASTER_ADDR" , "localhost" )
@@ -18,7 +18,7 @@ def init_process(rank, world_size, fn, backend="gloo"):
18
18
fn (rank , world_size )
19
19
20
20
21
- def run_mcmc (rank , world_size ):
21
+ def test_run_mcmc (rank , world_size ):
22
22
# Instantiate the MarkovChainMonteCarlo class
23
23
bounds = [(- 1 , 1 ), (- 1 , 1 )]
24
24
n_eval = 8000000
@@ -55,4 +55,4 @@ def two_integrands(x, f):
55
55
56
56
if __name__ == "__main__" :
57
57
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