# Path: modred/parallel.py
# def get_hostname():
# def get_node_ID():
# def get_num_nodes():
# def get_num_MPI_workers():
# def get_rank():
# def get_num_procs():
# def is_distributed():
# def is_rank_zero():
# def barrier():
# def print_from_rank_zero(msg, output_channel='stdout'):
# def call_from_rank_zero(func, *args, **kwargs):
# def bcast(vals):
# def call_and_bcast(func, *args, **kwargs):
# def find_assignments(tasks, task_weights=None):
# def check_for_empty_tasks(task_assignments):


import os
import modred as mr     # modred must be installed.
from modred import parallel
#!/usr/bin/env python



# Run tutorial scripts
for i in mr.range(1, 7):
    if not parallel.is_distributed():
        mr.run_script('tutorial_ex%d.py' % i)

# Path: modred/parallel.py
# def get_hostname():
# def get_node_ID():
# def get_num_nodes():
# def get_num_MPI_workers():
# def get_rank():
# def get_num_procs():
# def is_distributed():
# def is_rank_zero():
# def barrier():
# def print_from_rank_zero(msg, output_channel='stdout'):
# def call_from_rank_zero(func, *args, **kwargs):
# def bcast(vals):
# def call_and_bcast(func, *args, **kwargs):
# def find_assignments(tasks, task_weights=None):
# def check_for_empty_tasks(task_assignments):


# Path: modred/examples/runall.py
import os
import modred as mr     # modred must be installed.
from modred import parallel

#!/usr/bin/env python



# Run tutorial scripts
for i in mr.range(1, 7):
    if not parallel.is_distributed():
        mr.run_script('tutorial_ex%d.py' % i)

    if parallel.is_distributed() and i >= 3: