# Multi-node jobs with Sun Grid Engine without MPI

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?

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
• 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. – Bill Barth Feb 12 '13 at 17:52
• 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. – Szabolcs Feb 12 '13 at 19:16