<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body dir="auto">
<div>&nbsp;There is 'parallel-ssh' (and parallel-scp). I believe that's part of the public StarCluster images. Good stuff!</div>
<div><br>
</div>
<div>-Hugh</div>
<div><br>
On Jun 4, 2014, at 3:27, &quot;Jacob Barhak&quot; &lt;<a href="mailto:jacob.barhak@gmail.com">jacob.barhak@gmail.com</a>&gt; wrote:<br>
<br>
</div>
<blockquote type="cite">
<div>
<div dir="ltr">
<div>Hi Cedar,</div>
<div><br>
</div>
<div>There is no direct command I know of. However, there are several simple workarounds.</div>
<div><br>
</div>
<div>1. You can certainly qsub - however you do not know which node will run the command unless you specify it using modifiers, so this is probably not what you need.</div>
<div>2. You can use sshmaster and sshnode from your PC to run the command. you can write a simple batch script in either windows or Linux environment to run through the nodes and execute this command for each node. I tried this in the past.</div>
<div>3. You can write a bash script that you can put on the master and that&nbsp;loops doing&nbsp;ssh node with the command you want - you can use &amp; to run this command on each node in parallel to save time. I have not tried this - yet it seems easy enough.</div>
<div>4. You can write a starcluster plugin that will run the command automatically for you for each node. Note, however, that there are already many plugins ready and there might be a plugin that does what you want. For example, there is a plugin that will
 pip install a python library for you on certain nodes or NFS mount for you. I am using these two plugins.</div>
<div><br>
</div>
<div>I agree that&nbsp;a starcluster command such as sshall starcluster&nbsp;that submits&nbsp;a shell&nbsp;command to all nodes in parallel would be helpful. However, I do not know of such functionality.</div>
<div><br>
</div>
<div>I hope you find those workarounds helpful.</div>
<div>
<div tabindex="0" id=":rq"><img src="https://mail.google.com/mail/images/cleardot.gif"></div>
</div>
<span><font color="#888888">
<div><br>
</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Jacob</div>
</font></span></div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Tue, Jun 3, 2014 at 5:56 PM, Cedar McKay <span dir="ltr">
&lt;<a href="mailto:cmckay@uw.edu" target="_blank">cmckay@uw.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What is the easiest way to run terminal commands on each and every node? I can qsub a command as many times as I have hosts, but (perhaps if nodes are busy) nodeX could run the command multiple times, and nodeY not at all.<br>
<br>
<br>
Our local cluster has something that works like this:<br>
<br>
$ rocks run host compute &quot;COMMAND&quot;<br>
<br>
That runs COMMAND on every &quot;compute&quot; host.<br>
<br>
I'm sort of surprised this functionality isn't totally standard (or is it?) on all clusters. I have gotten tmux going, but it seems both over-complicated, and a bit fragile. Plus, will it scale to a 100 node cluster? Any tips?<br>
<br>
best,<br>
Cedar<br>
<br>
<br>
<br>
_______________________________________________<br>
StarCluster mailing list<br>
<a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a><br>
<a href="http://mailman.mit.edu/mailman/listinfo/starcluster" target="_blank">http://mailman.mit.edu/mailman/listinfo/starcluster</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
<blockquote type="cite">
<div><span>_______________________________________________</span><br>
<span>StarCluster mailing list</span><br>
<span><a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a></span><br>
<span><a href="http://mailman.mit.edu/mailman/listinfo/starcluster">http://mailman.mit.edu/mailman/listinfo/starcluster</a></span><br>
</div>
</blockquote>
</body>
</html>