[ 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
grid [2018/06/08 14:26]
vodrazka [ÚFAL Grid Engine (LRC)]
grid [2018/12/17 10:55] (current)
popel [Rules]
Line 1: Line 1:
 ====== ÚFAL Grid Engine (LRC) ====== ====== ÚFAL Grid Engine (LRC) ======
  
-LRC (Linguistic Research Cluster) is a name of ÚFAL'​s computational grid/​cluster,​ which has (as of 2018/06) about 1416 CPU cores (57 servers + 10 submission heads), with a total 6.33 TiB of RAM. It uses [[https://​en.wikipedia.org/​wiki/​Oracle_Grid_Engine|(Sun/​Oracle/​Son of) Grid Engine]] software (SGE) for job scheduling etc. You can submit many computing tasks (jobs) at once, they will be placed in a queue and once a machine (slot) with the required capabilities (e.g. RAM, number of cores) is available, your job will be executed (scheduled) on this machine. This way we can maximize the usefulness of the computing resources and divide it among users in a fair way.+LRC (Linguistic Research Cluster) is a name of ÚFAL'​s computational grid/​cluster,​ which has (as of 2018/06) about 1728 CPU cores (65 servers + 10 submission heads), with a total 7.TiB of RAM. It uses [[https://​en.wikipedia.org/​wiki/​Oracle_Grid_Engine|(Sun/​Oracle/​Son of) Grid Engine]] software (SGE) for job scheduling etc. You can submit many computing tasks (jobs) at once, they will be placed in a queue and once a machine (slot) with the required capabilities (e.g. RAM, number of cores) is available, your job will be executed (scheduled) on this machine. This way we can maximize the usefulness of the computing resources and divide it among users in a fair way.
  
 If you need GPU processing, see a special page about our [[:gpu|GPU cluster called DLL]] (which is actually a subsystem of LRC with an independent queue ''​gpu-ms.q''​). If you need GPU processing, see a special page about our [[:gpu|GPU cluster called DLL]] (which is actually a subsystem of LRC with an independent queue ''​gpu-ms.q''​).
Line 10: Line 10:
 Some machines are at Malá Strana (ground floor, new server room built from Lindat budget), some are at Troja (5 km north-east). Some machines are at Malá Strana (ground floor, new server room built from Lindat budget), some are at Troja (5 km north-east).
 If you need to quickly distinguish which machine is located where, you can use your knowledge of [[https://​en.wikipedia.org/​wiki/​Trojan_War|Trojan war]]-related heroes, ''​qhost -q'',​ or the tables below. ​ If you need to quickly distinguish which machine is located where, you can use your knowledge of [[https://​en.wikipedia.org/​wiki/​Trojan_War|Trojan war]]-related heroes, ''​qhost -q'',​ or the tables below. ​
 +
 +====== AVX instructions ======
  
 ==== Troja (cpu-troja.q) ==== ==== Troja (cpu-troja.q) ====
 ^ Name                ^ CPU type                                  ^ GHz ^cores ^RAM(GB)^ note ^ ^ Name                ^ CPU type                                  ^ GHz ^cores ^RAM(GB)^ note ^
-| achilles[1-8] ​      | Intel(R) Xeon(R) CPU E5-2630 v3           | 2.4 |   31 |  123  |      +| achilles[1-8] ​      | Intel(R) Xeon(R) CPU E5-2630 v3           | 2.4 |   31 |  123  |  AVX enabled ​   ​
-| hector[1-8] ​        | Intel(R) Xeon(R) CPU E5-2630 v3           | 2.4 |   31 |  123  |      +| hector[1-8] ​        | Intel(R) Xeon(R) CPU E5-2630 v3           | 2.4 |   31 |  123  |  AVX enabled ​   ​
-| helena[1-8] ​        | Intel(R) Xeon(R) CPU E5-2630 v3           | 2.4 |   31 |  123  |      +| helena[1-8] ​        | Intel(R) Xeon(R) CPU E5-2630 v3           | 2.4 |   31 |  123  |  AVX enabled ​   ​
-| paris[1-8] ​         | Intel(R) Xeon(R) CPU E5-2630 v3           | 2.4 |   31 |  123  |      |+| paris[1-8] ​         | Intel(R) Xeon(R) CPU E5-2630 v3           | 2.4 |   31 |  123  |  AVX enabled ​   ​|
  
 ==== MS = Malá Strana (cpu-ms.q) ==== ==== MS = Malá Strana (cpu-ms.q) ====
Line 23: Line 25:
 | andromeda[1-13] ​    | AMD Opteron ​                    | 2.8 |    7 |   ​30 ​ |      | | andromeda[1-13] ​    | AMD Opteron ​                    | 2.8 |    7 |   ​30 ​ |      |
 | lucifer[1-10] ​      | Intel(R) Xeon(R) CPU E5620      | 2.4 |   15 |  122  |      | | lucifer[1-10] ​      | Intel(R) Xeon(R) CPU E5620      | 2.4 |   15 |  122  |      |
-| hydra[1-4] ​         | AMD Opteron SSE4 AVX            | 2.6 |   15 |  ​123  ​| ​     |+| hydra[1-4] ​         | AMD Opteron SSE4 AVX            | 2.6 |   15 |  ​122  |   AVX enabled ​  | 
 +| orion[1-8] ​         | Intel(R) Xeon(R) CPU E5-2630 v4 | 2.2 |   39 |  122  |   AVX enabled ​  | 
 +| cosmos ​             | Intel Xeon                      | 2.9 |    7 |  249  |      | 
 +| belzebub ​           | Intel Xeon SSE4 AVX             | 2.9 |   31 |  249  |   AVX enabled ​  | 
 +| iridium ​            | Intel Xeon SSE4                 | 1.9 |   15 |  501  ​| ​     |
  
 Machines from old cluster (do not use!): Machines from old cluster (do not use!):
Line 30: Line 36:
 | fireball[1-10] ​     | Intel Xeon           | 3.0 |    4 |   32 | removed | | fireball[1-10] ​     | Intel Xeon           | 3.0 |    4 |   32 | removed |
 | hyperion[1-9] ​      | Intel Xeon           | 3.0 |    4 |   32 | removed | | hyperion[1-9] ​      | Intel Xeon           | 3.0 |    4 |   32 | removed |
-| orion[1-6] ​         | Intel Xeon           | 2.3 |    8 |   32 | removed | 
-| orion[7-10] ​        | Intel Xeon           | 2.0 |    4 |   32 | removed | 
 | tauri[1-10] ​        | Intel Xeon           | 3.0 |    4 |   32 | removed | | tauri[1-10] ​        | Intel Xeon           | 3.0 |    4 |   32 | removed |
-| cosmos ​             | Intel Xeon           | 2.9 |    8 |  256 | migration pending | +| twister[1,​2] ​       | Intel Xeon SSE4      | 2.4 |    8 |   48 | moved to GPU cluster|
-| belzebub ​           | Intel Xeon SSE4 AVX  | 2.9 |   32 |  256 | migration pending | +
-| iridium ​            | Intel Xeon SSE4      | 1.9 |   16 |  512 | migration pending | +
-| twister[1,​2] ​       | Intel Xeon SSE4      | 2.4 |    8 |   48 | migration pending ​|+
  
 <​html><​!-- <​html><​!--
Line 58: Line 59:
 ^ Name                ^ CPU type                        ^ GHz ^cores ^ RAM(GB) ^ note  ^ ^ Name                ^ CPU type                        ^ GHz ^cores ^ RAM(GB) ^ note  ^
 | sol[1-10] ​          | Intel(R) Xeon(R) CPU E5345      | 2.3 |    7 |   ​31 ​   | you can ssh here and compute or submit jobs | | sol[1-10] ​          | Intel(R) Xeon(R) CPU E5345      | 2.3 |    7 |   ​31 ​   | you can ssh here and compute or submit jobs |
 +| lrc[12] ​            | Intel(R) Xeon(R) CPU E5-2630 v4 | 2.2 |    4 |    4    | you can submit jobs here or monitor job execution - NO COMPUTATION IS ALLOWED HERE !!! |
  
 You can ssh to one of the **sol machines** and submit jobs from here. It is allowed to compute here, which is useful e.g. when you have a script which submits your jobs, but it also collects statistics from the jobs outputs (and possibly submits new jobs conditioned on the statistics). However, the sol machines are relatively slow and may be occupied by your colleagues, so for bigger (longer) tasks, always prefer submission as separate jobs. You can ssh to one of the **sol machines** and submit jobs from here. It is allowed to compute here, which is useful e.g. when you have a script which submits your jobs, but it also collects statistics from the jobs outputs (and possibly submits new jobs conditioned on the statistics). However, the sol machines are relatively slow and may be occupied by your colleagues, so for bigger (longer) tasks, always prefer submission as separate jobs.
Line 80: Line 82:
  
   export LC_ALL=en_US.UTF-8   export LC_ALL=en_US.UTF-8
 +  ​
 +If you are curious about purpose of .bashrc and .bash_profile and you need to know when they should be used you may read [[https://​stackoverflow.com/​a/​415444|this]].
   ​   ​
 ===== Basic usage ===== ===== Basic usage =====
Line 91: Line 95:
   # prepare a shell script describing your task   # prepare a shell script describing your task
 qsub -cwd -j y script.sh Hello World qsub -cwd -j y script.sh Hello World
-  # This submits your job to the default queue, which is currently ''​cpu-ms.q''​.+  # This submits your job to the default queue, which is currently ''​cpu-*.q''​.
   # Usually, there is a free slot, so the job will be scheduled within few seconds.   # Usually, there is a free slot, so the job will be scheduled within few seconds.
   # We have used two handy qsub parameters:   # We have used two handy qsub parameters:
Line 156: Line 160:
   * **act_mem_free** (or amf) is a ÚFAL-specific option, which specifies the real amount of free memory (at the time of scheduling). You can specify it when submitting a job and it will be scheduled to a machine with at least this amount of memory free. In an ideal world, where no jobs are exceeding their ''​mem_free''​ requirements,​ we would not need this options. However, in real world it is recommended to use this option with the same value as ''​mem_free''​ to protect your job from failing with out-of-memory error (because of naughty jobs of other users).   * **act_mem_free** (or amf) is a ÚFAL-specific option, which specifies the real amount of free memory (at the time of scheduling). You can specify it when submitting a job and it will be scheduled to a machine with at least this amount of memory free. In an ideal world, where no jobs are exceeding their ''​mem_free''​ requirements,​ we would not need this options. However, in real world it is recommended to use this option with the same value as ''​mem_free''​ to protect your job from failing with out-of-memory error (because of naughty jobs of other users).
   * **h_vmem** is equivalent to setting ''​ulimit -v'',​ i.e. it is a hard limit on the size of virtual memory (see RLIMIT_AS in ''​man setrlimit''​). If your job exceeds this limit, memory allocation fails (i.e., malloc or mmap will return NULL), and your job will probably crash on SIGSEGV. TODO: according to ''​man queue_conf'',​ the job is killed with SIGKILL, not with SIGSEGV. Note that ''​h_vmem''​ specifies the maximal size of **allocated_memory,​ not used_memory**,​ in other words it is the VIRT column in ''​top'',​ not the RES column. SGE does not use this parameter in any other way. Notably, job scheduling is not affected by this parameter and therefore there is no guarantee that there will be this amount of memory on the chosen machine. The problem is that some programs (e.g. Java with the default setting) allocate much more (virtual) memory than they actually use in the end. If we want to be ultra conservative,​ we should set ''​h_vmem''​ to the same value as ''​mem_free''​. If we want to be only moderately conservative,​ we should specify something like h_vmem=1.5*mem_free,​ because some jobs will not use the whole mem_free requested, but still our job will be killed if it allocated much more than declared. The default effectively means that your job has no limits.   * **h_vmem** is equivalent to setting ''​ulimit -v'',​ i.e. it is a hard limit on the size of virtual memory (see RLIMIT_AS in ''​man setrlimit''​). If your job exceeds this limit, memory allocation fails (i.e., malloc or mmap will return NULL), and your job will probably crash on SIGSEGV. TODO: according to ''​man queue_conf'',​ the job is killed with SIGKILL, not with SIGSEGV. Note that ''​h_vmem''​ specifies the maximal size of **allocated_memory,​ not used_memory**,​ in other words it is the VIRT column in ''​top'',​ not the RES column. SGE does not use this parameter in any other way. Notably, job scheduling is not affected by this parameter and therefore there is no guarantee that there will be this amount of memory on the chosen machine. The problem is that some programs (e.g. Java with the default setting) allocate much more (virtual) memory than they actually use in the end. If we want to be ultra conservative,​ we should set ''​h_vmem''​ to the same value as ''​mem_free''​. If we want to be only moderately conservative,​ we should specify something like h_vmem=1.5*mem_free,​ because some jobs will not use the whole mem_free requested, but still our job will be killed if it allocated much more than declared. The default effectively means that your job has no limits.
 +    * For GPU jobs, it is usually better to use **h_data** instead of **h_vmem**. CUDA driver allocates a lot of "​unused"​ virtual memory (tens of GB per card), which is counted in ''​h_vmem'',​ but not in ''​h_data''​. All usual allocations (''​malloc'',​ ''​new'',​ Python allocations) seem to be included in ''​h_data''​.
   * It is recommended to **profile your task first** (see [[#​profiling]] below), so you can estimate reasonable memory requirements before submitting many jobs with the same task (varying in parameters which do not affect memory consumption). So for the first time, declare mem_free with much more memory than expected and ssh to a given machine and check ''​htop''​ (sum all processes of your job) or (if the job is done quickly) check the epilog. When running other jobs of this type, set ''​mem_free''​ (and ''​act_mem_free''​ and ''​h_vmem''​) so you are not wasting resources, but still have some reserve.   * It is recommended to **profile your task first** (see [[#​profiling]] below), so you can estimate reasonable memory requirements before submitting many jobs with the same task (varying in parameters which do not affect memory consumption). So for the first time, declare mem_free with much more memory than expected and ssh to a given machine and check ''​htop''​ (sum all processes of your job) or (if the job is done quickly) check the epilog. When running other jobs of this type, set ''​mem_free''​ (and ''​act_mem_free''​ and ''​h_vmem''​) so you are not wasting resources, but still have some reserve.
   * **s_vmem** is similar to ''​h_vmem'',​ but instead of SIGSEGV/​SIGKILL,​ the job is sent a SIGXCPU signal which can be caught by the job and exit gracefully before it is killed. So if you need it, set ''​s_vmem''​ to a lower value than ''​h_vmem''​ and implement SIGXCPU handling and cleanup.   * **s_vmem** is similar to ''​h_vmem'',​ but instead of SIGSEGV/​SIGKILL,​ the job is sent a SIGXCPU signal which can be caught by the job and exit gracefully before it is killed. So if you need it, set ''​s_vmem''​ to a lower value than ''​h_vmem''​ and implement SIGXCPU handling and cleanup.
Line 172: Line 177:
 See ''​man complex''​ (run it on lrc or sol machines) for a list of possible resources you may require (in addition to ''​mem_free''​ etc. discussed above). See ''​man complex''​ (run it on lrc or sol machines) for a list of possible resources you may require (in addition to ''​mem_free''​ etc. discussed above).
  
-''​qsub **-p** -99''​ +''​qsub **-p** -200''​ 
-Define a priority of your job as a number between -1024 and 0. Only SGE admins may use a number higher than 0. In January 2018, we changed the default to -100 (it used to be 0). SGE uses the priority to decide when to start which pending job in the queue (it computes a real number called ''​prior'',​ which is reported in ''​qstat'',​ which grows as the job is waiting in the queue). Note that once a job is started, you cannot "​unschedule"​ it, so from that moment on, it is irrelevant what was its priority. You can ask for a higher priority (-99...0) if your job is urgent and/or will finish soon and you want to skip your colleagues'​ jobs in the queue. You should ask for lower priority (-1024..-101) if you submit many jobs at once or if the jobs are not urgent.+Define a priority of your job as a number between -1024 and 0. Only SGE admins may use a number higher than 0. In January 2018, we changed the default to -100 (it used to be 0). Please, do not use priority between -99 and 0 for jobs taking longer than a few hours, unless it is absolutely necessary for a deadline. In that case, please notify other GPU users. You should ask for lower priority (-1024..-101) if you submit many jobs at once or if the jobs are not urgent. SGE uses the priority to decide when to start which pending job in the queue (it computes a real number called ''​prior'',​ which is reported in ''​qstat'',​ which grows as the job is waiting in the queue). Note that once a job is started, you cannot "​unschedule"​ it, so from that moment on, it is irrelevant what was its priority.
  
 ''​qsub **-o** LOG.stdout **-e** LOG.stderr''​ ''​qsub **-o** LOG.stdout **-e** LOG.stderr''​
Line 189: Line 194:
 ''​qsub **-M** popel@ufal.mff.cuni.cz,​rosa@ufal.mff.cuni.cz **-m** beas''​ ''​qsub **-M** popel@ufal.mff.cuni.cz,​rosa@ufal.mff.cuni.cz **-m** beas''​
 Specify the emails where you want to be notified when the job has been **b** started, **e** ended, **a** aborted or rescheduled,​ **s** suspended. Specify the emails where you want to be notified when the job has been **b** started, **e** ended, **a** aborted or rescheduled,​ **s** suspended.
 +The default is now ''​-m a''​ and the default email address is forwarded to you (so there is no need to use ''​-M''​). You can use ''​-m n''​ to override the defaults and send no emails.
  
 ''​qsub **-hold_jid** 121144,​121145''​ (or ''​qsub **-hold_jid** get_src.sh,​get_tgt.sh''​) ''​qsub **-hold_jid** 121144,​121145''​ (or ''​qsub **-hold_jid** get_src.sh,​get_tgt.sh''​)
Line 215: Line 221:
  
 ''​**qalter**''​ ''​**qalter**''​
-You can change some properties of already submitted jobs, which are still waiting in the queue (//​pending//​).+You can change some properties of already submitted jobs (both waiting in the queue and running). Changeable properties are listed in ''​man qsub''​.
  
 ''​**man** qsub qstat qalter qhold queue_conf sge_types complex''​ ''​**man** qsub qstat qalter qhold queue_conf sge_types complex''​
Line 261: Line 267:
  
 and you execute it now simply with ''​qsub script.sh''​. and you execute it now simply with ''​qsub script.sh''​.
 +
 +=== ~/​.sge_request ===
 +
 +You can change the defaults for any option by creating a personal configuration file ''​~/​.sge_request''​. For example, you can add there a line ''​-m n'',​ so you will get no email notifications (unless overridden from the command line or in-script options).
  
 === Array jobs === === Array jobs ===
Line 283: Line 293:
 === Ssh to random sol === === Ssh to random sol ===
 Ondřej Bojar suggests to add the following alias to your .bashrc (cf. [[#​sshcwd]]):​ Ondřej Bojar suggests to add the following alias to your .bashrc (cf. [[#​sshcwd]]):​
-<​code>​alias cluster='​comp=$(($RANDOM ​/4095 +1)); ssh -o "​StrictHostKeyChecking no" sol$comp'</​code>​+<​code>​alias cluster='​comp=$(( ​(RANDOM ​% 10) +1)); ssh -o "​StrictHostKeyChecking no" sol$comp'</​code>​
  
 ===== Job monitoring ===== ===== Job monitoring =====
Line 289: Line 299:
   * ''​qstat [-u user]''​ -- print a list of running/​waiting jobs of a given user   * ''​qstat [-u user]''​ -- print a list of running/​waiting jobs of a given user
   * ''​qhost''​ -- print available/​total resources   * ''​qhost''​ -- print available/​total resources
-  * ''/​SGE/​REPORTER/​LRC-UFAL/​bin/​lrc_users_real_mem_usage -u user -w''​ -- current memory usage of a given user +  ​* ''​qacct -j job_id''​ -- print info even for ended job (for which ''​qstat -j job_id''​ does not work). See ''​man qacct''​ for more. 
-  * ''/​SGE/​REPORTER/​LRC-UFAL/​bin/​lrc_users_limits_requested -w''​ -- required resources of all users + 
-  * ''/​SGE/​REPORTER/​LRC-UFAL/​bin/​lrc_nodes_meminfo''​ -- memory usage of all nodes+  ​* ''/​opt/LRC/​REPORTER/​LRC-UFAL/​bin/​lrc_users_real_mem_usage -u user -w''​ -- current memory usage of a given user 
 +  * ''/​opt/LRC/​REPORTER/​LRC-UFAL/​bin/​lrc_users_limits_requested -w''​ -- required resources of all users 
 +  * ''/​opt/LRC/​REPORTER/​LRC-UFAL/​bin/​lrc_nodes_meminfo''​ -- memory usage of all nodes
     * mem_total:     * mem_total:
     * mem_free: total memory minus reserved memory (using ''​qsub -l mem_free''​) for each node     * mem_free: total memory minus reserved memory (using ''​qsub -l mem_free''​) for each node
     * act_mem_free:​ really free memory     * act_mem_free:​ really free memory
     * mem_used: really used memory     * mem_used: really used memory
-  * ''/​SGE/​REPORTER/​LRC-UFAL/​bin/​lrc_state_overview''​ -- overall summary (with per-user stats for users with running jobs) +  * ''/​opt/LRC/​REPORTER/​LRC-UFAL/​bin/​lrc_state_overview''​ -- overall summary (with per-user stats for users with running jobs) 
-  * ''​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+  * ''​cat /opt/LRC/​REPORTER/​LRC-UFAL/​stats/​userlist.weight''​ -- all users sorted according to their activity (number of submitted jobs × their average duration), updated each night 
   * [[http://​ufaladm2/​munin/​ufal.hide.ms.mff.cuni.cz/​lrc-headnode.ufal.hide.ms.mff.cuni.cz/​index.html|Munin:​ graph of cluster usage by day and user]] and  [[http://​ufaladm2/​munin/​ufal.hide.ms.mff.cuni.cz/​apophis.ufal.hide.ms.mff.cuni.cz/​index.html|Munin monitoring of Apophis disk server]] (both accessible only from ÚFAL network)   * [[http://​ufaladm2/​munin/​ufal.hide.ms.mff.cuni.cz/​lrc-headnode.ufal.hide.ms.mff.cuni.cz/​index.html|Munin:​ graph of cluster usage by day and user]] and  [[http://​ufaladm2/​munin/​ufal.hide.ms.mff.cuni.cz/​apophis.ufal.hide.ms.mff.cuni.cz/​index.html|Munin monitoring of Apophis disk server]] (both accessible only from ÚFAL network)
  

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