Executing a LAMMPS input script in MacOS Monterey results in the following notification:
This behavior is observed only when running the version I built from source. Running the version installed with Homebrew gives no such message. It does not cause any problem with code execution, but it is very distracting. It persists even after adding lmp to the firewall whitelist. Even then, I don’t see why LAMMPS should have any kind of internet connection during a simulation. Do you have any idea why this happens?
Check the configuration summary. Did you compile LAMMPS with MPI support?
If yes, which MPI library/package did you install?
Same for the homebrew compiled executable.
Yes, LAMMPS has been compiled with MPI support. Below I list the configuration summary regarding MPI for both versions.
Installed from source code:
MPI library level: MPI v3.1
MPI version: Open MPI v4.1.4, package: Open MPI [email protected] Distribution, ident: 4.1.4, repo rev: v4.1.4, May 26, 2022
MPI library level: MPI v1.0
MPI version: LAMMPS MPI STUBS for LAMMPS version 23 Jun 2022
I can see that they are different MPI versions, but I do not understand why the first version requires incoming internet connections.
The second is a “dummy MPI” that is used when LAMMPS is compiled without MPI support as a serial executable.
The OpenMPI MPI library uses multiple possible communication layers to communicate between the different MPI processes, this includes TCP/IP, which is why your firewall protection code notices that the LAMMPS executable tries to open a TCP/IP connection to receive incoming messages. The OpenMPI library part does not know, that you only want to run locally. By default it assumes that you are running on a cluster. Now you have three options:
- disable the firewall (may only be done in special cases where your machine is otherwise protected from access when connected to the internet)
- configure the firewall to permanently either reject or allow access to the internet for LAMMPS
- configure OpenMPI to not try to create TCP/IP connections
Point 3. can be tested by adding
--mca btl self,vader after
mpirun which will remove the “tcpip” option that is included by default in this OpenMPI setting.
If you want to make this setting permanent, you can look for a file named openmpi-mca-params.conf and add the line:
mca_btl = self, vader
Thank you very much, I think that completely covers my question