Wierd Error!?!?

Pete Wyckoff pw at osc.edu
Mon Jun 2 16:04:44 EDT 2003


bclem at rice.edu said on Mon, 02 Jun 2003 12:31 -0500:
> What does this error mean?
> 
> mpiexec: Error: prepare_gm_startup_ports: bind: Cannot assign requested
> address.

Weird:  -EADDRNOTAVAIL.

Here's the code that's doing that:

	struct sockaddr_in sin;
	socklen_t len = sizeof(sin);

        memset(&sin, 0, len);
        sin.sin_family = myaddr.sin_family;
        sin.sin_addr = myaddr.sin_addr;
        sin.sin_port = 0;
        if (bind(gmpi_fd[i], (struct sockaddr *)&sin, len) < 0)
            error_errno("%s: bind", __func__);

It tries to bind to a local TCP port, not any particular port number.
Looking through the kernel, it appears that this may happen if you
try to bind to a "non-local" IP number.

Could it be that your gethostbyname() returns an IP which is not
correct?  Mpiexec takes the hostname provided by PBS (via the list
you see in qstat -n, e.g.) and tries to look that up to determine
the local IP number.  Is your /etc/hosts (or DNS) correct?  If the
DNS returns more than one IP for the same name, that's trouble too.

This behavior can be fixed if you have a good reason, of course.

		-- Pete



More information about the mpiexec mailing list