none
How to set port range for the mpiexec RRS feed

  • Question

  • I got connection problem when test-running msmpi on two machines, which have a special firewall limitation . only a special range ports (says 18000-18500) is able to open.

    On machine foo, I run sdmp -d -p 18000

    on another machine bar, when I run mpiexec -hosts foo 1 -p 18000 hostname, I alwasy got the connection failure error

    Aborting: mpiexec on foo is unable to connect to the smpd manager on
    10.115.112.166:0
    Other MPI error, error stack:
    ConnectFailed(986): unable to connect to 10.115.112.166 on port 50921, exhausted
     all endpoints
    ConnectFailed(977): unable to connect to 10.115.112.166 on port 50921, A connect
    ion attempt failed because the connected party did not properly respond after a
    period of time, or established connection failed because connected host has fail
    ed to respond.  (errno 10060)

     

    However I try my own simple socket program on the port 18000, the foo:18000 is reachable . and I open the firewall for port 18000-18500

    My question is if it is possible to limit the port used by mpiexec, Seems the env MPIEXE_PORT_RANGE is designed for this purpose.

    However I tried differenct syntax, such as set MPIEXE_PORT_RANGE 18000:18005 or MPIEXEC_PORT_RANGE 18000:18500, but none of them help.

    I wonder if this is the right solution and particually what is the correct syntax to set up port range?

    Thanks

    Thursday, September 16, 2010 11:08 PM

Answers

  • Hello Wei,

    smpd -d -p [port] should work in your case. Could you check what is port 50921 for?

    For MS-MPI, the env for port range setting is not MPIEXEC_PORT_RANGE. You should use the ENV: MPICH_PORT_RANGE=min,max
     to set the Sockets listener port range. The default is 0,65535.

    Thanks,

    James

    Friday, September 17, 2010 3:36 PM

All replies

  • Hello Wei,

    smpd -d -p [port] should work in your case. Could you check what is port 50921 for?

    For MS-MPI, the env for port range setting is not MPIEXEC_PORT_RANGE. You should use the ENV: MPICH_PORT_RANGE=min,max
     to set the Sockets listener port range. The default is 0,65535.

    Thanks,

    James

    Friday, September 17, 2010 3:36 PM
  • by checking netstat the port is opened by SMPD. and I followed the tasklist, seems whenever I run mpiexec to build connect to smpd daemon, a new smpd progress is created and will listerned to a new port (in this case it is 50921).

    Is my suspection correct, and if so, how can I  set the range of this newly-created port by smpd?

     

    Thanks

    Friday, September 17, 2010 6:27 PM
  • Could you start the smpd with command: smpd -d 3 -p 18000? It will give you the detailed traces. Hopefully you can get the hint why a new SMPD process is spawned.

    Thanks,

    James

    Friday, September 17, 2010 6:52 PM
  • Thanks,  What I got after with -d 3 is

    [-1:2716] created a set for the listener: 192
    [-1:2716] smpd listening on port 18000
    [-1:2716] authenticating new connection
    [-1:2716] read job context: 'job'
    [-1:2716] calling smpd_server_auth_connection_ex
    [-1:2716] calling QuerySecurityPackageInfo
    [-1:2716] NTLM package, NTLM Security Package, with: max 2888 byte token, capabi
    lities bitmask 0x82b37
    [-1:2716] calling AcquireCredentialsHandle
    [-1:2716] read sspi header: '63'
    [-1:2716] read sspi buffer
    [-1:2716] calling AcceptSecurityContext
    [-1:2716] continuation buffer of length 228 bytes
    [-1:2716] wrote sspi header: 228.
    [-1:2716] wrote sspi buffer.
    [-1:2716] read sspi header: '450'
    [-1:2716] read sspi buffer
    [-1:2716] calling AcceptSecurityContext
    [-1:2716] sspi negotiation complete, start the manager smpd
    [-1:2716] create manager process (using smpd daemon credentials)
    [-1:2716] smpd reading the port string from the manager
    [-1:2452] created set for manager listener, 192
    [-1:2452] smpd manager listening on port 49239
    [-1:2452] manager writing port back to smpd.
    [-1:2716] closing the pipe to the manager
    [-1:2716] writing authorization result: 0
    [-1:2716] smpd writing reconnect request: port 49239

     

    is this caused by the credential checking?

    Friday, September 17, 2010 11:03 PM
  • Have you resolved your issue?

    Wednesday, January 12, 2011 2:59 AM
    Moderator