The behavior seems to depend on the nature of the command line (login vs non-login maybe?). Running on a shell will work as expected - MPI is not initialized and the code block is executed. However, executing the script in Jupyter notebook with %run magic command will produce the error because MPI will be initialized.
This is an easy fix. I will add a commit to #237 .
The current codes below will error with
comm
not existed at the end of the script in the case that MPI is already initialized. https://github.com/HERA-Team/hera_sim/blob/126ec827a1350855b5b576b06b509f362db19df3/scripts/hera-sim-vis.py#L94-L99The behavior seems to depend on the nature of the command line (login vs non-login maybe?). Running on a shell will work as expected - MPI is not initialized and the code block is executed. However, executing the script in Jupyter notebook with
%run
magic command will produce the error because MPI will be initialized.This is an easy fix. I will add a commit to #237 .