| | 1 | Up: [wiki:IPPatTheROE IPP at the ROE] |
| | 2 | |
| | 3 | = Running Simtest = |
| | 4 | |
| | 5 | As you can probably guess, Simtest is a suite of tests that, if nothing else, ensures you've got a workable IPP installed. |
| | 6 | |
| | 7 | Requisite to running Simtest, you will need to have built IPP (IppInstallation) and initialised the database (IppInitialisingDatabase). |
| | 8 | |
| | 9 | == Configuration files == |
| | 10 | |
| | 11 | First, I will describe intallation/modification to configuration files. Probably I should have this step somewhere else, like in IPP installation. |
| | 12 | |
| | 13 | 1. `cp $LOCAL/ipp/default.lin64/share/ippconfig/ipprc.config ~/.ipprc` |
| | 14 | 2. Edit `~/.ipprc` as you see fit. Look particularly at the `PATH`. |
| | 15 | 3. `cp /home/ert/.ptolemyrc ~/` |
| | 16 | 4. Edit `~/.ptolemyrc` as you see fit. Look particularly at `CONFDIR`. |
| | 17 | 5. `mkdir ~/ippconfig` |
| | 18 | 6. `cp /home/ert/ippconfig/site.config ~/ippconfig/` |
| | 19 | 7. `Edit ~/ippconfig/site.config` appropriately. Take particular attention to `DATAPATH`, `DBSERVER`, `DBNAME`, `DBUSER`, `DBPASSWORD`, the last four of which you came up with when you initialised the database (IppInitialisingDatabase). Also check `PSASTRO.CATDIRS`. The directories don't need to exist, but they must be createable by you. |
| | 20 | |
| | 21 | The first step, installation of a `.ipprc` file, seems wholly unnecessary (since the information already exists in the and is available to the code in a predictable location). Perhaps a critial review of the configuration settings would make it unnecessary. But there you go. |
| | 22 | |
| | 23 | Through DVO, IPP has a provenance in Ohana, a collection of tools written for CFHT. Ohana tools look for user configuration in `~/.ptolemyrc`. There is no master copy. It seems to just get handed down from user to user. Take mine. |
| | 24 | |
| | 25 | `site.config` requires more attention. Anything under `"## Stuff from Chris Waters ##"` can actually be ignored for Simtest. But it might be needed in the future. |
| | 26 | |
| | 27 | == Preparing Simtest files == |
| | 28 | |
| | 29 | Simtest isn't quite in sync with changes to IPP, so it needs a bit of tweaking. |
| | 30 | |
| | 31 | * Edit `$LOCAL/ipp/default.lin64/share/ippconfig/simtest/psastro.config` |
| | 32 | * Everywhere it says `*_SYNTH` change to `SYNTH.*` (eg `r_SYNTH` => `SYNTH.r`) |
| | 33 | |
| | 34 | == Ensure you can SSH to your local client == |
| | 35 | |
| | 36 | The `pantasks` controller needs to be able to ssh to all nodes capable of processing data, including the local node. |
| | 37 | |
| | 38 | Ensure it works. |
| | 39 | |
| | 40 | * `ssh localhost` |
| | 41 | * `ssh hostname` |
| | 42 | |
| | 43 | SSH'ing to the local host is particularly problematic on systems with shared home directories (like the IfA) where the `localhost` entry in `~/.ssh/known_hosts` can correspond to any machine on the network. It may need to be edited out. |
| | 44 | |
| | 45 | == Running Simtest == |
| | 46 | |
| | 47 | Simtest is run in the `pantasks` environment, sorta like running IDL `.pro` scripts in IDL. |
| | 48 | |
| | 49 | * `mkdir /wherever/you/want/to/work/simtest` |
| | 50 | * `cd /wherever/you/want/to/work/simtest` |
| | 51 | * `psconfig default` |
| | 52 | * `pantasks` |
| | 53 | * pantasks: `module simtest.pro` |
| | 54 | * pantasks: `simtest testdb localhost new` |
| | 55 | * Answer YES to starting from scratch |
| | 56 | * Supply `ipp`'s password: `aloha` |
| | 57 | * Wait for the fireworks.... |
| | 58 | |
| | 59 | `pantasks` will take a couple of minutes to generate the data on which to process. Then it will return to the `pantasks` prompt while the tasks are run in the background for the next couple of hours. |
| | 60 | |
| | 61 | * Typing status will give the state of all the processes |
| | 62 | |
| | 63 | == Parallelisation == |
| | 64 | |
| | 65 | In IPP, Parallelisation can either mean speeding up a single code by use of threading, or running multiple tasks at the same time on the same hardware (trivial paralellisation). |
| | 66 | |
| | 67 | Let's start with trivial parallelisation. |
| | 68 | |
| | 69 | In `pantasks`, the queue controller can be accessed via the controller command. To add a machine to the list of machines to which tasks can be assigned: |
| | 70 | |
| | 71 | * pantasks: `controller host add` ''HostToAdd'' |
| | 72 | |
| | 73 | If the host is multi-core, then you can add the host many times (for the rest of the examples, ''HostToAdd'' is `eday`): |
| | 74 | |
| | 75 | * pantasks: `controller host add eday` |
| | 76 | * pantasks: `controller host add eday` |
| | 77 | * ... |
| | 78 | |
| | 79 | However, if the tasks are I/O intensive, then having all cores running separate tasks might not be optimal. You may just want to get the code to run in parallel with threads |
| | 80 | |
| | 81 | To let the controller know that the host can handle multiple threads: |
| | 82 | |
| | 83 | * pantasks: `controller host add eday -threads 4` |
| | 84 | |
| | 85 | Prior to running `simtest` (which calls `controller` on its own), the number of threads to run is set by: |
| | 86 | |
| | 87 | * pantasks: `$SIMTEST_THREADS = 4` |
| | 88 | |
| | 89 | Hosts can be added before or after the jobs are submitted. |
| | 90 | |
| | 91 | There is also a `$PARALLEL` variable, but I think it is just a boolean (0 or 1) |
| | 92 | |
| | 93 | Paul Price recommends for 8-way systems to set the number of threads to something like 4 and then let the node run 3 separate processes. Results may vary. |
| | 94 | |
| | 95 | -- EricTittley - 2009-11-06 |