[lammps-users] Error while running lammps

Dear all,
I have installed lammps 29-oct 2020 version on ubuntu 20.04. But when I try to run it without an internet connection using :
mpirun -np 2 /path / to / lmp_mpi -in in.script

i get the following error :

Invalid error code (-2) (error ring index 127 invalid)
Invalid error code (-2) (error ring index 127 invalid)
INTERNAL ERROR: invalid error code fffffffe (Ring Index out of range) in MPID_nem_tcp_init:373
Fatal error in PMPI_Init: Other MPI error, error stack:
MPID_Init(224)…: channel initialization failed
MPID_nem_tcp_init(373)…: gethostbyname failed, hirakjyoti-HP-dx2480-MT-KL969AV (errno 0)

But if the PC is connected to internet LAMMPS successfully run.

How do I solve the problem ?


This sounds like an issue with your ubuntu setup or the MPI library configuration. With the exception of a few styles that explicitly use TCP/IP communication LAMMPS doesn’t care how anything includeing the MPI library communicates, it just uses the MPI calls, thus whether you are connected to the internet or not should not make a difference.


How do I proceed to solve this problem? Can it be a hostname resolution issue ? I tried by changing the hostname, but the problem persists.

as I already tried to point out: this is not a LAMMPS issue and thus off-topic for this list. it seems to be related to either your machine setup (most likely) or your MPI installation, or a combination of both.
you are probably not the only person with this issue, so doing a web search should help, or you should ask in more appropriate forums.