<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 07/08/2011 11:30 PM, Pavan Balaji wrote:
<blockquote cite="mid:4E17CB71.3030607@mcs.anl.gov" type="cite">John,
<br>
<br>
Hydra will still pass the hostnames directly to the launcher;
nothing gets changed by Hydra. The resolution of the hostname is
used for its internal purposes.
<br>
<br>
And a machinefile containing "localhost" will work fine.<br>
</blockquote>
I tried your patch and it does not work. When localhost is in the
list of machine names, my launcher is not called. From what I can
tell:<br>
<ul>
<li>ht = gethostbyname("localhost") succeeds</li>
<li>ht resolves to a local interface</li>
<li>*is_local = 1 is executed</li>
<li>goto fn_exit is executed<br>
</li>
</ul>
Perhaps there is some confusion here, but I don't see how my
launcher could be called since *is_local == 1.<br>
<br>
John<br>
<blockquote cite="mid:4E17CB71.3030607@mcs.anl.gov" type="cite">
<br>
-- Pavan
<br>
<br>
On 07/08/2011 10:28 PM, John Marshall wrote:
<br>
<blockquote type="cite">On 07/08/2011 11:07 PM, Pavan Balaji
wrote:
<br>
<blockquote type="cite">Hi John,
<br>
<br>
What's the benefit of allowing the user to disable this? If
Hydra cannot resolve a hostname, it'll anyway consider it to
be
<br>
non-local. Note that your fix still doesn't solve the issue
for the case I mentioned below.
<br>
<br>
Btw, did you try the patch I provided?
<br>
</blockquote>
I looked at your patch and for the case you mention it works.
But it does not address my need because it still tests
<br>
gethostbyname(host). I don't want hydra to even bother checking
that the machine names are valid hostnames. For example, with a
<br>
machines file (intentionally meant to thwart the patch) of:
<br>
<br>
localhost
<br>
<br>
your patch will resolve the name, but I need that name to be
passed to the launcher-exec, no questions asked. The names in
the
<br>
machines file that I want to use are simply labels, they are not
hostnames. The possibility that these labels may match the
<br>
names of some hosts on the network is unintended and meant to be
irrelevant.
<br>
<br>
Thanks,
<br>
John
<br>
<br>
<blockquote type="cite">
<br>
-- Pavan
<br>
<br>
On 07/08/2011 09:56 PM, John Marshall wrote:
<br>
<blockquote type="cite">On 07/08/2011 10:31 PM, Pavan Balaji
wrote:
<br>
<blockquote type="cite">Hi John,
<br>
<br>
Can you try this patch: <a class="moz-txt-link-freetext" href="http://pastebin.com/09iC9PdD">http://pastebin.com/09iC9PdD</a>
<br>
<br>
There were two reasons for the local host check: (1) to
figure out which cases we can avoid doing an ssh and
instead just use
<br>
a fork, and (2) workaround for cases where the default
hostname of a node is not accessible over the network (in
this case we
<br>
try to find the "local hostname" in the host list passed
by the user).
<br>
<br>
While the first one is only a performance optimization,
the second is a correctness issue. So we can't just
disable the local
<br>
test the way you did without breaking Hydra on some
platforms. Instead, I have tried to handle this issue by
not throwing a
<br>
failure when a hostname doesn't resolve, and instead just
assuming that it's not the local host.
<br>
<br>
This is not a perfect solution as this will not work in
cases where the second point above is true&& the
user wants to use
<br>
aliases instead of regular host names. But it might be OK
for cases where one or both of the above two conditions is
false.
<br>
</blockquote>
Hi,
<br>
<br>
I suspect that this is a worthwhile change to make in
general. However, I'd want to go even further by being able
to expressly
<br>
tell hydra to not do any hostname resolution. That way there
is no question about what to do.
<br>
<br>
I have something like the following (in the same sock.c file
you mention):
<br>
<br>
530,538d529
<br>
< /* JM - start */
<br>
< char *HYDRA_NO_LOCAL_ENV;
<br>
< HYDRA_NO_LOCAL_ENV = getenv("HYDRA_NO_LOCAL");
<br>
< if ((HYDRA_NO_LOCAL_ENV != NULL)&&
(strcmp(HYDRA_NO_LOCAL_ENV, "1") == 0)) {
<br>
< *is_local = 0;
<br>
< goto fn_exit;
<br>
< }
<br>
< /* JM - end */
<br>
<
<br>
<br>
with an 'export HYDRA_NO_LOCAL=1', all machine names are
treated as not the local host, and thereby passed on to the
launcher.
<br>
Would this actually mess anything up elsewhere in the code?
<br>
<br>
Given that the -nolocal is not what I thought, a name other
than HYDRA_NO_LOCAL would be in order.
<br>
<br>
John
<br>
<br>
<blockquote type="cite">
<br>
-- Pavan
<br>
<br>
On 07/08/2011 05:03 PM, John Marshall wrote:
<br>
<blockquote type="cite">On 07/08/2011 05:35 PM, Dave
Goodell wrote:
<br>
<blockquote type="cite">Was that the option to MPD's
mpiexec that said "don't launch any processes on the
local node, even though the local node is
<br>
in the MPD ring"?
<br>
<br>
If so, then hydra just doesn't need such an option.
Simply don't include the local/head node in the
machinefile and hydra
<br>
won't launch any processes there.
<br>
<br>
Or are you trying to obtain the effect of setting the
"MPICH_NOLOCAL" environment variable to "1"? That
says don't use
<br>
shared memory to communicate between processes on the
same node.
<br>
</blockquote>
The mpd option is closer to what I am looking for but
still not it because I do want to be able to start up a
process on the
<br>
local node also.
<br>
<br>
For example, with a machines file:
<br>
<br>
00
<br>
01
<br>
02
<br>
<br>
I want mpiexec to blindly call my launcher with the
machine names of 00, 01, and 02 without trying to
resolve the names (of
<br>
course, 00, 01, 02 are not hostnames). So, in effect, my
machine names are really just labels which the launcher
will
<br>
interpret.
<br>
The problem is, mpiexec wants to resolve the entries in
the machines file, expecting that they are hostnames.
<br>
<br>
My change simply forces an is_local = 0 for all names.
Is there an alternative?
<br>
<br>
Thanks,
<br>
John
<br>
<br>
<blockquote type="cite">-Dave
<br>
<br>
On Jul 8, 2011, at 4:29 PM CDT, John Marshall wrote:
<br>
<br>
<blockquote type="cite">Hi,
<br>
<br>
From what I can tell, there is no longer a
nolocal option. For what I am doing, I currently
need this kind of
<br>
functionality since the entries in my "machines"
list are not actual machine names but labels. I have
made a quick change
<br>
to src/pm/hydra/utils/sock/sock.c so that if an env
var is set, all machines are treated as non-local
(*is_local = 0).
<br>
<br>
I know I'm late to the party on this, but can
someone explain why the -nolocal option was removed.
Or, maybe I have missed
<br>
something to get this functionality, i.e., to pass
the machine name/label to the launcher as is without
any
<br>
complaints/errors and let the launcher interpret.
<br>
<br>
Thanks,
<br>
John
<br>
</blockquote>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>