Re: Replica Exhange error: POSIX EINTR {interrupted system call}

From: Dirar Homouz (dirar_at_hotmail.com)
Date: Mon Sep 22 2008 - 15:07:16 CDT

Hi, NAMD (particularly, Peter, please),

I would like to resume the discussion in the following thread that has been disconnected due to lack of user response.

>Hi Arturas,
>my apologies for being slow to follow up on this; I realize that you
>asked me a couple extra questions a few days ago. Did you manage to
>figure those out?

>As for what you're seeing now, I've had this block up my replica
>exchange attempts from time to time. It seems to be dependent on the
>exact environment you're running in, and how many replicas you have. So,
>can I ask:
>-how many replicas are you running?
>-what do your nodes look like?

>Also, could you please send me everything in about a 10 line radius of
>line 52 from namd_replica_server.tcl? I found that there's a catch
>statement that had to be modified in some of my cases.

>Depending on your architecture, you may also need to use something other
>than the standard tcl release as an interpreter for the repex scripts,
>as the socket code appears to have trouble coping with large numbers of
>replicas on some platforms.

>Best,
>Peter

I run into the same problem. I am replying Peter's questions here.

>-how many replicas are you running?
>-what do your nodes look like?
I'm running 2 replics on intel dual xeon cpus.

>Also, could you please send me everything in about a 10 line radius of
>line 52 from namd_replica_server.tcl? I found that there's a catch
>statement that had to be modified in some of my cases.

Here you are,

  proc write_config {filebase replica_id server_host server_port} {
    set logname "[format $filebase $replica_id]"
    if [file exists $logname] {error "log file $logname already exists"}
    set confname "${logname}.nrc"
    set f [open $confname "w"]
    puts $f "set replica_id $replica_id"
    puts $f "set server_host $server_host"
    puts $f "set server_port $server_port"
    puts $f {
      set verbose 1
      set server_channel [socket $server_host $server_port]
      fconfigure $server_channel -buffering line
      print "SERVER CONNECTED"
      puts $server_channel "replica $replica_id"
      set server_buffer {}
      while { 1 } {
        while [catch {gets $server_channel cmd} rval] {
puts $errorCode
          if {![string match "POSIX EINTR*" $errorCode]} {
            error $rval $errorInfo $errorCode
          }
        }
        if {$rval < 0} {
          error "disconnect server"
        }
        append server_buffer $cmd "\n"
        if [info complete $server_buffer] {
          set cmd $server_buffer
          set server_buffer {}
          if {$verbose> 0} { print "SERVER: $cmd" }
          set response [eval $cmd]
          if {$verbose> 0} { print "CLIENT: $response" }
          puts $server_channel $response
        }
      }
    }
    close $f
    return [list $confname $logname]
  }

------------------------------
Thank you very much and I look forward to hearing from you.
Dirar
_________________________________________________________________
See how Windows connects the people, information, and fun that are part of your life.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:49:51 CST