2
$\begingroup$

I am trying to figure out how to write a proper job file for the Sun Grid Engine so I can run a parallel computation using Mathematica on multiple nodes. Unfortunately almost all tutorials on the topic assume using MPI, which is not the case here.

In order to get this working, I need to find the answer to a few very specific questions:

  1. When I request multiple nodes, will the job file be run on all of them, or only on a single node? I need to run it only on a single node in this case, and start a single process which we can call controlling process.

  2. How can I access the names / IP addresses of all the other nodes? I think I have the answer to this one: the PE_HOSTFILE variable should point to a file that lists the names of all nodes.

  3. How can I let the controlling process start arbitrary processes at arbitrary times on any node that I can use? Should a simple ssh nodename command work for this, or would this require a password in a typical setup?

$\endgroup$
5
$\begingroup$
  1. The job script is run only on a single node by SGE. It is run on the first host listed in PE_HOSTFILE
  2. PE_HOSTFILEcan be parsed to get the names of all the nodes
  3. Using SSH without a passphrase internal to a cluster is a common setup, but it depends on who setup the machine you'll be using. I would ask them.

In addition, some HPC sites supply tools that might let you launch these tasks in a simpler manner. You should check with the site where you will be running.

$\endgroup$
  • $\begingroup$ If ssh without a passphrase is not set up, which is the next most likely to work alternative for point 3.? $\endgroup$ – Szabolcs Feb 12 '13 at 17:38
  • $\begingroup$ SSH without passphrase can be set up by you, actually. However, you can easily test it from your job script. Just pick off the second host from PE_HOSTFILE and try ssh $host uptime (or similar). If it doesn't work, you can setup your own passphraseless SSH. $\endgroup$ – Bill Barth Feb 12 '13 at 17:52
  • $\begingroup$ Unfortunately public key authentication seems to be disabled :-( $\endgroup$ – Szabolcs Feb 12 '13 at 18:52
  • $\begingroup$ Did you try it within a job, or from outside? $\endgroup$ – Bill Barth Feb 12 '13 at 19:06
  • $\begingroup$ I tried both. I tried exactly what you suggested: Within a job, I parsed the contents of the hostfile, extracted the name of the second host, and then ran "ssh secondhost uptime" (of course with the correct name of the second host inserted). After this runs, checking the output of the job shows Permission denied, please try again. two times, then Received disconnect ... too may authentication failures. First I tried without changing any ssh settings, then I set up passphraseless ssh authentication using ssh-keygen -t rsa then copying the generated id_rsa.pub to authorised_keys. $\endgroup$ – Szabolcs Feb 12 '13 at 19:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.