<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7036.0">
<TITLE>RE: [mpich-discuss] Race condition when accessing ~/.smpd during startup</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2> Hi,<BR>
Please set the environment variable "SMPD_OPTION_NO_DYNAMIC_HOSTS" to 1 before starting smpd to prevent smpd from updating the dynamic_hosts in smpd config file.<BR>
Let us know if it works for you.<BR>
<BR>
(PS: As you mentioned in your email there is a race condition when updating dynamic hosts in the smpd config file - this is not handled correctly in the current code base. We set the above environment variable in our nightly tests.)<BR>
<BR>
Regards,<BR>
Jayesh<BR>
<BR>
-----Original Message-----<BR>
From: mpich-discuss-bounces@mcs.anl.gov [<A HREF="mailto:mpich-discuss-bounces@mcs.anl.gov">mailto:mpich-discuss-bounces@mcs.anl.gov</A>] On Behalf Of Reuti<BR>
Sent: Tuesday, November 25, 2008 6:38 AM<BR>
To: mpich-discuss@mcs.anl.gov<BR>
Subject: [mpich-discuss] Race condition when accessing ~/.smpd during startup<BR>
<BR>
Hi,<BR>
<BR>
to implement a daemon based smpd startup method for MPICH2 (1.0.8) I use a loop across all elected machines which a chosen port. The shutdown takes the same list in reverse order. I.e. the daemon on the master node of the parallel job is shutdown of last, so that for a shutdown no ssh or alike is necessary as I use "smpd -port $port - shutdown $host".<BR>
<BR>
This works fine, but from time to time I see a message in the logfile of the script: "Please specify an authentication passphrase for this<BR>
smpd: Would you like to save this passphrase in '/home/ reuti/.smpd'?", either during startup or shutdown of the daemons. <BR>
Well, there is of course a passphrase in ~/.smpd.<BR>
<BR>
I put now a "sleep 1" in the loops and this seems to avoid the problem.<BR>
<BR>
As the dynamic_hosts="node001 node002" are also memorized in ~/.smpd: <BR>
can it be a race condition, when the daemons are started/shutdown too fast? Can the modification of this file be switched off?<BR>
<BR>
-- Reuti<BR>
</FONT>
</P>
</BODY>
</HTML>