strutture:pi:computing_center:theocluster:job:esempio_-_example
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
strutture:pi:computing_center:theocluster:job:esempio_-_example [2013/10/30 08:39] – carusog@infn.it | strutture:pi:computing_center:theocluster:job:esempio_-_example [2013/12/23 14:17] (current) – carusog@infn.it | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ==== Esempio - Example ==== | ||
+ | ---- | ||
+ | |||
+ | |||
+ | Dopo aver effettuato l' | ||
+ | |||
+ | < | ||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | |||
+ | **DEBUG**\\ | ||
+ | |||
+ | Per agevolare un utente che non volesse effettuare un bsub indicando tutti i parametri in modo manuale come mostrato nella sezione di spiegazione delle code, è stato previsto lo script bash chiamato mpiSubmit.sh dove vanno specificati come parametri il nome della coda da utilizzare (in questo caso **debug** o **longDebug**), | ||
+ | E' possibile scaricare lo script dall' | ||
+ | |||
+ | Il comando per far partire il debug di un file eseguibile a.out (generato da una compilazione precedente) su una delle due code preveiste (in questo caso la coda debug), riservando 2 jobslot, (lo stesso potrebbe essere fatto su longDebug) e comunque stabilendo un numero di jobslot massimo consentito secondo quanto stabilito nella pagine di definizione delle code, sarà | ||
+ | |||
+ | < | ||
+ | |||
+ | In questo caso verranno stampato su monitor: | ||
+ | |||
+ | |||
+ | Job < | ||
+ | Job / | ||
+ | |||
+ | |||
+ | Per conoscere ulteriori informazioni su proprio job: | ||
+ | |||
+ | < | ||
+ | |||
+ | nel nostro caso | ||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | Nella home directory dell' | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | **COMPILAZIONE**\\ | ||
+ | |||
+ | Per agevolare un utente che non volesse effettuare un bsub indicando tutti i parametri in modo manuale come mostrato nella sezione di spiegazione delle code, è stato previsto lo script bash mpiCompile.sh che riceve come parametri il nome della coda (come coda va ovviamente specificata " | ||
+ | E' possibile scaricarlo dall' | ||
+ | |||
+ | |||
+ | Supponendo di voler sottomettere la compilazione del proprio job, in questo caso un semplice programma scritto in linguaggio C, chiamato prova.c ovviamente alla coda **compilation** riservando implicitamente 1 jobslot (che è il numero massimo consentito secondo quanto indicato nella sezione di spiegazione della coda).Lo script in linguaggio C è un semplice 'Hello World from' con indicazione di tutti i nodi dal quale viene lanciato. | ||
+ | Anche questo file è scaricabile dall' | ||
+ | Nello specifico sarà: | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | /*The Parallel Hello World Program*/ | ||
+ | |||
+ | #include < | ||
+ | #include < | ||
+ | main(int argc, char * *argv)\\ | ||
+ | {\\ | ||
+ | int node; | ||
+ | MPI_Init(& | ||
+ | MPI_Comm_rank(MPI_COMM_WORLD, | ||
+ | printf(" | ||
+ | MPI_Finalize(); | ||
+ | }\\ | ||
+ | |||
+ | |||
+ | |||
+ | Il comando da lanciare sarà: | ||
+ | |||
+ | < | ||
+ | |||
+ | In questo caso verranno stampati su monitor il numero assegnato al job e la coda a cui è stato sottomesso, nel nostro caso: | ||
+ | |||
+ | Job < | ||
+ | |||
+ | |||
+ | Per conoscere ulteriori informazioni su proprio job: | ||
+ | |||
+ | < | ||
+ | |||
+ | nel nostro caso | ||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | Nella home directory dell' | ||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | **SOTTOMISSIONE**\\ | ||
+ | |||
+ | Per agevolare un utente che non volesse effettuare un bsub indicando tutti i parametri in modo manuale come mostrato nella sezione di spiegazione delle code, è stato previsto lo script bash chiamato mpiSubmit.sh dove vanno specificati come parametri il nome della coda da utilizzare, in questo **parallel**(lo stesso può essere fatto indicando gli opportuni parametri anche per la coda **longparallel** e **neparallel**), | ||
+ | E' possibile scaricare lo script dall' | ||
+ | |||
+ | Il comando per far partire la sottomissione di un file eseguibile a.out (generato da una compilazione precedente) su una delle due code preveiste (in questo caso la coda Parallel, riservando 6 jobslot, (lo stesso potrebbe essere fatto su longparallel e neparallel) e comunque stabilendo un numero di jobslot massimo consentito secondo quanto stabilito nella pagine di definizione delle code, sarà | ||
+ | |||
+ | < | ||
+ | |||
+ | In questo caso verranno stampato su monitor: | ||
+ | |||
+ | |||
+ | Job < | ||
+ | Job / | ||
+ | |||
+ | |||
+ | Per conoscere ulteriori informazioni su proprio job: | ||
+ | |||
+ | < | ||
+ | |||
+ | nel nostro caso | ||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | Nella home directory dell' | ||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | \\ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | Per annullare un job attivo (in coda o running) si puo' usare bkill | ||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | ---- | ||
+ | === Assistenza === | ||
+ | |||
+ | Per qualsiasi dubbio o informazione potete mandare una mail all'IT Division all' | ||
+ | |||
+ | < | ||
+ | |||
+ | Verrete contattati al più presto dal gruppo. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | ---- | ||
+ | ---- | ||
+ | ---- | ||
+ | |||
+ | \\ | ||
+ | < | ||
+ | |||
+ | ==== Example ==== | ||
+ | ---- | ||
+ | |||
+ | |||
+ | After ssh access to the dedicated interface localui3.pi.infn.it by: | ||
+ | |||
+ | < | ||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | |||
+ | **DEBUG**\\ | ||
+ | |||
+ | In order to facilitate users who does not wish to make a bsub indicating all of the parameters manually, it was predicted a script called mpiSubmit.sh which must be specified as parameters the name of the queue to be used(**Debug** or **longDebug**), | ||
+ | The script can be downloaded from [[https:// | ||
+ | |||
+ | The command to start the debug of an executable file a.out (generated from a previous build) on one of the two queues available (in this case the Debug queue), reserving 2 jobslot, (the same could be done on longDebug) and however, establishing a number of jobslot maximum allowed, it will be | ||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | In this case will be printed the number assigned to the job and the queue used: | ||
+ | |||
+ | Job < | ||
+ | Job / | ||
+ | |||
+ | |||
+ | To find more information about the job: | ||
+ | |||
+ | < | ||
+ | |||
+ | In this case: | ||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | In the user's home directory the files generated will be called a.out.err (list of errors) and a.out.out (all output information of the running phase). | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | **COMPILATION**\\ | ||
+ | |||
+ | In order to facilitate users who does not wish to make a bsub indicating all of the parameters manually, it was predicted a script called mpiCompile.sh which receives as parameters the name of the queue (" | ||
+ | The script can be downloaded from [[https:// | ||
+ | |||
+ | |||
+ | For example, if user want to compile a simple C program called prova.c on **compilation** queue, using 1 jobslot (which is the only one availble for the queue). The C program is a simple 'Hello World from' which indicates all the nodes from which it is started. | ||
+ | The C program can be downloaded from [[https:// | ||
+ | The Parallel Hello World Program: | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | /*The Parallel Hello World Program*/ | ||
+ | |||
+ | #include < | ||
+ | #include < | ||
+ | main(int argc, char * *argv)\\ | ||
+ | {\\ | ||
+ | int node; | ||
+ | MPI_Init(& | ||
+ | MPI_Comm_rank(MPI_COMM_WORLD, | ||
+ | printf(" | ||
+ | MPI_Finalize(); | ||
+ | }\\ | ||
+ | |||
+ | |||
+ | |||
+ | The command to run must be: | ||
+ | |||
+ | < | ||
+ | |||
+ | In this case will be printed the number assigned to the job and the queue used: | ||
+ | |||
+ | Job < | ||
+ | |||
+ | |||
+ | To find more information about the job: | ||
+ | |||
+ | < | ||
+ | |||
+ | In this case: | ||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | In the user's home directory the files generated will be called prova.c.err(list of errors), prova.c.out(output informations) and a.out(the executable files). | ||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | **SUBMISSION**\\ | ||
+ | |||
+ | In order to facilitate users who does not wish to make a bsub indicating all of the parameters manually, it was predicted a script called mpiSubmit.sh which must be specified as parameters the name of the queue to be used, in this case the queue **parallel**(the same can be done by indicating the appropriate parameters for **longparallel** and **neparallel** queues), the number of jobslot, the mpi executable and any other parameters. | ||
+ | The script can be downloaded from [[https:// | ||
+ | |||
+ | The command to start an executable file a.out (generated from a previous build) on one of the two queues available (in this case the Parallel queue, reserving 6 jobslot, (tha same can be to do on the longparallel and neparallel queues) establishing a number of jobslot maximum allowed, it will be: | ||
+ | |||
+ | < | ||
+ | |||
+ | In this case will be printed the number assigned to the job and the queue used: | ||
+ | |||
+ | Job < | ||
+ | Job / | ||
+ | |||
+ | |||
+ | To find more information about the job: | ||
+ | |||
+ | < | ||
+ | |||
+ | In this case: | ||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | In the user's home directory the files generated will be called a.out.err (list of errors) and a.out.out (all output information of the running phase). | ||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | \\ | ||
+ | |||
+ | |||
+ | |||
+ | __To kill a job can be used the bkill command__ | ||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | ---- | ||
+ | === to request help === | ||
+ | |||
+ | For any questions or information users can send an email to the IT Division: | ||
+ | |||
+ | < | ||
+ | |||
+ | You'll be contacted asap by a member' | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||