[ Skip to the content ]

Institute of Formal and Applied Linguistics Wiki


[ Back to the navigation ]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
grid [2017/10/02 16:56]
popel [Advanced usage]
grid [2017/10/02 17:28]
popel [Job monitoring]
Line 237: Line 237:
 === Array jobs === === Array jobs ===
  
-If you have a set of tasks (of the same type) and want to run them on multiple machines, use ''qsub -t''... +If you have a set of tasks (of the same type) and want to run them on multiple machines, use ''qsub -t''. 
-TODO+  * ''-t 1-n'' start array job with n jobs numbered 1 ... n 
 +  * environmental variable ''SGE_TASK_ID'' 
 +  * output and error files ''$JOB_NAME.[eo]$JOB_ID.$TASK_ID'' 
 +  * ''-t m-n[:s]'' start array job with jobs m, m + s, ..., n 
 +  * environmental variables ''SGE_TASK_FIRST, SGE_TASK_LAST, SGE_TASK_STEPSIZE'' 
 +  * ''-tc j'' run at most j jobs simultaneously 
 +  * ''-hold_jid_ad comma_separated_job_list'' array jobs that must finish before this job starts; task //i// of the current job depends only on task //i// of the specified jobs
  
-===== Monitorování úloh =====+===== Job monitoring =====
  
-  * ''qstat [-u user]'' -- seznam úloh aktuálně běžících ve frontě +  * ''qstat [-u user]'' -- print a list of running/waiting jobs of a given user 
-  * ''qhost'' -- dostupné zdroje +  * ''qhost'' -- print available/total resources 
-  * ''/SGE/REPORTER/LRC-UFAL/bin/lrc_users_real_mem_usage -u user -w'' -- aktuální využití paměti uživatelem +  * ''/SGE/REPORTER/LRC-UFAL/bin/lrc_users_real_mem_usage -u user -w'' -- current memory usage of a given user 
-  * ''/SGE/REPORTER/LRC-UFAL/bin/lrc_users_limits_requested -w'' -- nárokované požadavky uživatelů +  * ''/SGE/REPORTER/LRC-UFAL/bin/lrc_users_limits_requested -w'' -- required resources of all users 
-  * ''/SGE/REPORTER/LRC-UFAL/bin/lrc_nodes_meminfo'' -- vypis vsech uzlu a stav vytiznosti pameti. +  * ''/SGE/REPORTER/LRC-UFAL/bin/lrc_nodes_meminfo'' -- memory usage of all nodes 
-    * mem_total: celkova pamet uzlu +    * mem_total: 
-    * mem_free: tedy kolik je jeste volne pameti z pametove quoty uzlu +    * mem_free: total memory minus reserved memory (using ''qsub -l mem_free'') for each node 
-    * act_mem_free: kolik uzlu OPRAVDU zbyva volne pameti +    * act_mem_free: really free memory 
-    * mem_used: kolik je pameti skutecne pouzito +    * mem_used: really used memory 
-  * ''/SGE/REPORTER/LRC-UFAL/bin/lrc_state_overview'' -- celkový přehled o clusteru +  * ''/SGE/REPORTER/LRC-UFAL/bin/lrc_state_overview'' -- overall summary (with per-user stats for users with running jobs
-    * celkovy pocet jader, pocet vyuzitych jader +  * ''cat /SGE/REPORTER/LRC-UFAL/stats/userlist.weight'' -- all users sorted according to their activity (number of submitted jobs × their average duration), updated each night 
-    * celkova velikost RAM, kolik je ji fyzicky nepouzite, kolik je ji jeste nerezervovane +  * [[https://ufaladm2.ufal.hide.ms.mff.cuni.cz/munin/ufal.hide.ms.mff.cuni.cz/lrc1.ufal.hide.ms.mff.cuni.cz/lrc_users.html|Munin: graph of cluster usage by day and user]] (accessible only from ÚFAL networkafter accepting security exception)
-    * po jednotlivych uzivatelich (zrovna pocitajicich-- kolik jim bezi uloh, kolik jich maji ve fronte a kolik z nich je ve stavu hold +
-  * ''cat /SGE/REPORTER/LRC-UFAL/stats/userlist.weight'' -- seznam uživatelů clusteru seřazený podle dosavadní aktivity (počet odeslaných úloh × čas, který běžely), aktualizovaný každý den v noci +
-  * [[https://ufaladm2.ufal.hide.ms.mff.cuni.cz/munin/ufal.hide.ms.mff.cuni.cz/lrc1.ufal.hide.ms.mff.cuni.cz/lrc_users.html|Munin: graf vytíženosti clusteru podle uživatelů]] (viditelný pouze ze sítě ÚFAL+
- +
-===== Časté a záludné problémy ===== +
- +
- +
-==== Submitnutý job může znovu submitovat ==== +
- +
-Danovy starší zkušenosti s clusterem PBS (nikoli SGE) říkalyže tohle nejde. Ale jde to, aspoň u nás. Příkazy ''qsub'' spol. jsou kromě hlavy clusteru dostupné i na všech strojích clusteru, samozřejmě pokud váš soubor ''.bashrc'', ''.cshrc'' apod. zajistí, že se i na nich provede inicializace prostředí SGE. +
- +
- +
- +
-==== Proměnné prostředí, nastavení vlastního prostředí ==== +
- +
-SGE spouští skripty v čistém prostředí. Nebuďte proto překvapeni, když vám skript na konzoli poběží dobře, ale po submitnutí fungovat nebude. Třeba nenašel potřebné programy v ''$PATH'' +
- +
-Zatím nevím přesně, které ze souborů ''.login'', ''.bashrc'' ap. SGE spouští, jestli vůbec nějaké. Naopak, experimentálně jsem ověřil, že ''qsub -S /bin/bash skript'' nenačte žádný z ''.bashrc'', ''.bash_profile'', ''.login'', ani ''.profile''+
- +
-Z toho například také vyplývá, že bez ošetření se jako **Java** používá +
- +
-   java version "1.5.0" +
-   gij (GNU libgcjversion 4.1.2 20070502 (Red Hat 4.1.2-12) +
- +
-Pokud chcete submittovaný program pouštět ve svém oblíbeném prostředí (např. nastavení ''PATH''), musíte v obalujícím skriptu příslušné ''.bash*'' načíst. Vždy je ale bezpečnější všude psát plné cesty, než spoléhat na PATH. +
- +
-==== bashrc a podobné nesmí nic vypisovat na konzoli ==== +
- +
-Opsáno z [[http://www.sara.nl/userinfo/lisa/usage/batch/index.html]]. +
- +
-It is important, that the files that are sourced during a login such as .bash_profile .profile .bashrc .login .cshrc don't produce any output when a non-interactive login is done. If they do, changes are that your job will run, but that the batch system is unable to deliver to you the standard output and error files. In that case the status of your job will be 'E' after the job is finished. Here is an example how you can test in a .bash_profile or .bashrc if this is an interactive login:+
  
 +==== Other ====
 +  * You can use environment variables ''$JOB_ID'', ''$JOB_NAME''.
 +  * One job can submit other jobs (but be careful with recursive:-)). A job submitted to the CPU cluster may submit GPU jobs (to the ''qpu.q'' queue).
 +  * It is important, that the files that are sourced during a login such as .bash_profile, .profile, .bashrc, .login etc. don't produce any output when a non-interactive login is done. If they do, changes are that your job will run, but that the batch system is unable to deliver to you the standard output and error files. In that case the status of your job will be 'E' after the job is finished. Here is an example how you can test in a .bash_profile or .bashrc if this is an interactive login:
 <code> <code>
 unset INTERACTIVE unset INTERACTIVE
Line 295: Line 274:
 fi fi
 </code> </code>
- +TODOIs this restriction still true (for our cluster)? E.g. .bash_profile with /net/projects/SGE/user/sge_profile prints info messages on stderr and it is OK.
-==== Jak zjistit, jaké zdroje jsem pro svou úlohu požadoval ==== +
- +
-<code>qstat -j 973884,982737,984029,984030,984031,984034,984036 | grep resource +
-hard resource_list        mem_free=50g +
-hard resource_list:         mem_free=200g +
-hard resource_list:         mem_free=16g +
-hard resource_list:         mem_free=16g +
-hard resource_list:         mem_free=16g +
-hard resource_list:         mem_free=31g</code>+
  

[ Back to the navigation ] [ Back to the content ]