MPI-safe version of open function.
In read mode, the file is opened on all nodes. In write and append mode, the file is opened on the master only, and /dev/null is opened on all other nodes.
MPI-safe print - prints only from master.
Structure optimization
Visualization