{"id":240,"date":"2022-02-04T14:44:55","date_gmt":"2022-02-04T13:44:55","guid":{"rendered":"https:\/\/www.meb.ki.se\/sites\/meb-it\/?page_id=240"},"modified":"2022-02-04T14:44:56","modified_gmt":"2022-02-04T13:44:56","slug":"usage-guideline-for-computing-servers-at-meb","status":"publish","type":"page","link":"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/","title":{"rendered":"Usage guideline for computing servers at MEB"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\"><\/h1>\n\n\n\n<p>Version: 1.9<br>Date: 2022-02-04<br>Authors: Paul Dickman, Vivekananda Lanka, Henric Winell, Rikard \u00d6berg<br>Maintainer: <a href=\"http:\/\/intra.meb.ki.se\/About%20MEB\/ITdep\/maintenance_management\/SitePages\/Analysis.aspx\">[Object Analysis]<\/a><\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69e1acda5a7d8\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69e1acda5a7d8\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#Introduction\" >Introduction<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#Getting_an_account\" >Getting an account<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#Usage_guideline\" >Usage guideline<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#Application_behavior\" >Application behavior<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#SAS\" >SAS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#Stata\" >Stata<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#R\" >R<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#Other_applications\" >Other applications<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#How_to_use_the_servers\" >How to use the servers<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#Connection\" >Connection<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#File_systems\" >File systems<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#Home_folders\" >Home folders<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#Scratch\" >Scratch<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#SASWORK\" >SASWORK<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#STATATMP\" >STATATMP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#Project_folders\" >Project folders<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#Windows_drives_Z_and_P\" >Windows drives Z: and P:<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#File_creation\" >File creation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#File_transfer\" >File transfer<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#Running_programs\" >Running programs<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#tmux\" >tmux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#SLURM\" >SLURM<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#Clean_up\" >Clean up<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#Things_you_may_find_useful_when_working_on_the_servers\" >Things you may find useful when working on the servers<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#Some_UNIX_commands\" >Some UNIX commands<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/usage-guideline-for-computing-servers-at-meb\/#Example_output_from_top\" >Example output from top<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h3 class=\"wp-block-heading\" id=\"introduction\"><span class=\"ez-toc-section\" id=\"Introduction\"><\/span>Introduction<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Computing servers offer a higher degree of parallelism and larger memory for computationally intensive tasks &#8212; but not necessarily higher speed &#8212; than standard PCs. This document contains the recommended procedures for computing server usage at MEB.<\/p>\n\n\n\n<p>All servers are currently running under the Red Hat Enterprise Linux 7.9 operating system.<\/p>\n\n\n\n<p>Matrix (matrix.meb.ki.se) is a compute server dedicated to applications SAS and Stata. It has 56 CPU threads, 768 GB of RAM and a very fast I\/O disk card used for local temporary storage.<\/p>\n\n\n\n<p>Vector (vector.meb.ki.se) is a compute server dedicated to computationally intensive operations with applications like R, PLINK, IMPUTE2, SNPTEST etc. (the complete list is on MEB IntraWeb). It has 144 CPU threads and 1.5 TB of RAM.<br>Scalar (scalar&lt;1-4&gt;.meb.ki.se) is a set of SLURM compute nodes using Vector as the login node. All nodes have the same applications as Vector. Each node has 40 CPU threads and 320 GB of RAM.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"getting-an-account\"><span class=\"ez-toc-section\" id=\"Getting_an_account\"><\/span>Getting an account<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>If you believe that your project may benefit from running applications on the computing servers, fill out an account request on the MEB IntraWeb. For futrther information, please contact the Analysis Object Maintenance Manager (currently Henric Winell).<br>The user credentials for the computing servers are the same as the MS Windows login.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"usage-guideline\"><span class=\"ez-toc-section\" id=\"Usage_guideline\"><\/span>Usage guideline<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>In keeping with the MEB philosophy of &#8220;<em>freedom with responsibility<\/em>&#8220;, we have not implemented centralized restrictions on CPU hours or memory usage. A consequence of this approach is that the <em>users<\/em> themselves must be aware of the amount of system resources in use and structure their work so that everyone can use the shared resources effectively.<\/p>\n\n\n\n<p>All users of these resources are required to use the servers efficiently and show maximum consideration for other users. This includes, but is not limited to<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Reading this document before starting jobs on the servers.<\/li><li>Checking system availability, CPU load and RAM usage before starting new jobs.<\/li><li>To avoid resource conflicts, notify other users through <a href=\"mailto:meb-matrix@emaillist.ki.se\">meb-matrix@emaillist.ki.se<\/a> and <a href=\"mailto:meb-vector@emaillist.ki.se\">meb-vector@emaillist.ki.se<\/a>, respectively, well ahead of time when planning to use the servers during nights and weekends.<\/li><li>It is recommended to notify other users if you plan to use more than10 threads for an <em>extended<\/em> period of time (8+ hours).<\/li><li>It is recommended to notify other users if you plan to use more than 100 GB of RAM for an <em>extended<\/em> period of time (8+ hours).<\/li><li>It is recommended to use the SLURM queue system from Vector to handle long running jobs (see the section on SLURM in this guideline for more information).<\/li><li>Remove files that are no longer needed.<\/li><li>Disconnect\/logout when not using the server for computations. This applies to, e.g., SSH or VDI connections as well as obsolete screen or #tmux sessions (see the section on #tmux in this guideline for more information).<\/li><li>Large file or storage (100+ GB) requirements need to be planned well ahead of time and together with MEB IT Support.<\/li><\/ol>\n\n\n\n<p>If the system stability is compromised, MEB IT Support may <strong>stop processes<\/strong> and <strong>remove files<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"application-behavior\"><span class=\"ez-toc-section\" id=\"Application_behavior\"><\/span>Application behavior<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"sas\"><span class=\"ez-toc-section\" id=\"SAS\"><\/span>SAS<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>SAS is I\/O intensive and operates against the file system SASWORK. This may require users to monitor SASWORK, which has a quota limit of 150 GB per user. The quota is to avoid SASWORK to become full for all other SAS users. CPU and RAM usage is usually not an issue when working with SAS.<\/p>\n\n\n\n<p>Read more about how to use SAS and for tips on efficient programming <a href=\"http:\/\/intra.meb.ki.se\/About%20MEB\/wiki\/Informative%20Documents\/Working%20on%20SAS%20at%20MEB(Matrix).pdf\">here<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"stata\"><span class=\"ez-toc-section\" id=\"Stata\"><\/span>Stata<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Stata\/MP is both CPU and RAM intensive, but this is usually not an issue if you are running a single instance. Running several instances require you to monitor CPU and RAM usage.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"r\"><span class=\"ez-toc-section\" id=\"R\"><\/span>R<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>R is CPU intensive and can allocate large amounts of RAM. This is particularly the case for parallel operations using non-shared memory, e.g., when using <code>parallel::parLapply()<\/code> on a local PSOCK &#8220;cluster&#8221;. We therefore recommend a shared-memory approach, e.g., by setting up a local FORK &#8220;cluster&#8221; for use with <code>parallel::parLapply()<\/code> or using <code>parallel::mclapply()<\/code>. See package <code>parallel<\/code>&#8216;s documentation for more information on parallel operations in R.<\/p>\n\n\n\n<p>Starting with R version 3.6.1, support for add-on packages requiring C++14 or higher has been added. However, this is <strong>not<\/strong> enabled by default. To start R with the support enabled, issue <code>scl enable devtoolset-8 R<\/code> at the Bash prompt. To permanently enable the support in the Bash shell, add <code>source scl_source enable devtoolset-8<\/code> to your <code>~\/.bashrc<\/code> file, log out and log in again.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"other-applications\"><span class=\"ez-toc-section\" id=\"Other_applications\"><\/span>Other applications<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>I\/O intensive applications or, e.g., repeated processing of large files during computations, may benefit if used under the scratch file system located at \/scratch\/tmp[^1]. This is due to the home (\/nfs\/home) and project folders (\/nfs\/projects) being situated on the NFS storage system, which runs slower (and generates a lot of backup traffic during nights). However, note that \/scratch\/tmp is intended for <em>temporary<\/em> storage only and that files and folders older than five days will be deleted automatically.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-use-the-servers\"><span class=\"ez-toc-section\" id=\"How_to_use_the_servers\"><\/span>How to use the servers<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"connection\"><span class=\"ez-toc-section\" id=\"Connection\"><\/span>Connection<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Connect\/logon to the servers is made through a secure shell (SSH) connection. Under MS Windows, the current recommendation is to use KiTTY as the SSH client together with the WinSCP file manager for drag-and-drop of files and folders. Under macOS, an SSH connection can be started in a terminal window.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"file-systems\"><span class=\"ez-toc-section\" id=\"File_systems\"><\/span>File systems<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"home-folders\"><span class=\"ez-toc-section\" id=\"Home_folders\"><\/span>Home folders<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Home folders are located under \/nfs\/home\/\\ and have quota limits of 100 GB per user. The home folders are <em>shared<\/em> between the servers.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"scratch\"><span class=\"ez-toc-section\" id=\"Scratch\"><\/span>Scratch<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Scratch is a local file system intended for I\/O intensive temporary storage. Users need to create their own temporary folders under <code>\/scratch\/tmp\/&lt;username&gt;<\/code>.<\/p>\n\n\n\n<p>Files and folders on the scratch disk will be automatically <em>deleted<\/em> when their modification time exceeds five days. The scratch file system has a quota limit of 500 GB per user.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"saswork\"><span class=\"ez-toc-section\" id=\"SASWORK\"><\/span>SASWORK<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>SASWORK is a fast local temporary space intended for SAS and is therefore only available on Matrix. The <code>\/saswork\/tmp<\/code> file system has a quota limit of 150 GB per user. For SAS users requiring more disk space, we recommend using the scratch disk (possibly in combination with SASWORK if necessary).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"statatmp\"><span class=\"ez-toc-section\" id=\"STATATMP\"><\/span>STATATMP<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Analogously to the above, STATATMP is a fast local temporary space intended for Stata.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"project-folders\"><span class=\"ez-toc-section\" id=\"Project_folders\"><\/span>Project folders<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Project folders are located under \/nfs\/projects and contain folders that are typically shared between several researchers working in cooperation. Project folders have quota limits between 10 GB-1 TB and are <em>shared<\/em> between the servers.<\/p>\n\n\n\n<p>Some projects, usually when exceeding 1 TB, have their own file systems directly under <code>\/nfs\/&lt;projectname&gt;<\/code>. Group access to specific project folders are granted by their respective owners.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"windows-drives-z-and-p\"><span class=\"ez-toc-section\" id=\"Windows_drives_Z_and_P\"><\/span>Windows drives Z: and P:<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>The MS Windows drives Z: and P: can be accessed via <code>\/cifs\/Z<\/code> and <code>\/cifs\/P<\/code>. However, in order to do so you may be required to initiate a so-called Kerberos ticket. This is done by evoking the UNIX command <code>kinit<\/code>; if you have not setup GSSAPI integration in your favorite SSH client before logon to the server, provide your password when prompted. Kerberos tickets can be checked by issuing the UNIX command <code>klist<\/code>.<\/p>\n\n\n\n<p>However, do not work directly against these folders since the Kerberos ticket can expire during job execution causing Z: and P: to be inaccessible. Instead, copy the desired files and folders to the scratch disk (and back, if necessary, when the job is done).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"file-creation\"><span class=\"ez-toc-section\" id=\"File_creation\"><\/span>File creation<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>All program and data files should be prepared on your local computer if possible, including testing and debugging with reduced data size.<\/p>\n\n\n\n<p><strong>Please, do not experiment on the servers!<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"file-transfer\"><span class=\"ez-toc-section\" id=\"File_transfer\"><\/span>File transfer<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Files can be transferred to or from the server via the secure file transfer protocol (SFTP). If desired, this can be done through a graphical user interface, e.g., WinSCP under MS Windows.<\/p>\n\n\n\n<p>Depending on your operating system and setup, command-line tools, like sftp and scp, can also be used.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"running-programs\"><span class=\"ez-toc-section\" id=\"Running_programs\"><\/span>Running programs<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Once all data and command files have been copied to the server, the user needs to start their program from the server&#8217;s command line. This is done via the SSH protocol. Under MS Windows, we (again) recommend using KiTTY.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"tmux\"><span class=\"ez-toc-section\" id=\"tmux\"><\/span>tmux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>tmux is a <strong><span style=\"text-decoration: underline;\">t<\/span><\/strong>erminal <strong><span style=\"text-decoration: underline;\">mu<\/span><\/strong>ltiple<strong><span style=\"text-decoration: underline;\">x<\/span><\/strong>er, i.e., a program that can be used to run applications interactively while being able to disconnect from the server and resume the session at another time. However, it is important that tmux sessions are ended when they are no longer useful, e.g., when the job has been finished.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Start the tmux session via UNIX command <code>tmux<\/code>.<\/li><li>Run your program.<\/li><li>Detach from tmux by pressing <code>Ctrl + b d<\/code>.<\/li><li>Reconnect to tmux using <code>tmux attach<\/code>.<\/li><li>To end a tmux session permanently press <code>Ctrl + d<\/code> while in tmux.<\/li><li>Check if you have ongoing tmux sessions with <code>tmux ls<\/code>.<\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"slurm\"><span class=\"ez-toc-section\" id=\"SLURM\"><\/span>SLURM<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The SLURM workload manager can submit jobs to a queue that performs the jobs on the Scalar nodes instead of interactively on the Vector node. The queue system will make sure to run the jobs without overloading the system running too many jobs simultaneously regarding CPU threads memory and ends jobs that are running to long time. The queue system does not know how many CPU threads your job eventually will use for the parallelization \/ subtasks so make sure to specify the number of CPU threads anticipated.<\/p>\n\n\n\n<p>Example to submit a job a simple one-task job: Create a shell script &lt;filename&gt;.sh with the code you want to execute. For example,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">#!\/bin\/bash\necho \"hello world\"\nsleep 60<\/code><\/pre>\n\n\n\n<p>Submit &lt;filename&gt;.sh to the queue using<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sbatch &lt;filename&gt;.sh<\/code><\/pre>\n\n\n\n<p>The default time and memory limits per job are currently set to 240 minutes and 4.8 GB, respectively. To submit a job that you know will use a maximum of 4 CPU threads and 10 GB of RAM and will be finished within max 8 hours (480 minutes)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sbatch --ntasks 4 --time 480 --mem 10000 &lt;filename&gt;.sh<\/code><\/pre>\n\n\n\n<p>To submit jobs on specific SLURM nodes add <code>--nodelist &lt;nodename(s)&gt;<\/code>. Submitting jobs excluding specific SLURM nodes can be done by adding <code>--exclude &lt;nodename(s)&gt;<\/code>. For example,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sbatch --nodelist scalar3,scalar4 &lt;filename&gt;.sh<\/code><\/pre>\n\n\n\n<p>will run the jobs on the scalar3 and scalar4 nodes. To run interactively on one of the SLURM nodes use <code>srun<\/code>. For example,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">srun --nodelist scalar4 --pty bash<\/code><\/pre>\n\n\n\n<p>You can also specify the sbatch information within the shellscript using example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">#SBATCH --ntasks 4\n#SBATCH --time 480\n#SBATCH --mem 10000\n#SBATCH --nodelist scalar3,scalar4<\/code><\/pre>\n\n\n\n<p>To see state of the SLURM system run <code>sinfo<\/code>.<\/p>\n\n\n\n<p>To see the SLURM job queue run <code>squeue<\/code>.<\/p>\n\n\n\n<p>To see information about a job run <code>scontrol show job &lt;jobid&gt;<\/code>.<\/p>\n\n\n\n<p>To cancel running jobs use <code>scancel &lt;jobid&gt;<\/code>.<\/p>\n\n\n\n<p>To cancel all your jobs (running and pending) use <code>scancel --user &lt;username&gt;<\/code>.<\/p>\n\n\n\n<p>The Scalar nodes have access to the same NFS areas (\/nfs) as Vector. They also have a \/scratch\/tmp area but it is not shared with Vector&#8217;s \/scratch\/tmp. Hence, you need to create your own folder\/files there from within your sbatch script.<\/p>\n\n\n\n<p>If you use the SLURM queue you have to keep in mind that \/scratch\/tmp is local to each of the Scalar nodes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"clean-up\"><span class=\"ez-toc-section\" id=\"Clean_up\"><\/span>Clean up<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Transfer the results to your local computer via, e.g., SFTP as above, and delete the files no longer needed on the server.<\/p>\n\n\n\n<p>For long-term storage of files, we recommend the MS Windows fileserver (P: or Z: drive). Ask MEB IT Support if more space is required on the fileserver.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"things-you-may-find-useful-when-working-on-the-servers\"><span class=\"ez-toc-section\" id=\"Things_you_may_find_useful_when_working_on_the_servers\"><\/span>Things you may find useful when working on the servers<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"some-unix-commands\"><span class=\"ez-toc-section\" id=\"Some_UNIX_commands\"><\/span>Some UNIX commands<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><code>htop<\/code> displays all user processes (sorted by CPU usage by default). Press<br>h for help or q to quit.<\/p>\n\n\n\n<p>Pressing M (i.e., <code>Shift + m<\/code> ) while in htop will sort by memory usage per process. Analogously, pressing P (i.e., <code>Shift + p<\/code> ) will sort by CPU usage.<\/p>\n\n\n\n<p><code>htop --u &lt;username&gt;<\/code> displays only processes belonging to \\ in the same way as above.<\/p>\n\n\n\n<p>Alternatively, the older <code>top<\/code> can be used instead of <code>htop<\/code>. See below for an example running top.<\/p>\n\n\n\n<p><code>du --hs ~<\/code> will report how much space your home folder is occupying.<\/p>\n\n\n\n<p><code>du --hs \/&lt;foldername&gt;\/*<\/code> will report how much disk space files and folders occupy within \\.<\/p>\n\n\n\n<p><code>df --h<\/code> will report file system usage, e.g., how large and how full the <code>\/nfs\/home<\/code>, <code>\/saswork<\/code> and <code>\/nfs\/projects<\/code> file systems are.<\/p>\n\n\n\n<p><code>uptime<\/code> can be used to check the current load averages on the system for the past 1, 5 and 15 minutes.<\/p>\n\n\n\n<p><code>free --g<\/code> can be used to check the total amount of free and used RAM in GB.<\/p>\n\n\n\n<p><code>kill &lt;processid&gt;<\/code> can be used to stop a process; the process id number can be found in the PID column in top. Note that processes can also be killed from top and htop.<\/p>\n\n\n\n<p>If you want to redirect e-mail that you receive on the server (e.g., about finished batch jobs) to a different e-mail address, you can change the address in the <code>.forward<\/code> file in your home directory. You can change this file either in a text editor, e.g., <code>vi<\/code>, or directly from the command line via the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">echo firstname.lastname\\@ki.se &gt; ~\/.forward<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-output-from-top\"><span class=\"ez-toc-section\" id=\"Example_output_from_top\"><\/span>Example output from top<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"599\" height=\"540\" src=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/wp-content\/uploads\/sites\/12\/2022\/02\/top.png\" alt=\"a top window\" class=\"wp-image-245\" srcset=\"https:\/\/www.meb.ki.se\/sites\/meb-it\/wp-content\/uploads\/sites\/12\/2022\/02\/top.png 599w, https:\/\/www.meb.ki.se\/sites\/meb-it\/wp-content\/uploads\/sites\/12\/2022\/02\/top-300x270.png 300w\" sizes=\"auto, (max-width: 599px) 100vw, 599px\" \/><figcaption>A top window @ Linux<\/figcaption><\/figure>\n\n\n\n<p>In the upper right corner, the load average on the server for the past 1, 5 and 15 minutes is shown. In this example, we can see that the server has been using 20.74 threads over the past minute. So, if Matrix<br>and Vector have average loads of 56 and 144, respectively, all CPU threads are fully utilized. <strong>No new jobs should be started when the load average reach 52 and 140 threads, respectively.<\/strong><\/p>\n\n\n\n<p>The Mem: row shows the total amount of memory used and how much is free in kB, so in this example 42 GB is free.<\/p>\n\n\n\n<p>The PID column shows the process identity number. A process can be stopped from the command line with kill \\. The %CPU column shows the percentage CPU load per process that are currently being executed and who is executing it by looking in the USER column. The RES and %MEM columns show the actual and percentage amount of RAM, respectively, each process is consuming (g = GB, m = MB); note that processes consume RAM even if they sleep, i.e., when their CPU utilization is 0 %.<\/p>\n\n\n\n<p>In this example, user1 is running a single Stata\/MP process using four CPU threads (%CPU 399.6) and 56 MB RAM, user2 runs an R process using a single thread (%CPU 100.0) and 1.4 GB RAM, and user3 runs fifteen R processes (each %CPU 100.0) and using a total of 96 GB RAM).<\/p>\n\n\n\n<p>[^1]: Each user is required to create their personal folder on scratch,<br>i.e., <code>\/scratch\/tmp\/\\&lt;username&gt;<\/code>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Version: 1.9Date: 2022-02-04Authors: Paul Dickman, Vivekananda Lanka, Henric Winell, Rikard \u00d6bergMaintainer: [Object Analysis] Introduction Computing servers offer a higher degree of parallelism and larger memory for computationally intensive tasks &#8212; but not necessarily higher speed &#8212; than standard PCs. This document contains the recommended procedures for computing server usage at MEB. All servers are currently [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-240","page","type-page","status-publish","hentry"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.meb.ki.se\/sites\/meb-it\/wp-json\/wp\/v2\/pages\/240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.meb.ki.se\/sites\/meb-it\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.meb.ki.se\/sites\/meb-it\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.meb.ki.se\/sites\/meb-it\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.meb.ki.se\/sites\/meb-it\/wp-json\/wp\/v2\/comments?post=240"}],"version-history":[{"count":5,"href":"https:\/\/www.meb.ki.se\/sites\/meb-it\/wp-json\/wp\/v2\/pages\/240\/revisions"}],"predecessor-version":[{"id":246,"href":"https:\/\/www.meb.ki.se\/sites\/meb-it\/wp-json\/wp\/v2\/pages\/240\/revisions\/246"}],"wp:attachment":[{"href":"https:\/\/www.meb.ki.se\/sites\/meb-it\/wp-json\/wp\/v2\/media?parent=240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}