problem of using lammps + ipi

459 views
Skip to first unread message

Bryukhanov Ilya

unread,
May 23, 2020, 4:48:36 PM5/23/20
to ipi-users
Hi!

I have recently installed i-pi in lammps by adding USER-MISC package. Howeveer, when using it with lammps I stucked on the problem

ERROR on proc 0: Error opening UNIX socket: server may not be running or the path to the socket unavailable (../fix_ipi.cpp:121)

I tried both serial lammps compilation or mpi cluster run.

Could you tell me what I'm doing wrong?

Regards
Ilya

Michele Ceriotti

unread,
May 24, 2020, 5:27:20 PM5/24/20
to ipi-users
You need to give some more detail here. Are you trying to run one of the examples in i-pi or is this your own input? 
Can you run i-PI without problems using the test driver that you can compile in driver/ ?

Bryukhanov Ilya

unread,
May 25, 2020, 4:32:06 PM5/25/20
to ipi-users
I run i-PI for some tutorials in tutorials/ folder by calling
"i-pi tutorial.xml" in one terminal and "i-pi-driver -m sg -h localhost -o 15 -p 31415" in another.
They seem to work: "tut.*" files are created.

However, I failed to run tutorials in lammps/ folder. I use Mar20 version of Lammps. 
"lmp_mpi_serial -i in.lmp" command turned to the error message

Michele Ceriotti

unread,
May 25, 2020, 5:39:22 PM5/25/20
to ipi-users
Which tutorial? 
If you go to examples/lammps/h2o-pimd.4
run
 i-pi input.xml 
and then in another  terminal 
lmp_whateve < in.lmp
does it work?

Bryukhanov Ilya

unread,
May 25, 2020, 6:27:13 PM5/25/20
to ipi-users
Thanks a lot. Now it seems working. I ran "graphene" tutorial instead.

Could you tell me if it is possible to run i-pi + lammps on cluster in serial or mpi mode?

Michele Ceriotti

unread,
May 26, 2020, 2:45:09 AM5/26/20
to ipi-users
examples/lammps/graphene should also run if you run i-pi before you start LAMMPS.
should be possible to run i-PI + lammps on a cluster, but I stongly recommend you first give a good read to the manual, because it'll be hard to get it to work if you don't understand the basic mechanism of functioning of the code.

Somayeh Ahmadkhani

unread,
Jan 17, 2026, 1:43:13 PMJan 17
to ipi-users
Dear users,

 I am facing the same Error but using examples and all othere atill couldn't solve it


in log.driver I am facing the following error using lammps as a client

LAMMPS (24 Oct 2018)

OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:87)

  using 1 OpenMP thread(s) per MPI task

Reading data file ...

  orthogonal box = (-2.5 -2.5 -1.5) to (2.5 4.2 67.5417)

  1 by 1 by 1 MPI processor grid

  reading atoms ...

  75 atoms

  scanning bonds ...

  2 = max bonds/atom

  scanning angles ...

  1 = max angles/atom

  reading bonds ...

  50 bonds

  reading angles ...

  25 angles

Finding 1-2 1-3 1-4 neighbors ...

  special bond factors lj:   0          0          0

  special bond factors coul: 0          0          0

  2 = max # of 1-2 neighbors

  1 = max # of 1-3 neighbors

  1 = max # of 1-4 neighbors

  2 = max # of special neighbors

11 atoms in group left

52 atoms in group middle

12 atoms in group right

75 atoms in group all_atoms

11 atoms in group left

12 atoms in group right

52 atoms in group middle

75 atoms in group all_atoms

WARNING: Fix ipi always uses group all (src/USER-MISC/fix_ipi.cpp:190)

PPPM initialization ...

  extracting TIP4P info from pair style

  using 12-bit tables for long-range coulomb (src/kspace.cpp:321)

  G vector (1/distance) = 0.87081

  grid = 12 15 216

  stencil order = 5

  estimated absolute RMS force accuracy = 0.0304782

  estimated relative force accuracy = 9.17843e-05

  using double precision FFTs

  3d grid and FFT values/proc = 130962 38880

ERROR on proc 0: Error opening INET socket: wrong port or server unreachable (src/USER-MISC/fix_ipi.cpp:109)

Last command: run 5000000

application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0

[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1

:

system msg for write_line failure : Bad file descriptor

"log.driver.1" 50L, 1764C 

and I have  attached lammps, i-pi and scrtips

do you have any idea how can I solve it?
input.xml
sumbit.slurm
in.lmp

Michele Ceriotti

unread,
Jan 18, 2026, 2:05:04 AMJan 18
to ipi-users
Since you seem to be running on a cluster, it depends on how it is set up. 
This https://docs.ipi-code.org/distributed.html can maybe help a bit. 
One possible issue I can see is that the i-pi server and the clients are dispatched
to different nodes, so the two cannot find each other. IF they run on the same node,
then it should work, unless the `host` file in the network configuration does not 
define localhost to be an alias which is unlikely but not impossible.
you may want to try using a unix domain socket, that is also faster.
if they're indeed dispatched to different nodes, then it's tricky - best is to
run i-pi on the login node if they allow you, and to specify the IP address

a side note - be careful when you use LLMs in your work, this comment below 
<!-- i-PI MUST be in NVE mode because LAMMPS is handling temperature controls -->
is false - LAMMPS only evaluates forces so you most definitely need to take care about
temperature on the i-pi side.

M

Reply all
Reply to author
Forward
0 new messages