Sending extras to i-PI / String encoding

59 views
Skip to first unread message

Arpan Kundu

unread,
Sep 27, 2019, 10:31:47 PM9/27/19
to ipi-users
Hello,

What type of encoding do I need to use when I am sending extras to i-PI?

Thanks,
Arpan

Michele Ceriotti

unread,
Sep 29, 2019, 3:07:38 AM9/29/19
to ipi-users
We are still (for a few months) on Py2, so we didn't pay attention to this. We kind of assumed one would not return special characters that are not in the ASCII table, so let's say whatever encoding just encodes ASCII to single bytes. 

Arpan Kundu

unread,
Sep 30, 2019, 3:45:52 PM9/30/19
to ipi-users
Thank you Prof. Ceriotti.

Arpan Kundu

unread,
Oct 1, 2019, 11:34:07 AM10/1/19
to ipi-users
Is there any size limit of the string that I can send to i-PI. I am asking this because if I was running the example diamond_small_classical_NPT.  Here the string I want to send is small (~300) and it is working perfectly with my interface. However, if I try to run the diamond_big_classical_NPT example then size of the string that I want to send is big (~1700). There i-PI is closing the socket connection for that client. I am not sure what is happening. 

I was printing the the message length i-PI was receiving and also the message. Here the mlen is correct but then it is not doing anything after that. I have attached the relevent portion of the i-PI log. Thanks for any help.

@SOCKET:   Client asked for connection from ('127.0.0.1', 51394). Now hand-shaking.
 @SOCKET:   Handshaking was successful. Added to the client list.
 @SOCKET: 19/09/30-18:37:05 Assigning [ none] request id    0 to client with last-id None (  0/  1 : ('127.0.0.1', 51394))
mlen=1710
['' '' '' ..., '' '' '']
 !W!  @SOCKET:  Couldn't receive within    20 attempts. Time to give up!
 !W!  @SOCKET:   Client ('127.0.0.1', 51394) died or got unresponsive(C). Removing from the list.

Michele Ceriotti

unread,
Oct 1, 2019, 12:21:02 PM10/1/19
to ipi-users
Uhm. This is bizarre, there is no limit and 1700 characters are definitely fewer bytes than the forces from a medium-size structure. 
I think this discussion is best carried out on github - please open a bug report for it. Also, it'd be great if you could hack driver.f90 to 
trigger the issue, as it'd allow us to debug it without having to cope with qbox, which we don't know how to compile and use. 
Best
Michele

Arpan Kundu

unread,
Oct 1, 2019, 12:31:43 PM10/1/19
to ipi-users
Thanks, I will report this on github. Yes I will try to hack it with driver.f90 as it is mostly guiding me to write the qbox interface. 
Reply all
Reply to author
Forward
0 new messages