{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"","title":"Home","text":""},{"location":"#hpce-user-documentation","title":"HPCE User Documentation","text":"
The HPCE group is part of the PSI Center for Scientific Computing, Theory and Data at Paul Scherrer Institute. It provides a range of HPC services for PSI researchers, staff, and external collaborators, such as the Merlin series of HPC clusters. Furthermore the HPCE group engages in research activities on technologies (data analysis and machine learning technologies) used on these systems.
"},{"location":"cscs-userlab/introduction/","title":"PSI HPC@CSCS","text":""},{"location":"cscs-userlab/introduction/#psi-hpccscs","title":"PSI HPC@CSCS","text":"PSI has a long standing collaboration with CSCS for offering high end HPC resources to PSI projects. PSI had co-invested in CSCS' initial Cray XT3 supercomputer Horizon in 2005 and we continue to procure a share on the CSCS flagship systems.
The share is intended for projects that by their nature cannot profit from applying for regular CSCS user lab allocation schemes..
We can also help PSI groups to procure additional resources based on the PSI conditions - please contact us in such a case.
"},{"location":"cscs-userlab/introduction/#yearly-survey-for-requesting-a-project-on-the-psi-share","title":"Yearly survey for requesting a project on the PSI share","text":"At the end of each year we prepare a survey process and notify all subscribed users of the specialized PSI HPC@CSCS mailing list (see below) and the merlin cluster lists, to enter their next year resource requests. Projects receive resources in the form of allocations over the four quarters of the following year.
The projects requests get reviewed and requests may get adapted to fit into the available capacity.
The survey is done through ServiceNow, please navigate to Home > Service Catalog > Research Computing > Apply for computing resources at CSCS and submit the form.
Applications will be reviewed and the final resource allocations, in case of oversubscription, will be arbitrated by a panel within CSD.
"},{"location":"cscs-userlab/introduction/#instructions-for-filling-out-the-2026-survey","title":"Instructions for filling out the 2026 survey","text":"For 2025 we can offer access to CSCS Alps Eiger (CPU multicore) and Daint (GPU) systems.
This document shows how to transfer data between PSI and CSCS by using a Linux workstation.
"},{"location":"cscs-userlab/transfer-data/#preparing-ssh-configuration","title":"Preparing SSH configuration","text":"If the directory .ssh does not exist in your home directory, create it with 0700 permissions:
mkdir ~/.ssh\nchmod 0700 ~/.ssh\n Then, if it does not exist, create a new file .ssh/config, otherwise add the following lines to the already existing file, by replacing $cscs_accountname by your CSCS username:
Host daint.cscs.ch\n Compression yes\n ProxyJump ela.cscs.ch\nHost *.cscs.ch\n User $cscs_accountname\n"},{"location":"cscs-userlab/transfer-data/#advanced-ssh-configuration","title":"Advanced SSH configuration","text":"There are many different SSH settings available which would allow advanced configurations. Users may have some configurations already present, therefore would need to adapt it accordingly.
"},{"location":"cscs-userlab/transfer-data/#transferring-files","title":"Transferring files","text":"Once the above configuration is set, then try to rsync from Merlin to CSCS, on any direction:
Bash# CSCS -> PSI\nrsync -azv daint.cscs.ch:<source_path> <destination_path>\n\n# PSI -> CSCS\nrsync -azv <source_path> daint.cscs.ch:<destination_path>\n"},{"location":"gmerlin6/cluster-introduction/","title":"Introduction","text":""},{"location":"gmerlin6/cluster-introduction/#introduction","title":"Introduction","text":""},{"location":"gmerlin6/cluster-introduction/#about-merlin6-gpu-cluster","title":"About Merlin6 GPU cluster","text":""},{"location":"gmerlin6/cluster-introduction/#introduction_1","title":"Introduction","text":"Merlin6 was a the official PSI Local HPC cluster for development and mission-critical applications that has been built in 2019. It replaced the Merlin5 cluster.
Merlin6 was designed to be extensible, so was technically possible to add more compute nodes and cluster storage without significant increase of the costs of the manpower and the operations.
Merlin6 was mostly based on CPU resources, but also contained a small amount of GPU-based resources which are mostly used by the BIO experiments.
"},{"location":"gmerlin6/cluster-introduction/#slurm-gmerlin6","title":"Slurm 'gmerlin6'","text":"THe GPU nodes have a dedicated Slurm cluster, called gmerlin6.
This cluster contains the same shared storage resources (/data/user, /data/project, /shared-scracth, /afs, /psi/home) which are present in the Merlin6 Slurm CPU cluster. The Slurm gmerlin6 cluster is maintainted independently to ease access for the users and keep independent user accounting.
The following image shows the Merlin6 cluster architecture diagram:
"},{"location":"gmerlin6/cluster-introduction/#merlin6-slurm-cluster-architecture-design","title":"Merlin6 Slurm Cluster Architecture Design","text":"The following image shows the Slurm architecture design for the Merlin6 clusters:
"},{"location":"gmerlin6/hardware-and-software-description/","title":"Hardware And Software Description","text":""},{"location":"gmerlin6/hardware-and-software-description/#hardware-and-software-description","title":"Hardware And Software Description","text":""},{"location":"gmerlin6/hardware-and-software-description/#hardware","title":"Hardware","text":""},{"location":"gmerlin6/hardware-and-software-description/#gpu-computing-nodes","title":"GPU Computing Nodes","text":"The GPU Merlin6 cluster was initially built from recycled workstations from different groups in the BIO division. From then, little by little it was updated with new nodes from sporadic investments from the same division, and it was never possible a central big investment. Hence, due to this, the Merlin6 GPU computing cluster has a non homogeneus solution, consisting on a big variety of hardware types and components.
On 2018, for the common good, BIO decided to open the cluster to the Merlin users and make it widely accessible for the PSI scientists.
The below table summarizes the hardware setup for the old Merlin6 GPU computing nodes:
Merlin6 GPU Computing Nodes Node Processor Sockets Cores Threads Scratch Memory GPUs GPU Model merlin-g-001 Intel Core i7-5960X 1 16 2 1.8TB 128GB 2 GTX1080 merlin-g-00[2-5] Intel Xeon E5-2640 2 20 1 1.8TB 128GB 4 GTX1080 merlin-g-006 Intel Xeon E5-2640 2 20 1 800GB 128GB 4 GTX1080Ti merlin-g-00[7-9] Intel Xeon E5-2640 2 20 1 3.5TB 128GB 4 GTX1080Ti merlin-g-01[0-3] Intel Xeon Silver 4210R 2 20 1 1.7TB 128GB 4 RTX2080Ti merlin-g-014 Intel Xeon Gold 6240R 2 48 1 2.9TB 384GB 8 RTX2080Ti merlin-g-015 Intel(R) Xeon Gold 5318S 2 48 1 2.9TB 384GB 8 RTX A5000"},{"location":"gmerlin6/hardware-and-software-description/#gwendolen","title":"Gwendolen","text":"Currently only Gwendolen is available on gmerlin6.
The login nodes are part of the Merlin6 HPC cluster, and are used to compile and to submit jobs to the different Merlin Slurm clusters (merlin5,merlin6,gmerlin6,etc.). Please refer to the Merlin6 Hardware Documentation for further information.
The storage is part of the Merlin6 HPC cluster, and is mounted in all the Slurm clusters (merlin5,merlin6,gmerlin6,etc.). Please refer to the Merlin6 Hardware Documentation for further information.
The Merlin6 cluster connectivity is based on the Infiniband FDR and EDR technologies. This allows fast access with very low latencies to the data as well as running extremely efficient MPI-based jobs. To check the network speed (56Gbps for FDR, 100Gbps for EDR) of the different machines, it can be checked by running on each node the following command:
Bashibstat | grep Rate\n"},{"location":"gmerlin6/hardware-and-software-description/#software","title":"Software","text":"In the Merlin6 GPU computing nodes, we try to keep software stack coherency with the main cluster Merlin6.
Due to this, the Merlin6 GPU nodes run:
This documentation shows basic Slurm configuration and options needed to run jobs in the GPU cluster.
"},{"location":"gmerlin6/slurm-configuration/#merlin6-gpu-nodes-definition","title":"Merlin6 GPU nodes definition","text":"The table below shows a summary of the hardware setup for the different GPU nodes
Nodes Def.#CPUs Max.#CPUs #Threads Def.Mem/CPU Max.Mem/CPU Max.Mem/Node Max.Swap GPU Type Def.#GPUs Max.#GPUs merlin-g-[001] 1 core 8 cores 1 5120 102400 102400 10000 geforce_gtx_1080 1 2 merlin-g-[002-005] 1 core 20 cores 1 5120 102400 102400 10000 geforce_gtx_1080 1 4 merlin-g-[006-009] 1 core 20 cores 1 5120 102400 102400 10000 geforce_gtx_1080_ti 1 4 merlin-g-[010-013] 1 core 20 cores 1 5120 102400 102400 10000 geforce_rtx_2080_ti 1 4 merlin-g-014 1 core 48 cores 1 5120 360448 360448 10000 geforce_rtx_2080_ti 1 8 merlin-g-015 1 core 48 cores 1 5120 360448 360448 10000 A5000 1 8 merlin-g-100 1 core 128 cores 2 3900 998400 998400 10000 A100 1 8Tip
Always check /etc/slurm/gres.conf and /etc/slurm/slurm.conf for changes in the GPU type and details of the hardware.
In this chapter we will cover basic settings that users need to specify in order to run jobs in the GPU cluster.
"},{"location":"gmerlin6/slurm-configuration/#merlin6-gpu-cluster","title":"Merlin6 GPU cluster","text":"To run jobs in the gmerlin6 cluster users must specify the cluster name in Slurm:
#SBATCH --cluster=gmerlin6\n"},{"location":"gmerlin6/slurm-configuration/#merlin6-gpu-partitions","title":"Merlin6 GPU partitions","text":"Users might need to specify the Slurm partition. If no partition is specified, it will default to gpu:
#SBATCH --partition=<partition_name> # Possible <partition_name> values: gpu, gpu-short, gwendolen\n The table below resumes shows all possible partitions available to users:
GPU Partition Default Time Max Time PriorityJobFactor PriorityTiergpu 1 day 1 week 1 1 gpu-short 2 hours 2 hours 1000 500 gwendolen 30 minutes 2 hours 1000 1000 gwendolen-long 30 minutes 8 hours 1 1 The PriorityJobFactor value will be added to the job priority (PARTITION column in sprio -l ). In other words, jobs sent to higher priority partitions will usually run first (however, other factors such like job age or mainly fair share might affect to that decision). For the GPU partitions, Slurm will also attempt first to allocate jobs on partitions with higher priority over partitions with lesser priority.
Jobs submitted to a partition with a higher PriorityTier value will be dispatched before pending jobs in partition with lower PriorityTier value and, if possible, they will preempt running jobs from partitions with lower PriorityTier values.
gwnedolen-long is a special partition which is enabled during non-working hours only. As of Nov 2023, the current policy is to disable this partition from Mon to Fri, from 1am to 5pm. However, jobs can be submitted anytime, but can only be scheduled outside this time range.
"},{"location":"gmerlin6/slurm-configuration/#merlin6-gpu-accounts","title":"Merlin6 GPU Accounts","text":"Users need to ensure that the public merlin account is specified. No specifying account options would default to this account.
This is mostly needed by users which have multiple Slurm accounts, which may define by mistake a different account.
Bash#SBATCH --account=merlin # Possible values: merlin, gwendolen\n Not all the accounts can be used on all partitions. This is resumed in the table below:
Slurm Account Slurm Partitionsmerlin gpu,gpu-short gwendolen gwendolen,gwendolen-long By default, all users belong to the merlin Slurm accounts, and jobs are submitted to the gpu partition when no partition is defined.
Users only need to specify the gwendolen account when using the gwendolen or gwendolen-long partitions, otherwise specifying account is not needed (it will always default to merlin).
For running jobs in the gwendolen/gwendolen-long partitions, users must specify the gwendolen account. The merlin account is not allowed to use the Gwendolen partitions.
Gwendolen is restricted to a set of users belonging to the unx-gwendolen Unix group. If you belong to a project allowed to use Gwendolen, or you are a user which would like to have access to it, please request access to the unx-gwendolen Unix group through PSI Service Now: the request will be redirected to the responsible of the project (Andreas Adelmann).
Some options are available when using GPUs. These are detailed here.
"},{"location":"gmerlin6/slurm-configuration/#number-of-gpus-and-type","title":"Number of GPUs and type","text":"When using the GPU cluster, users must specify the number of GPUs they need to use:
Bash#SBATCH --gpus=[<type>:]<number>\n The GPU type is optional: if left empty, it will try allocating any type of GPU. The different [<type>:] values and <number> of GPUs depends on the node. This is detailed in the below table.
geforce_gtx_1080 2 merlin-g-[002-005] geforce_gtx_1080 4 merlin-g-[006-009] geforce_gtx_1080_ti 4 merlin-g-[010-013] geforce_rtx_2080_ti 4 merlin-g-014 geforce_rtx_2080_ti 8 merlin-g-015 A5000 8 merlin-g-100 A100 8"},{"location":"gmerlin6/slurm-configuration/#constraint-features","title":"Constraint / Features","text":"Instead of specifying the GPU type, sometimes users would need to specify the GPU by the amount of memory available in the GPU card itself.
This has been defined in Slurm with Features, which is a tag which defines the GPU memory for the different GPU cards. Users can specify which GPU memory size needs to be used with the --constraint option. In that case, notice that in many cases there is not need to specify [<type>:] in the --gpus option.
#SBATCH --contraint=<Feature> # Possible values: gpumem_8gb, gpumem_11gb, gpumem_24gb, gpumem_40gb\n The table below shows the available Features and which GPU card models and GPU nodes they belong to:
Merlin6 GPU Computing Nodes Nodes GPU Type Feature merlin-g-[001-005] `geforce_gtx_1080` `gpumem_8gb` merlin-g-[006-009] `geforce_gtx_1080_ti` `gpumem_11gb` merlin-g-[010-014] `geforce_rtx_2080_ti` merlin-g-015 `A5000` `gpumem_24gb` merlin-g-100 `A100` `gpumem_40gb`"},{"location":"gmerlin6/slurm-configuration/#other-gpu-options","title":"Other GPU options","text":"Alternative Slurm options for GPU based jobs are available. Please refer to the man pages
for each Slurm command for further information about it (man salloc, man sbatch, man srun). Below are listed the most common settings:
#SBATCH --hint=[no]multithread\n#SBATCH --ntasks=\\<ntasks\\>\n#SBATCH --ntasks-per-gpu=\\<ntasks\\>\n#SBATCH --mem-per-gpu=\\<size[units]\\>\n#SBATCH --cpus-per-gpu=\\<ncpus\\>\n#SBATCH --gpus-per-node=[\\<type\\>:]\\<number\\>\n#SBATCH --gpus-per-socket=[\\<type\\>:]\\<number\\>\n#SBATCH --gpus-per-task=[\\<type\\>:]\\<number\\>\n#SBATCH --gpu-bind=[verbose,]\\<type\\>\n Please, notice that when defining [<type>:] once, then all other options must use it too!
The gmerlin6 cluster contains the partitions gwendolen and gwendolen-long, which have a node with Hyper-Threading enabled.
In that case, one should always specify whether to use Hyper-Threading or not. If not defined, Slurm will generally use it (exceptions apply). For this machine, generally HT is recommended.
Bash#SBATCH --hint=multithread # Use extra threads with in-core multi-threading.\n#SBATCH --hint=nomultithread # Don't use extra threads with in-core multi-threading.\n"},{"location":"gmerlin6/slurm-configuration/#user-and-job-limits","title":"User and job limits","text":"The GPU cluster contains some basic user and job limits to ensure that a single user can not overabuse the resources and a fair usage of the cluster. The limits are described below.
"},{"location":"gmerlin6/slurm-configuration/#per-job-limits","title":"Per job limits","text":"These are limits applying to a single job. In other words, there is a maximum of resources a single job can use. Limits are defined using QoS, and this is usually set at the partition level. Limits are described in the table below with the format: SlurmQoS(limits) (possible SlurmQoS values can be listed with the command sacctmgr show qos):
merlin gpu_week(gres/gpu=8) gpu-short merlin gpu_week(gres/gpu=8) gwendolen gwendolen No limits gwendolen-long gwendolen No limits, active from 9pm to 5:30am With the limits in the public gpu and gpu-short partitions, a single job using the merlin acccount
(default account) can not use more than 40 CPUs, more than 8 GPUs or more than 200GB. Any job exceeding such limits will stay in the queue with the message QOSMax[Cpu|GRES|Mem]PerJob. As there are no more existing QoS during the week temporary overriding job limits (this happens for instance in the CPU daily partition), the job needs to be cancelled, and the requested resources must be adapted according to the above resource limits.
The gwendolen and gwendolen-long partitions are two special partitions for a NVIDIA DGX A100 machine.
Only users belonging to the unx-gwendolen Unix group can run in these partitions. No limits are applied (machine resources can be completely used).
The gwendolen-long partition is available 24h. However,
down (jobs can be submitted, but can not run until the partition is set to active).active).These limits apply exclusively to users. In other words, there is a maximum of resources a single user can use. Limits are defined using QoS, and this is usually set at the partition level. Limits are described in the table below with the format: SlurmQoS(limits) (possible SlurmQoS values can be listed with the command sacctmgr show qos):
merlin gpu_week(gres/gpu=16) gpu-short merlin gpu_week(gres/gpu=16) gwendolen gwendolen No limits gwendolen-long gwendolen No limits, active from 9pm to 5:30am With the limits in the public gpu and gpu-short partitions, a single user can not use more than 80 CPUs, more than 16 GPUs or more than 400GB.
Jobs sent by any user already exceeding such limits will stay in the queue with the message QOSMax[Cpu|GRES|Mem]PerUser. In that case, job can wait in the queue until some of the running resources are freed.
Notice that user limits are wider than job limits. In that way, a user can run up to two 8 GPUs based jobs, or up to four 4 GPUs based jobs, etc.
Warning
Please try to avoid occupying all GPUs of the same type for several hours or multiple days, otherwise it would block other users needing the same type of GPU.
"},{"location":"gmerlin6/slurm-configuration/#advanced-slurm-configuration","title":"Advanced Slurm configuration","text":"Clusters at PSI use the Slurm Workload Manager as the batch system technology for managing and scheduling jobs. Slurm has been installed in a multi-clustered configuration, allowing to integrate multiple clusters in the same batch system.
For understanding the Slurm configuration setup in the cluster, sometimes may be useful to check the following files:
/etc/slurm/slurm.conf - can be found in the login nodes and computing nodes./etc/slurm/gres.conf - can be found in the GPU nodes, is also propgated to login nodes and computing nodes for user read access./etc/slurm/cgroup.conf - can be found in the computing nodes, is also propagated to login nodes for user read access.The previous configuration files which can be found in the login nodes, correspond exclusively to the merlin6 cluster configuration files.
Configuration files for the old merlin5 cluster or for the gmerlin6 cluster must be checked directly on any of the merlin5 or gmerlin6 computing nodes (in example, by login in to one of the nodes while a job or an active allocation is running).
"},{"location":"meg/contact/","title":"Support","text":""},{"location":"meg/contact/#support","title":"Support","text":"Support can be asked through:
Basic contact information is also displayed on every shell login to the system using the Message of the Day mechanism.
"},{"location":"meg/contact/#psi-service-now","title":"PSI Service Now","text":"PSI Service Now: is the official PSI tool for opening incident requests. However, contact via email (see below) is preferred.
I know which service is affected and providing the service name Local HPC Resources (e.g. MEG) [CF] (just type in Local and you should get the valid completions).E-Mail meg-admins@lists.psi.ch or merlin-admins@lists.psi.ch
Is strongly recommended that users subscribe to the Merlin Users mailing list: merlin-users@lists.psi.ch
This mailing list is the official channel used by Merlin administrators to inform users about downtimes, interventions or problems. Users can be subscribed in two ways:
The PSI Merlin and MEG clusters are managed by the High Performance Computing and Emerging technologies Group, which is part of the Science IT Infrastructure, and Services department (AWI) in PSI's Center for Scientific Computing, Theory and Data (SCD).
"},{"location":"meg/introduction/","title":"The MEG local HPC cluster","text":""},{"location":"meg/introduction/#the-meg-local-hpc-cluster","title":"The MEG local HPC cluster","text":"The MEG II collaboration includes almost 70 physicists from research institutions from five countries. Researchers and technicians from PSI have played a leading role, particularly with providing the high-quality beam, technical support in the detector integration, and in the design, construction, and operation of the detector readout electronics.\"
\u2014\u2014 Source
The MEG data analysis cluster is a cluster tightly coupled to Merlin and dedicated to the analysis of data from the MEG experiment. Operated for the Muon Physics group.
"},{"location":"meg/migration-to-merlin7/","title":"Meg to Merlin7 Migration Guide","text":""},{"location":"meg/migration-to-merlin7/#meg-to-merlin7-migration-guide","title":"Meg to Merlin7 Migration Guide","text":"Welcome to the official documentation for migrating experiment data from MEG to Merlin7. Please follow the instructions carefully to ensure a smooth and secure transition.
"},{"location":"meg/migration-to-merlin7/#directory-structure-changes","title":"Directory Structure Changes","text":""},{"location":"meg/migration-to-merlin7/#meg-vs-merlin6-vs-merlin7","title":"Meg vs Merlin6 vs Merlin7","text":"Cluster Home Directory User Data Directory Experiment data Additional notes merlin6 /psi/home/$USER /data/user/$USER /data/experiments/meg Symlink /meg meg /meg/home/$USER N/A /meg merlin7 /data/user/$USER /data/user/$USER /data/project/meg /data/user/$USER on Merlin7./data/user/$USER on Merlin7./data/project/meg.A experiment_migration.setup migration script must be executed from any MeG node using the account that will perform the migration.
root account","text":"root user resides on ephemeral storage (no physical disk).After a reboot, this directory is cleaned, so SSH keys need to be redeployed before running the migration again.
"},{"location":"meg/migration-to-merlin7/#when-using-a-psi-active-directory-ad-account","title":"When using a PSI Active Directory (AD) account","text":"gac-meg2_datagac-meg2To run it:
Bashexperiment_migration.setup\n This script will:
If there are issues, the script will:
If you are stuck, email: merlin-admins@lists.psi.ch/meg-admins@lists.psi.ch
"},{"location":"meg/migration-to-merlin7/#migration-procedure","title":"Migration Procedure","text":"Run an initial sync, ideally within a tmux session
Run additional syncs if needed
Schedule a date for the final migration:
Perform a final sync with the -E option (if it applies)
-E only if you need to delete files on the destination that were removed from the source.-E after the destination has gone into production, as it will delete new data created there.Disable access on the source folder.
Important
The -E option is destructive; handle with care. Always verify that the destination is ready before triggering the final sync. For optimal performance, use up to 12 threads with the -t option.
The migration script is installed on the meg-s-001 server at: /usr/local/bin/experiment_migration.bash
This script is primarily a wrapper around fpsync, providing additional logic for synchronizing MeG experiment data.
[root@meg-s-001 ~]# experiment_migration.bash --help\nUsage: /usr/local/bin/experiment_migration.bash [options] -p <project_name>\n\nOptions:\n -t | --threads N Number of parallel threads (default: 10). Recommended 12 as max.\n -b | --experiment-src-basedir DIR Experiment base directory (default: /meg)\n -S | --space-source SPACE Source project space name (default: data1)\n -B | --experiment-dst-basedir DIR Experiment base directory (default: /data/project/meg)\n -D | --space-destination SPACE Destination project space name (default: data1)\n -p | --project-name PRJ_NAME Mantadory field. MeG project name. Examples:\n - 'online'\n - 'offline'\n - 'shared'\n -F | --force-destination-mkdir Create the destination parent directory (default: false)\n Example: mkdir -p $(dirname /data/project/meg/data1/PROJECT_NAME)\n Result: mkdir -p /data/project/meg/data1\n -s | --split N Number of files per split (default: 20000)\n -f | --filesize SIZE File size threshold (default: 100G)\n -r | --runid ID Reuse an existing runid session\n -l | --list-runids List available runid sessions and exit\n -x | --delete-runid Delete runid. Requires: -r | --runid ID\n -E | --rsync-delete-option [WARNING] Use this to delete files in the destination\n which are not present in the source any more.\n [WARNING] USE THIS OPTION CAREFULLY!\n Typically used in last rsync to have an exact\n mirror of the source directory.\n [WARNING] Some files in destination might be deleted!\n Use 'man fpsync' for more information.\n\n -h | --help Show this help message\n -v | --verbose Run fpsync with -v option\n Tip
Defaults can be updated if necessary.
"},{"location":"meg/migration-to-merlin7/#migration-examples","title":"Migration examples","text":""},{"location":"meg/migration-to-merlin7/#example-migrating-the-entire-online-directory","title":"Example: Migrating the Entireonline Directory","text":"The following example demonstrates how to migrate the entire online directory.
Tip
You may also choose to migrate only specific subdirectories if needed. However, migrating full directories is generally simpler and less error-prone compared to handling multiple subdirectory migrations.
Bash[root@meg-s-001 ~]# experiment_migration.bash -S data1 -D data1 -p \"online\"\n\ud83d\udd04 Transferring project:\n From: /meg/data1/online\n To: login001.merlin7.psi.ch:/data/project/meg/data1/online\n Threads: 10 | Split: 20000 files | Max size: 100G\n RunID:\n\nPlease confirm to start (y/N):\n\u274c Transfer cancelled by user.\n"},{"location":"meg/migration-to-merlin7/#example-migrating-a-specific-subdirectory","title":"Example: Migrating a Specific Subdirectory","text":"The following example demonstrates how to migrate only a subdirectory. In this case, we use the option -F to create the parent directory in the destination, to ensure that this exists before transferring:
\u26a0\ufe0f Important:
-p \"shared\" while simultaneously migrating -p \"shared/subprojects\".[root@meg-s-001 ~]# experiment_migration.bash -p \"shared/subprojects/meg1\" -F\n\ud83d\udd04 Transferring project:\n From: /meg/data1/shared/subprojects/meg1\n To: login002.merlin7.psi.ch:/data/project/meg/data1/shared/subprojects/meg1\n Threads: 10 | Split: 20000 files | Max size: 100G\n RunID:\n\nPlease confirm to start (y/N): N\n\u274c Transfer cancelled by user.\n This command initiates the migration of the directory, by creating the destination parant directory (-F option):
ssh login002.merlin.psi.ch mkdir -p /data/project/meg/data1/shared/subprojects\n /meg/data1/shared/subprojects/meg1login002.merlin7.psi.ch:/data/project/meg/data1/shared/subprojects/meg1Merlin5 was the old official PSI Local HPC cluster for development and mission-critical applications which was built in 2016-2017. It was an extension of the Merlin4 cluster and built from existing hardware due to a lack of central investment on Local HPC Resources. Merlin5 was then replaced by the Merlin6 cluster in 2019, with an important central investment of ~1,5M CHF. Merlin5 was mostly based on CPU resources, but also contained a small amount of GPU-based resources which were mostly used by the BIO experiments.
Merlin5 has been kept as a Local HPC Slurm cluster, called merlin5. In that way, the old CPU computing nodes are still available as extra computation resources, and as an extension of the official production merlin6 Slurm cluster.
The old Merlin5 login nodes, GPU nodes and storage were fully migrated to the Merlin6 cluster, which becomes the main Local HPC Cluster. Hence, Merlin6 contains the storage which is mounted on the different Merlin HPC Slurm Clusters (merlin5, merlin6, gmerlin6).
To submit jobs to the merlin5 Slurm cluster, it must be done from the Merlin6 login nodes by using the option --clusters=merlin5 on any of the Slurm commands (sbatch, salloc, srun, etc. commands).
The following image shows the Slurm architecture design for Merlin cluster. It contains a multi non-federated cluster setup, with a central Slurm database and multiple independent clusters (merlin5, merlin6, gmerlin6):
Merlin5 is built from recycled nodes, and hardware will be decomissioned as soon as it fails (due to expired warranty and age of the cluster).
The below table summarizes the hardware setup for the Merlin5 computing nodes:
Merlin5 CPU Computing Nodes Chassis Node Processor Sockets Cores Threads Scratch Memory #0 merlin-c-[18-30] Intel Xeon E5-2670 2 16 1 50GB 64GB merlin-c-[31,32] 128GB #1 merlin-c-[33-45] Intel Xeon E5-2670 2 16 1 50GB 64GB merlin-c-[46,47] 128GB"},{"location":"merlin5/hardware-and-software-description/#login-nodes","title":"Login Nodes","text":"The login nodes are part of the Merlin6 HPC cluster, and are used to compile and to submit jobs to the different Merlin Slurm clusters (merlin5,merlin6,gmerlin6,etc.). Please refer to the Merlin6 Hardware Documentation for further information.
The storage is part of the Merlin6 HPC cluster, and is mounted in all the Slurm clusters (merlin5,merlin6,gmerlin6,etc.). Please refer to the Merlin6 Hardware Documentation for further information.
Merlin5 cluster connectivity is based on the Infiniband QDR technology. This allows fast access with very low latencies to the data as well as running extremely efficient MPI-based jobs. However, this is an old version of Infiniband which requires older drivers and software can not take advantage of the latest features.
"},{"location":"merlin5/hardware-and-software-description/#software","title":"Software","text":"In Merlin5, we try to keep software stack coherency with the main cluster Merlin6.
Due to this, Merlin5 runs:
This documentation shows basic Slurm configuration and options needed to run jobs in the Merlin5 cluster.
The Merlin5 cluster is an old cluster with old hardware which is maintained in a best effort for increasing the CPU power of the Merlin cluster.
"},{"location":"merlin5/slurm-configuration/#merlin5-cpu-nodes-definition","title":"Merlin5 CPU nodes definition","text":"The following table show default and maximum resources that can be used per node:
Nodes Def.#CPUs Max.#CPUs #Threads Max.Mem/Node Max.Swap merlin-c-[18-30] 1 core 16 cores 1 60000 10000 merlin-c-[31-32] 1 core 16 cores 1 124000 10000 merlin-c-[33-45] 1 core 16 cores 1 60000 10000 merlin-c-[46-47] 1 core 16 cores 1 124000 10000There is one main difference between the Merlin5 and Merlin6 clusters: Merlin5 is keeping an old configuration which does not consider the memory as a consumable resource. Hence, users can oversubscribe memory. This might trigger some side-effects, but this legacy configuration has been kept to ensure that old jobs can keep running in the same way they did a few years ago. If you know that this might be a problem for you, please, always use Merlin6 instead.
"},{"location":"merlin5/slurm-configuration/#running-jobs-in-the-merlin5-cluster","title":"Running jobs in the 'merlin5' cluster","text":"In this chapter we will cover basic settings that users need to specify in order to run jobs in the Merlin5 CPU cluster.
"},{"location":"merlin5/slurm-configuration/#merlin5-cpu-cluster","title":"Merlin5 CPU cluster","text":"To run jobs in the merlin5 cluster users must specify the cluster name in Slurm:
#SBATCH --cluster=merlin5\n"},{"location":"merlin5/slurm-configuration/#merlin5-cpu-partitions","title":"Merlin5 CPU partitions","text":"Users might need to specify the Slurm partition. If no partition is specified, it will default to merlin:
#SBATCH --partition=<partition_name> # Possible <partition_name> values: merlin, merlin-long:\n The table below resumes shows all possible partitions available to users:
CPU Partition Default Time Max Time Max Nodes PriorityJobFactor* PriorityTier** merlin 5 days 1 week All nodes 500 1 merlin-long 5 days 21 days 4 1 1*The PriorityJobFactor value will be added to the job priority (PARTITION column in sprio -l ). In other words, jobs sent to higher priority partitions will usually run first (however, other factors such like job age or mainly fair share might affect to that decision). For the GPU partitions, Slurm will also attempt first to allocate jobs on partitions with higher priority over partitions with lesser priority.
**Jobs submitted to a partition with a higher PriorityTier value will be dispatched before pending jobs in partition with lower PriorityTier value and, if possible, they will preempt running jobs from partitions with lower PriorityTier values.
The merlin-long partition is limited to 4 nodes, as it might contain jobs running for up to 21 days.
Users need to ensure that the public merlin account is specified. No specifying account options would default to this account. This is mostly needed by users which have multiple Slurm accounts, which may define by mistake a different account.
#SBATCH --account=merlin # Possible values: merlin\n"},{"location":"merlin5/slurm-configuration/#slurm-cpu-specific-options","title":"Slurm CPU specific options","text":"Some options are available when using CPUs. These are detailed here.
Alternative Slurm options for CPU based jobs are available. Please refer to the man pages for each Slurm command for further information about it (man salloc, man sbatch, man srun). Below are listed the most common settings:
#SBATCH --ntasks=<ntasks>\n#SBATCH --ntasks-per-core=<ntasks>\n#SBATCH --ntasks-per-socket=<ntasks>\n#SBATCH --ntasks-per-node=<ntasks>\n#SBATCH --mem=<size[units]>\n#SBATCH --mem-per-cpu=<size[units]>\n#SBATCH --cpus-per-task=<ncpus>\n#SBATCH --cpu-bind=[{quiet,verbose},]<type> # only for 'srun' command\n Notice that in Merlin5 no hyper-threading is available (while in Merlin6 it is). Hence, in Merlin5 there is not need to specify --hint hyper-threading related options.
In the CPU cluster we provide some limits which basically apply to jobs and users. The idea behind this is to ensure a fair usage of the resources and to avoid overabuse of the resources from a single user or job. However, applying limits might affect the overall usage efficiency of the cluster (in example, pending jobs from a single user while having many idle nodes due to low overall activity is something that can be seen when user limits are applied). In the same way, these limits can be also used to improve the efficiency of the cluster (in example, without any job size limits, a job requesting all resources from the batch system would drain the entire cluster for fitting the job, which is undesirable).
Hence, there is a need of setting up wise limits and to ensure that there is a fair usage of the resources, by trying to optimize the overall efficiency of the cluster while allowing jobs of different nature and sizes (it is, single core based vs parallel jobs of different sizes) to run.
In the merlin5 cluster, as not many users are running on it, these limits are wider than the ones set in the merlin6 and gmerlin6 clusters.
These are limits which apply to a single job. In other words, there is a maximum of resources a single job can use. These limits are described in the table below, with the format SlurmQoS(limits) (SlurmQoS can be listed from the sacctmgr show qos command):
By default, by QoS limits, a job can not use more than 384 cores (max CPU per job). However, for the merlin-long, this is even more restricted: there is an extra limit of 4 dedicated nodes for this partion. This is defined at the partition level, and will overwrite any QoS limit as long as this is more restrictive.
No user limits apply by QoS. For the merlin partition, a single user could fill the whole batch system with jobs (however, the restriction is at the job size, as explained above). For the merlin-limit partition, the 4 node limitation still applies.
Clusters at PSI use the Slurm Workload Manager as the batch system technology for managing and scheduling jobs. Slurm has been installed in a multi-clustered configuration, allowing to integrate multiple clusters in the same batch system.
For understanding the Slurm configuration setup in the cluster, sometimes may be useful to check the following files:
/etc/slurm/slurm.conf - can be found in the login nodes and computing nodes./etc/slurm/gres.conf - can be found in the GPU nodes, is also propgated to login nodes and computing nodes for user read access./etc/slurm/cgroup.conf - can be found in the computing nodes, is also propagated to login nodes for user read access.The previous configuration files which can be found in the login nodes, correspond exclusively to the merlin6 cluster configuration files. Configuration files for the old merlin5 cluster or for the gmerlin6 cluster must be checked directly on any of the merlin5 or gmerlin6 computing nodes (in example, by login in to one of the nodes while a job or an active allocation is running).
"},{"location":"merlin6/hardware-and-software-description/","title":"Hardware And Software Description","text":""},{"location":"merlin6/hardware-and-software-description/#hardware-and-software-description","title":"Hardware And Software Description","text":""},{"location":"merlin6/hardware-and-software-description/#hardware","title":"Hardware","text":""},{"location":"merlin6/hardware-and-software-description/#computing-nodes","title":"Computing Nodes","text":"The new Merlin6 cluster contains a solution based on four HPE Apollo k6000 Chassis
The connectivity for the Merlin6 cluster is based on ConnectX-5 EDR-100Gbps, and each chassis contains:
Each blade contains a NVMe disk, where up to 300TB are dedicated to the O.S., and ~1.2TB are reserved for local /scratch.
One old login node (merlin-l-01.psi.ch) is inherit from the previous Merlin5 cluster. Its mainly use is for running some BIO services (cryosparc) and for submitting jobs. Two new login nodes (merlin-l-001.psi.ch,merlin-l-002.psi.ch) with similar configuration to the Merlin6 computing nodes are available for the users. The mainly use is for compiling software and submitting jobs.
The connectivity is based on ConnectX-5 EDR-100Gbps for the new login nodes, and ConnectIB FDR-56Gbps for the old one.
Merlin6 CPU Computing Nodes Hardware Node Processor Sockets Cores Threads Scratch Memory Old merlin-l-01 Intel Xeon E5-2697AV4 2 16 2 100GB 512GB New merlin-l-00[1,2] Intel Xeon Gold 6152 2 44 2 1.8TB 384GB"},{"location":"merlin6/hardware-and-software-description/#storage","title":"Storage","text":"The storage node is based on the Lenovo Distributed Storage Solution for IBM Spectrum Scale.
The storage solution is connected to the HPC clusters through 2 x Mellanox SB7800 InfiniBand 1U Switches for high availability and load balancing.
"},{"location":"merlin6/hardware-and-software-description/#network","title":"Network","text":"Merlin6 cluster connectivity is based on the Infiniband technology. This allows fast access with very low latencies to the data as well as running extremely efficient MPI-based jobs:
Merlin6 cluster currently contains 5 Infiniband Managed switches and 3 Infiniband Unmanaged switches (one per HP Apollo chassis):
In Merlin6, we try to keep the latest software stack release to get the latest features and improvements. Due to this, Merlin6 runs:
Merlin6 availability
Merlin6 is closed to new users.
Only a reduced footprint of Merlin6 is still maintained, and exclusively for a small number of stakeholders who own dedicated nodes and cannot yet fully run their workloads on the new cluster.
New users must request access to Merlin7 instead.
"},{"location":"merlin6/slurm-configuration/","title":"Slurm Configuration","text":""},{"location":"merlin6/slurm-configuration/#slurm-configuration","title":"Slurm Configuration","text":"This documentation shows basic Slurm configuration and options needed to run jobs in the Merlin6 CPU cluster.
"},{"location":"merlin6/slurm-configuration/#merlin6-cpu-nodes-definition","title":"Merlin6 CPU nodes definition","text":"The following table show default and maximum resources that can be used per node:
Nodes Def.#CPUs Max.#CPUs #Threads Max.Mem/CPU Max.Mem/Node Max.Swap Def.#GPUs Max.#GPUs merlin-c-[301-312] 1 core 44 cores 2 748800 748800 10000 N/A N/A merlin-c-[313-318] 1 core 44 cores 1 748800 748800 10000 N/A N/A merlin-c-[319-324] 1 core 44 cores 2 748800 748800 10000 N/A N/AIf nothing is specified, by default each core will use up to 8GB of memory. Memory can be increased with the --mem=<mem_in_MB> and --mem-per-cpu=<mem_in_MB> options, and maximum memory allowed is Max.Mem/Node.
In merlin6, Memory is considered a Consumable Resource, as well as the CPU. Hence, both resources will account when submitting a job, and by default resources can not be oversubscribed.
and memory was by default oversubscribed.
Check Configuration
Always check /etc/slurm/slurm.conf for changes in the hardware.
To run jobs in the merlin6 cluster users can optionally specify the cluster name in Slurm:
#SBATCH --cluster=merlin6\n If no cluster name is specified, by default any job will be submitted to this cluster (as this is the main cluster). Hence, this would be only necessary if one has to deal with multiple clusters or when one has defined some environmental variables which can modify the cluster name.
"},{"location":"merlin6/slurm-configuration/#merlin6-cpu-partitions","title":"Merlin6 CPU partitions","text":"Users might need to specify the Slurm partition. If no partition is specified, it will default to general:
#SBATCH --partition=<partition_name> # Possible <partition_name> values: general, daily, hourly\n The following partitions (also known as queues) are configured in Slurm:
CPU Partition Default Time Max Time Max Nodes PriorityJobFactor* PriorityTier** DefMemPerCPU general 1 day 1 week 50 1 1 4000 daily 1 day 1 day 67 500 1 4000 hourly 1 hour 1 hour unlimited 1000 1 4000 asa-general 1 hour 2 weeks unlimited 1 2 3712 asa-daily 1 hour 1 week unlimited 500 2 3712 asa-visas 1 hour 90 days unlimited 1000 4 3712 asa-ansys 1 hour 90 days unlimited 1000 4 15600 mu3e 1 day 7 days unlimited 1000 4 3712The PriorityJobFactor value will be added to the job priority (PARTITION column in sprio -l ). In other words, jobs sent to higher priority partitions will usually run first (however, other factors such like job age or mainly fair share might affect to that decision). For the GPU partitions, Slurm will also attempt first to allocate jobs on partitions with higher priority over partitions with lesser priority.
Jobs submitted to a partition with a higher PriorityTier value will be dispatched before pending jobs in partition with lower PriorityTier value and, if possible, they will preempt running jobs from partitions with lower PriorityTier values.
general partition is the default. It can not have more than 50 nodes running jobs.daily this limitation is extended to 67 nodes.hourly there are no limits.asa-general,asa-daily,asa-ansys,asa-visas and mu3e are private partitions, belonging to different experiments owning the machines. Access is restricted in all cases. However, by agreement with the experiments, nodes are usually added to the hourly partition as extra resources for the public resources.Partition Selection
Jobs which would run for less than one day should be always sent to daily, while jobs that would run for less than one hour should be sent to hourly. This would ensure that you have highest priority over jobs sent to partitions with less priority, but also because general has limited the number of nodes that can be used for that. The idea behind that, is that the cluster can not be blocked by long jobs and we can always ensure resources for shorter jobs.
"},{"location":"merlin6/slurm-configuration/#merlin5-cpu-accounts","title":"Merlin5 CPU Accounts","text":"Users need to ensure that the public merlin account is specified. No specifying account options would default to this account.
This is mostly needed by users which have multiple Slurm accounts, which may define by mistake a different account.
Bash#SBATCH --account=merlin # Possible values: merlin, gfa-asa\n Not all the accounts can be used on all partitions. This is resumed in the table below:
Slurm Account Slurm Partitions merlinhourly,daily, general gfa-asa asa-general,asa-daily,asa-visas,asa-ansys,hourly,daily, general mu3e mu3e"},{"location":"merlin6/slurm-configuration/#private-accounts","title":"Private accounts","text":"gfa-asa and mu3e accounts are private accounts. These can be used for accessing dedicated partitions with nodes owned by different groups.Some options are available when using CPUs. These are detailed here. Alternative Slurm options for CPU based jobs are available. Please refer to the man pages for each Slurm command for further information about it (man salloc, man sbatch, man srun). Below are listed the most common settings:
#SBATCH --hint=[no]multithread\n#SBATCH --ntasks=<ntasks>\n#SBATCH --ntasks-per-core=<ntasks>\n#SBATCH --ntasks-per-socket=<ntasks>\n#SBATCH --ntasks-per-node=<ntasks>\n#SBATCH --mem=<size[units]>\n#SBATCH --mem-per-cpu=<size[units]>\n#SBATCH --cpus-per-task=<ncpus>\n#SBATCH --cpu-bind=[{quiet,verbose},]<type> # only for 'srun' command\n"},{"location":"merlin6/slurm-configuration/#enablingdisabling-hyper-threading","title":"Enabling/Disabling Hyper-Threading","text":"The merlin6 cluster contains nodes with Hyper-Threading enabled. One should always specify whether to use Hyper-Threading or not. If not defined, Slurm will generally use it (exceptions apply).
#SBATCH --hint=multithread # Use extra threads with in-core multi-threading.\n#SBATCH --hint=nomultithread # Don't use extra threads with in-core multi-threading.\n"},{"location":"merlin6/slurm-configuration/#constraint-features","title":"Constraint / Features","text":"Slurm allows to define a set of features in the node definition. This can be used to filter and select nodes according to one or more specific features. For the CPU nodes, we have the following features:
Text OnlyNodeName=merlin-c-[001-024,101-124,201-224] Features=mem_384gb,xeon-gold-6152\nNodeName=merlin-c-[301-312] Features=mem_768gb,xeon-gold-6240r\nNodeName=merlin-c-[313-318] Features=mem_768gb,xeon-gold-6240r\nNodeName=merlin-c-[319-324] Features=mem_384gb,xeon-gold-6240r\n Therefore, users running on hourly can select which node they want to use (fat memory nodes vs regular memory nodes, CPU type). This is possible by using the option --constraint=<feature_name> in Slurm.
Examples:
Select nodes with 48 cores only (nodes with 2 x Xeon Gold 6240R):
Bashsbatch --constraint=xeon-gold-6240r ...\n Select nodes with 44 cores only (nodes with 2 x Xeon Gold 6152):
Bashsbatch --constraint=xeon-gold-6152 ...\n Select fat memory nodes only:
Bashsbatch --constraint=mem_768gb ...\n Select regular memory nodes only:
Bashsbatch --constraint=mem_384gb ...\n Select fat memory nodes with 48 cores only:
Bashsbatch --constraint=mem_768gb,xeon-gold-6240r ...\n Detailing exactly which type of nodes you want to use is important, therefore, for groups with private accounts (mu3e,gfa-asa) or for public users running on the hourly partition, constraining nodes by features is recommended. This becomes even more important when having heterogeneous clusters.
In this chapter we will cover basic settings that users need to specify in order to run jobs in the Merlin6 CPU cluster.
"},{"location":"merlin6/slurm-configuration/#user-and-job-limits","title":"User and job limits","text":"In the CPU cluster we provide some limits which basically apply to jobs and users. The idea behind this is to ensure a fair usage of the resources and to avoid overabuse of the resources from a single user or job. However, applying limits might affect the overall usage efficiency of the cluster (in example, pending jobs from a single user while having many idle nodes due to low overall activity is something that can be seen when user limits are applied). In the same way, these limits can be also used to improve the efficiency of the cluster (in example, without any job size limits, a job requesting all resources from the batch system would drain the entire cluster for fitting the job, which is undesirable).
Hence, there is a need of setting up wise limits and to ensure that there is a fair usage of the resources, by trying to optimize the overall efficiency of the cluster while allowing jobs of different nature and sizes (it is, single core based vs parallel jobs of different sizes) to run.
Resource Limits
Wide limits are provided in the daily and hourly partitions, while for general those limits are more restrictive. However, we kindly ask users to inform the Merlin administrators when there are plans to send big jobs which would require a massive draining of nodes for allocating such jobs. This would apply to jobs requiring the unlimited QoS (see below \"Per job limits\").
Custom Requirements
If you have different requirements, please let us know, we will try to accommodate or propose a solution for you.
"},{"location":"merlin6/slurm-configuration/#per-job-limits","title":"Per job limits","text":"These are limits which apply to a single job. In other words, there is a maximum of resources a single job can use. Limits are described in the table below with the format: SlurmQoS(limits) (possible SlurmQoS values can be listed with the command sacctmgr show qos). Some limits will vary depending on the day and time of the week.
By default, a job can not use more than 704 cores (max CPU per job). In the same way, memory is also proportionally limited. This is equivalent as running a job using up to 8 nodes at once. This limit applies to the general partition (fixed limit) and to the daily partition (only during working hours).
Limits are softed for the daily partition during non working hours, and during the weekend limits are even wider. For the hourly partition, despite running many parallel jobs is something not desirable (for allocating such jobs it requires massive draining of nodes), wider limits are provided. In order to avoid massive nodes drain in the cluster, for allocating huge jobs, setting per job limits is necessary. Hence, unlimited QoS mostly refers to \"per user\" limits more than to \"per job\" limits (in other words, users can run any number of hourly jobs, but the job size for such jobs is limited with wide values).
"},{"location":"merlin6/slurm-configuration/#per-user-limits-for-cpu-partitions","title":"Per user limits for CPU partitions","text":"These limits which apply exclusively to users. In other words, there is a maximum of resources a single user can use. Limits are described in the table below with the format: SlurmQoS(limits) (possible SlurmQoS values can be listed with the command sacctmgr show qos). Some limits will vary depending on the day and time of the week.
By default, users can not use more than 704 cores at the same time (max CPU per user). Memory is also proportionally limited in the same way. This is equivalent to 8 exclusive nodes. This limit applies to the general partition (fixed limit) and to the daily partition (only during working hours).
For the hourly partition, there are no limits restriction and user limits are removed. Limits are softed for the daily partition during non working hours, and during the weekend limits are removed.
"},{"location":"merlin6/slurm-configuration/#advanced-slurm-configuration","title":"Advanced Slurm configuration","text":"Clusters at PSI use the Slurm Workload Manager as the batch system technology for managing and scheduling jobs. Slurm has been installed in a multi-clustered configuration, allowing to integrate multiple clusters in the same batch system.
For understanding the Slurm configuration setup in the cluster, sometimes may be useful to check the following files:
/etc/slurm/slurm.conf - can be found in the login nodes and computing nodes./etc/slurm/gres.conf - can be found in the GPU nodes, is also propgated to login nodes and computing nodes for user read access./etc/slurm/cgroup.conf - can be found in the computing nodes, is also propagated to login nodes for user read access.The previous configuration files which can be found in the login nodes, correspond exclusively to the merlin6 cluster configuration files.
Configuration files for the gmerlin6 cluster must be checked directly on the gmerlin6 computing nodes (in example, by login in to one of the nodes while a job or an active allocation is running).
"},{"location":"merlin6/98-announcements/downtimes/","title":"Downtimes","text":""},{"location":"merlin6/98-announcements/downtimes/#downtimes","title":"Downtimes","text":"On the first Monday of each month the Merlin6 cluster might be subject to interruption due to maintenance. Users will be informed with at least one week in advance when a downtime is scheduled for the next month.
Downtimes will be informed to users through the merlin-users@lists.psi.ch mail list. Also, a detailed description for the nexts scheduled interventions will be available in Next Scheduled Downtimes).
"},{"location":"merlin6/98-announcements/downtimes/#scheduled-downtime-draining-policy","title":"Scheduled Downtime Draining Policy","text":"Scheduled downtimes mostly affecting the storage and Slurm configurantions may require draining the nodes. When this is required, users will be informed accordingly. Two different types of draining are possible:
Jobs already running on the partition continue to run. This will be the default drain method.
Unless explicitly specified, the default draining policy for each partition will be the following:
Finally, remaining running jobs will be killed by default when the downtime starts. In some specific rare cases jobs will be just paused and resumed back when the downtime finished.
"},{"location":"merlin6/98-announcements/downtimes/#draining-policy-summary","title":"Draining Policy Summary","text":"The following table contains a summary of the draining policies during a Schedule Downtime:
Partition Drain Policy Default Drain Type Default Job Policy general 12h before the SD soft drain Kill running jobs when SD starts daily 12h before the SD soft drain Kill running jobs when SD starts hourly 1h before the SD soft drain Kill running jobs when SD starts gpu 1h before the SD soft drain Kill running jobs when SD starts gpu-short 1h before the SD soft drain Kill running jobs when SD starts gfa-asa 1h before the SD soft drain Kill running jobs when SD starts"},{"location":"merlin6/98-announcements/downtimes/#next-scheduled-downtimes","title":"Next Scheduled Downtimes","text":"The table below shows a description for the next Scheduled Downtime:
From To Service Description 05.09.2020 8am 05.09.2020 6pmwhere: * Block is capacity size in GB and TB * Files is number of files + directories in Millions (M) * Quota types are the following: * USR: Quota is setup individually per user name * GRP: Quota is setup individually per Unix Group name * Fileset: Quota is setup per project root directory.
/data/user has a strict user block quota limit policy. If more disk space is required, 'project' must be created.Merlin6 introduces the concept of a project directory. These are the recommended location for all scientific data.
/data/user is not suitable for sharing data between usersRefer to Requesting a project
"},{"location":"merlin6/99-support/migration-from-merlin5/#migration-schedule","title":"Migration Schedule","text":""},{"location":"merlin6/99-support/migration-from-merlin5/#phase-1-june-pre-migration","title":"Phase 1 [June]: Pre-migration","text":"'/gpfs/home/', '/gpfs/data', '/gpfs/group'/gpfs/data to Merlin6 /data/user/gpfs/home to Merlin6 /psi/home'/psi/home/', '/data/user', '/data/project''/gpfs/home/', '/gpfs/data', '/gpfs/group''/gpfs/home/', '/gpfs/data', '/gpfs/group''/psi/home/', '/data/user', '/data/project'First migration:
Bashrsync -avAHXS <source_merlin5> <destination_merlin6>\nrsync -avAHXS /gpfs/data/$username/* /data/user/$username\n This can take several hours or days: * You can try to parallelize multiple rsync commands in sub-directories for increasing transfer rate. * Please do not parallelize many concurrent directories. Let's say, don't add more than 10 together. * We may have other users doing the same and it could cause storage / UI performance problems in the Merlin5 cluster.
"},{"location":"merlin6/99-support/migration-from-merlin5/#step-2-mirroring","title":"Step 2: Mirroring","text":"Once first migration is done, a second rsync should be ran. This is done with --delete. With this option rsync will behave in a way where it will delete from the destination all files that were removed in the source, but also will propagate new files from the source to the destination.
rsync -avAHXS --delete <source_merlin5> <destination_merlin6>\nrsync -avAHXS --delete /gpfs/data/$username/* /data/user/$username\n"},{"location":"merlin6/99-support/migration-from-merlin5/#step-3-removing-archiving-old-data","title":"Step 3: Removing / Archiving old data","text":""},{"location":"merlin6/99-support/migration-from-merlin5/#removing-migrated-data","title":"Removing migrated data","text":"Once you ensure that everything is migrated to the new storage, data is ready to be deleted from the old storage. Users must report when migration is finished and report which directories are affected and ready to be removed.
Merlin administrators will remove the directories, always asking for a last confirmation.
"},{"location":"merlin6/99-support/migration-from-merlin5/#archiving-data","title":"Archiving data","text":"Once all migrated data has been removed from the old storage, missing data will be archived.
"},{"location":"merlin6/how-to-use-merlin/archive/","title":"Archive & PSI Data Catalog","text":""},{"location":"merlin6/how-to-use-merlin/archive/#archive-psi-data-catalog","title":"Archive & PSI Data Catalog","text":""},{"location":"merlin6/how-to-use-merlin/archive/#psi-data-catalog-as-a-psi-central-service","title":"PSI Data Catalog as a PSI Central Service","text":"PSI provides access to the Data Catalog for long-term data storage and retrieval. Data is stored on the PetaByte Archive at the Swiss National Supercomputing Centre (CSCS).
The Data Catalog and Archive is suitable for:
The Data Catalog is part of PSI's effort to conform to the FAIR principles for data management. In accordance with this policy, data will be publicly released under CC-BY-SA 4.0 after an embargo period expires.
The Merlin cluster is connected to the Data Catalog. Hence, users archive data stored in the Merlin storage under the /data directories (currentlyi, /data/user and /data/project). Archiving from other directories is also possible, however the process is much slower as data can not be directly retrieved by the PSI archive central servers (central mode), and needs to be indirectly copied to these (decentral mode).
Archiving can be done from any node accessible by the users (usually from the login nodes).
Tip
Archiving can be done in two different ways:
'Central mode': Possible for the user and project data directories, is the fastest way as it does not require remote copy (data is directly retreived by central AIT servers from Merlin through 'merlin-archive.psi.ch').
'Decentral mode': Possible for any directory, is the slowest way of archiving as it requires to copy ('rsync') the data from Merlin to the central AIT servers.
"},{"location":"merlin6/how-to-use-merlin/archive/#procedure","title":"Procedure","text":""},{"location":"merlin6/how-to-use-merlin/archive/#overview","title":"Overview","text":"Below are the main steps for using the Data Catalog.
datasetIngestor script/data/user or /data/project. It would be also necessary when the Merlin export server (merlin-archive.psi.ch) is down for any reason.Archive the dataset:
Archive for the datasetRetrieve data from the catalog:
RetrievedatasetRetriever scriptSince large data sets may take a lot of time to transfer, some steps are designed to happen in the background. The discovery website can be used to track the progress of each step.
"},{"location":"merlin6/how-to-use-merlin/archive/#account-registration","title":"Account Registration","text":"Two types of account permit access to the Data Catalog. If your data was collected at a beamline, you may have been assigned a p-group (e.g. p12345) for the experiment. Other users are assigned a-group (e.g. a-12345).
Groups are usually assigned to a PI, and then individual user accounts are added to the group. This must be done under user request through PSI Service Now. For existing a-groups and p-groups, you can follow the standard central procedures. Alternatively, if you do not know how to do that, follow the Merlin6 Requesting extra Unix groups procedure, or open a PSI Service Now ticket.
"},{"location":"merlin6/how-to-use-merlin/archive/#documentation","title":"Documentation","text":"Accessing the Data Catalog is done through the SciCat software. Documentation is here: ingestManual.
"},{"location":"merlin6/how-to-use-merlin/archive/#loading-datacatalog-tools","title":"Loading datacatalog tools","text":"The latest datacatalog software is maintained in the PSI module system. To access it from the Merlin systems, run the following command:
Bashmodule load datacatalog\n It can be done from any host in the Merlin cluster accessible by users. Usually, login nodes will be the nodes used for archiving.
"},{"location":"merlin6/how-to-use-merlin/archive/#finding-your-token","title":"Finding your token","text":"As of 2022-04-14 a secure token is required to interact with the data catalog. This is a long random string that replaces the previous user/password authentication (allowing access for non-PSI use cases). This string should be treated like a password and not shared.
You will need to save this token for later steps. To avoid including it in all the commands, I suggest saving it to an environmental variable (Linux):
BashSCICAT_TOKEN=RqYMZcqpqMJqluplbNYXLeSyJISLXfnkwlfBKuvTSdnlpKkU\n (Hint: prefix this line with a space to avoid saving the token to your bash history.)
Tokens expire after 2 weeks and will need to be fetched from the website again.
"},{"location":"merlin6/how-to-use-merlin/archive/#ingestion","title":"Ingestion","text":"The first step to ingesting your data into the catalog is to prepare a file describing what data you have. This is called metadata.json, and can be created with a text editor (e.g. vim). It can in principle be saved anywhere, but keeping it with your archived data is recommended. For more information about the format, see the 'Bio metadata' section below. An example follows:
{\n \"principalInvestigator\": \"albrecht.gessler@psi.ch\",\n \"creationLocation\": \"/PSI/EMF/JEOL2200FS\",\n \"dataFormat\": \"TIFF+LZW Image Stack\",\n \"sourceFolder\": \"/gpfs/group/LBR/pXXX/myimages\",\n \"owner\": \"Wilhelm Tell\",\n \"ownerEmail\": \"wilhelm.tell@psi.ch\",\n \"type\": \"raw\",\n \"description\": \"EM micrographs of amygdalin\",\n \"ownerGroup\": \"a-12345\",\n \"scientificMetadata\": {\n \"description\": \"EM micrographs of amygdalin\",\n \"sample\": {\n \"name\": \"Amygdalin beta-glucosidase 1\",\n \"uniprot\": \"P29259\",\n \"species\": \"Apple\"\n },\n \"dataCollection\": {\n \"date\": \"2018-08-01\"\n },\n \"microscopeParameters\": {\n \"pixel size\": {\n \"v\": 0.885,\n \"u\": \"A\"\n },\n \"voltage\": {\n \"v\": 200,\n \"u\": \"kV\"\n },\n \"dosePerFrame\": {\n \"v\": 1.277,\n \"u\": \"e/A2\"\n }\n }\n }\n}\n It is recommended to use the ScicatEditor for creating metadata files. This is a browser-based tool specifically for ingesting PSI data. Using the tool avoids syntax errors and provides templates for common data sets and options. The finished JSON file can then be downloaded to merlin or copied into a text editor.
Another option is to use the SciCat graphical interface from NoMachine. This provides a graphical interface for selecting data to archive. This is particularly useful for data associated with a DUO experiment and p-group. Type SciCat to get started after loading the datacatalog module. The GUI also replaces the the command-line ingestion described below.
The following steps can be run from wherever you saved your metadata.json. First, perform a \"dry-run\" which will check the metadata for errors:
datasetIngestor --token $SCICAT_TOKEN metadata.json\n It will ask for your PSI credentials and then print some info about the data to be ingested. If there are no errors, proceed to the real ingestion:
BashdatasetIngestor --token $SCICAT_TOKEN --ingest --autoarchive metadata.json\n You will be asked whether you want to copy the data to the central system:
/data/user or /data/project, answer 'no' since the data catalog can directly read the data./data/user and /data/project, or you are on a desktop computer, answer 'yes'. Copying large datasets to the PSI archive system may take quite a while (minutes to hours).If there are no errors, your data has been accepted into the data catalog! From now on, no changes should be made to the ingested data. This is important, since the next step is for the system to copy all the data to the CSCS Petabyte archive. Writing to tape is slow, so this process may take several days, and it will fail if any modifications are detected.
If using the --autoarchive option as suggested above, your dataset should now be in the queue. Check the data catalog: https://discovery.psi.ch. Your job should have status 'WorkInProgress'. You will receive an email when the ingestion is complete.
If you didn't use --autoarchive, you need to manually move the dataset into the archive queue. From discovery.psi.ch, navigate to the 'Archive' tab. You should see the newly ingested dataset. Check the dataset and click Archive. You should see the status change from datasetCreated to scheduleArchiveJob. This indicates that the data is in the process of being transferred to CSCS.
After a few days the dataset's status will change to datasetOnAchive indicating the data is stored. At this point it is safe to delete the data.
Running the datasetIngestor in dry mode (without --ingest) finds most errors. However, it is sometimes convenient to find potential errors yourself with simple unix commands.
Find problematic filenames
Bashfind . -iregex '.*/[^/]*[^a-zA-Z0-9_ ./-][^/]*'=\n Find broken links
Bashfind -L . -type l\n Find outside links
Bashfind . -type l -exec bash -c 'realpath --relative-base \"`pwd`\" \"$0\" 2>/dev/null |egrep \"^[./]\" |sed \"s|^|$0 ->|\" ' '{}' ';'\n Delete certain files (use with caution)
Bash# Empty directories\nfind . -type d -empty -delete\n# Backup files\nfind . -name '*~' -delete\nfind . -name '*#autosave#' -delete\n"},{"location":"merlin6/how-to-use-merlin/archive/#troubleshooting-known-bugs","title":"Troubleshooting & Known Bugs","text":"key_cert_check_authority: invalid certificate\nCertificate invalid: name is not a listed principal\n It indicates that no kerberos token was provided for authentication. You can avoid the warning by first running kinit (PSI linux systems).
Running [/usr/bin/rsync -e ssh -avxz .... It is expected that this step will take a long time and may appear to have hung. You can check what files have been successfully transfered using rsync:rsync --list-only user_n@pb-archive.psi.ch:archive/UID/PATH/\n where UID is the dataset ID (12345678-1234-1234-1234-123456789012) and PATH is the absolute path to your data. Note that rsync creates directories first and that the transfer order is not alphabetical in some cases, but it should be possible to see whether any data has transferred.
There is currently a limit on the number of files per dataset (technically, the limit is from the total length of all file paths). It is recommended to break up datasets into 300'000 files or less.
tar -f [output].tar [srcdir]\n Uncompressed data can be compressed on the cluster using the following command:
Bashsbatch /data/software/Slurm/Utilities/Parallel_TarGz.batch -s [srcdir] -t [output].tar -n\n Run /data/software/Slurm/Utilities/Parallel_TarGz.batch -h for more details and options.
/data/project/bio/myproject/archive $ datasetIngestor -copy -autoarchive -allowexistingsource -ingest metadata.json\n2019/11/06 11:04:43 Latest version: 1.1.11\n\n2019/11/06 11:04:43 Your version of this program is up-to-date\n2019/11/06 11:04:43 You are about to add a dataset to the === production === data catalog environment...\n2019/11/06 11:04:43 Your username:\nuser_n\n2019/11/06 11:04:48 Your password:\n2019/11/06 11:04:52 User authenticated: XXX\n2019/11/06 11:04:52 User is member in following a or p groups: XXX\n2019/11/06 11:04:52 OwnerGroup information a-XXX verified successfully.\n2019/11/06 11:04:52 contactEmail field added: XXX\n2019/11/06 11:04:52 Scanning files in dataset /data/project/bio/myproject/archive\n2019/11/06 11:04:52 No explicit filelistingPath defined - full folder /data/project/bio/myproject/archive is used.\n2019/11/06 11:04:52 Source Folder: /data/project/bio/myproject/archive at /data/project/bio/myproject/archive\n2019/11/06 11:04:57 The dataset contains 100000 files with a total size of 50000000000 bytes.\n2019/11/06 11:04:57 creationTime field added: 2019-07-29 18:47:08 +0200 CEST\n2019/11/06 11:04:57 endTime field added: 2019-11-06 10:52:17.256033 +0100 CET\n2019/11/06 11:04:57 license field added: CC BY-SA 4.0\n2019/11/06 11:04:57 isPublished field added: false\n2019/11/06 11:04:57 classification field added: IN=medium,AV=low,CO=low\n2019/11/06 11:04:57 Updated metadata object:\n{\n \"accessGroups\": [\n \"XXX\"\n ],\n \"classification\": \"IN=medium,AV=low,CO=low\",\n \"contactEmail\": \"XXX\",\n \"creationLocation\": \"XXX\",\n \"creationTime\": \"2019-07-29T18:47:08+02:00\",\n \"dataFormat\": \"XXX\",\n \"description\": \"XXX\",\n \"endTime\": \"2019-11-06T10:52:17.256033+01:00\",\n \"isPublished\": false,\n \"license\": \"CC BY-SA 4.0\",\n \"owner\": \"XXX\",\n \"ownerEmail\": \"XXX\",\n \"ownerGroup\": \"a-XXX\",\n \"principalInvestigator\": \"XXX\",\n \"scientificMetadata\": {\n...\n },\n \"sourceFolder\": \"/data/project/bio/myproject/archive\",\n \"type\": \"raw\"\n}\n2019/11/06 11:04:57 Running [/usr/bin/ssh -l user_n pb-archive.psi.ch test -d /data/project/bio/myproject/archive].\nkey_cert_check_authority: invalid certificate\nCertificate invalid: name is not a listed principal\nuser_n@pb-archive.psi.ch's password:\n2019/11/06 11:05:04 The source folder /data/project/bio/myproject/archive is not centrally available (decentral use case).\nThe data must first be copied to a rsync cache server.\n\n2019/11/06 11:05:04 Do you want to continue (Y/n)?\nY\n2019/11/06 11:05:09 Created dataset with id 12.345.67890/12345678-1234-1234-1234-123456789012\n2019/11/06 11:05:09 The dataset contains 108057 files.\n2019/11/06 11:05:10 Created file block 0 from file 0 to 1000 with total size of 413229990 bytes\n2019/11/06 11:05:10 Created file block 1 from file 1000 to 2000 with total size of 416024000 bytes\n2019/11/06 11:05:10 Created file block 2 from file 2000 to 3000 with total size of 416024000 bytes\n2019/11/06 11:05:10 Created file block 3 from file 3000 to 4000 with total size of 416024000 bytes\n...\n2019/11/06 11:05:26 Created file block 105 from file 105000 to 106000 with total size of 416024000 bytes\n2019/11/06 11:05:27 Created file block 106 from file 106000 to 107000 with total size of 416024000 bytes\n2019/11/06 11:05:27 Created file block 107 from file 107000 to 108000 with total size of 850195143 bytes\n2019/11/06 11:05:27 Created file block 108 from file 108000 to 108057 with total size of 151904903 bytes\n2019/11/06 11:05:27 short dataset id: 0a9fe316-c9e7-4cc5-8856-e1346dd31e31\n2019/11/06 11:05:27 Running [/usr/bin/rsync -e ssh -avxz /data/project/bio/myproject/archive/ user_n@pb-archive.psi.ch:archive\n/0a9fe316-c9e7-4cc5-8856-e1346dd31e31/data/project/bio/myproject/archive].\nkey_cert_check_authority: invalid certificate\nCertificate invalid: name is not a listed principal\nuser_n@pb-archive.psi.ch's password:\nPermission denied, please try again.\nuser_n@pb-archive.psi.ch's password:\n/usr/libexec/test_acl.sh: line 30: /tmp/tmpacl.txt: Permission denied\n/usr/libexec/test_acl.sh: line 30: /tmp/tmpacl.txt: Permission denied\n/usr/libexec/test_acl.sh: line 30: /tmp/tmpacl.txt: Permission denied\n/usr/libexec/test_acl.sh: line 30: /tmp/tmpacl.txt: Permission denied\n/usr/libexec/test_acl.sh: line 30: /tmp/tmpacl.txt: Permission denied\n...\n2019/11/06 12:05:08 Successfully updated {\"pid\":\"12.345.67890/12345678-1234-1234-1234-123456789012\",...}\n2019/11/06 12:05:08 Submitting Archive Job for the ingested datasets.\n2019/11/06 12:05:08 Job response Status: okay\n2019/11/06 12:05:08 A confirmation email will be sent to XXX\n12.345.67890/12345678-1234-1234-1234-123456789012\n"},{"location":"merlin6/how-to-use-merlin/archive/#publishing","title":"Publishing","text":"After datasets are are ingested they can be assigned a public DOI. This can be included in publications and will make the datasets on http://doi.psi.ch.
For instructions on this, please read the 'Publish' section in the ingest manual.
"},{"location":"merlin6/how-to-use-merlin/archive/#retrieving-data","title":"Retrieving data","text":"Retrieving data from the archive is also initiated through the Data Catalog. Please read the 'Retrieve' section in the ingest manual.
"},{"location":"merlin6/how-to-use-merlin/archive/#further-information","title":"Further Information","text":"This is the standard method. Official X11 support is provided through NoMachine. For normal SSH sessions, use your SSH client as follows:
Bashssh $username@merlin-l-01.psi.ch\nssh $username@merlin-l-001.psi.ch\nssh $username@merlin-l-002.psi.ch\n"},{"location":"merlin6/how-to-use-merlin/connect-from-linux/#ssh-with-x11-forwarding","title":"SSH with X11 Forwarding","text":"Official X11 Forwarding support is through NoMachine. Please follow the document {Job Submission -> Interactive Jobs} and {Accessing Merlin -> NoMachine} for more details. However, we provide a small recipe for enabling X11 Forwarding in Linux.
~/.ssh/config to implicitly add -X to all ssh connections:ForwardAgent yes\nForwardX11Trusted yes\n -Y to the ssh command. In example:ssh -X $username@merlin-l-01.psi.ch\nssh -X $username@merlin-l-001.psi.ch\nssh -X $username@merlin-l-002.psi.ch\n xclock. A X11 based clock should popup in your client session:xclock\n"},{"location":"merlin6/how-to-use-merlin/connect-from-macos/","title":"Connecting from a MacOS Client","text":""},{"location":"merlin6/how-to-use-merlin/connect-from-macos/#connecting-from-a-macos-client","title":"Connecting from a MacOS Client","text":""},{"location":"merlin6/how-to-use-merlin/connect-from-macos/#ssh-without-x11-forwarding","title":"SSH without X11 Forwarding","text":"This is the standard method. Official X11 support is provided through NoMachine. For normal SSH sessions, use your SSH client as follows:
Bashssh $username@merlin-l-01.psi.ch\nssh $username@merlin-l-001.psi.ch\nssh $username@merlin-l-002.psi.ch\n"},{"location":"merlin6/how-to-use-merlin/connect-from-macos/#ssh-with-x11-forwarding","title":"SSH with X11 Forwarding","text":""},{"location":"merlin6/how-to-use-merlin/connect-from-macos/#requirements","title":"Requirements","text":"For running SSH with X11 Forwarding in MacOS, one needs to have a X server running in MacOS. The official X Server for MacOS is XQuartz. Please ensure you have it running before starting a SSH connection with X11 forwarding.
"},{"location":"merlin6/how-to-use-merlin/connect-from-macos/#ssh-with-x11-forwarding-in-macos","title":"SSH with X11 Forwarding in MacOS","text":"Official X11 support is through NoMachine. Please follow the document {Job Submission -> Interactive Jobs} and {Accessing Merlin -> NoMachine} for more details. However, we provide a small recipe for enabling X11 Forwarding in MacOS.
Ensure that XQuartz is installed and running in your MacOS.
For enabling client X11 forwarding, add the following to the start of ~/.ssh/config to implicitly add -X to all ssh connections:
ForwardAgent yes\nForwardX11Trusted yes\n -Y to the ssh command. In example:ssh -X $username@merlin-l-01.psi.ch\nssh -X $username@merlin-l-001.psi.ch\nssh -X $username@merlin-l-002.psi.ch\n xclock. A X11 based clock should popup in your client session.xclock\n"},{"location":"merlin6/how-to-use-merlin/connect-from-windows/","title":"Connecting from a Windows Client","text":""},{"location":"merlin6/how-to-use-merlin/connect-from-windows/#connecting-from-a-windows-client","title":"Connecting from a Windows Client","text":""},{"location":"merlin6/how-to-use-merlin/connect-from-windows/#ssh-with-putty-without-x11-forwarding","title":"SSH with PuTTY without X11 Forwarding","text":"PuTTY is one of the most common tools for SSH.
Check, if the following software packages are installed on the Windows workstation by inspecting the Start menu (hint: use the Search box to save time):
If they are missing, you can install them using the Software Kiosk icon on the Desktop.
Start PuTTY
[Optional] Enable xterm to have similar mouse behavour as in Linux:
Official X11 Forwarding support is through NoMachine. Please follow the document {Job Submission -> Interactive Jobs} and {Accessing Merlin -> NoMachine} for more details. However, we provide a small recipe for enabling X11 Forwarding in Windows.
Check, if the Xming is installed on the Windows workstation by inspecting the Start menu (hint: use the Search box to save time). If missing, you can install it by using the Software Kiosk icon (should be located on the Desktop).
Ensure that a X server (Xming) is running. Otherwise, start it.
Enable X11 Forwarding in your SSH client. In example, for Putty:
Projects and users have their own areas in the central PSI AFS service. In order to access to these areas, valid Kerberos and AFS tickets must be granted.
These tickets are automatically granted when accessing through SSH with username and password. Alternatively, one can get a granting ticket with the kinit (Kerberos) and aklog (AFS ticket, which needs to be run after kinit) commands.
Due to PSI security policies, the maximum lifetime of the ticket is 7 days, and the default time is 10 hours. It means than one needs to constantly renew (krenew command) the existing granting tickets, and their validity can not be extended longer than 7 days. At this point, one needs to obtain new granting tickets.
As already described above, the most common use case is to obtain Kerberos and AFS granting tickets by introducing username and password: * When login to Merlin through SSH protocol, if this is done with username + password authentication, tickets for Kerberos and AFS will be automatically obtained. * When login to Merlin through NoMachine, no Kerberos and AFS are granted. Therefore, users need to
run kinit (to obtain a granting Kerberos ticket) followed by aklog (to obtain a granting AFS ticket). See further details below.
To manually obtain granting tickets, one has to: 1. To obtain a granting Kerberos ticket, one needs to run kinit $USER and enter the PSI password.
kinit $USER@D.PSI.CH\n 2. To obtain a granting ticket for AFS, one needs to run aklog. No password is necessary, but a valid Kerberos ticket is mandatory. Bashaklog\n 3. To list the status of your granted tickets, users can use the klist command. Bashklist\n 4. To extend the validity of existing granting tickets, users can use the krenew command. Bashkrenew\n * Keep in mind that the maximum lifetime for granting tickets is 7 days, therefore krenew can not be used beyond that limit, and then kinit should be used instead."},{"location":"merlin6/how-to-use-merlin/kerberos/#obtanining-granting-tickets-with-keytab","title":"Obtanining granting tickets with keytab","text":"Sometimes, obtaining granting tickets by using password authentication is not possible. An example are user Slurm jobs requiring access to private areas in AFS. For that, there's the possibility to generate a keytab file.
Be aware that the keytab file must be private, fully protected by correct permissions and not shared with any
other users.
"},{"location":"merlin6/how-to-use-merlin/kerberos/#creating-a-keytab-file","title":"Creating a keytab file","text":"For generating a keytab, one has to:
krb5/1.20 or higher) from Pmodules: Bashmodule load krb5/1.20\nmkdir -p ~/.k5\n 3. Run the ktutil utility which comes with the loaded krb5 Pmodule: Bashktutil\n 4. In the ktutil console, one has to generate a keytab file as follows: Bash# Replace $USER by your username\nadd_entry -password -k 0 -f -p $USER\nwkt /psi/home/$USER/.k5/krb5.keytab\nexit\n Notice that you will need to add your password once. This step is required for generating the keytab file. chmod 0600 ~/.k5/krb5.keytab\nOnce the keytab is created, one can obtain kerberos tickets without being prompted for a password as follows:
Bashkinit -kt ~/.k5/krb5.keytab $USER\naklog\n"},{"location":"merlin6/how-to-use-merlin/kerberos/#slurm-jobs-accessing-afs","title":"Slurm jobs accessing AFS","text":"Some jobs may require to access private areas in AFS. For that, having a valid keytab file is required. Then, from inside the batch script one can obtain granting tickets for Kerberos and AFS, which can be used for accessing AFS private areas.
The steps should be the following:
KRB5CCNAME, which can be used to specify the location of the Kerberos5 credentials (ticket) cache. In general it should point to a shared area ($HOME/.k5 is a good location), and is strongly recommended to generate an independent Kerberos5 credential cache (it is, creating a new credential cache per Slurm job): Bashexport KRB5CCNAME=\"$(mktemp \"$HOME/.k5/krb5cc_XXXXXX\")\"\nkinit by using your keytab:kinit -kt \"$HOME/.k5/krb5.keytab\" $USER@D.PSI.CH\n * To obtain a granting AFS ticket, run aklog: Bashaklog\n * At the end of the job, you can remove destroy existing Kerberos tickets. Bashkdestroy\n"},{"location":"merlin6/how-to-use-merlin/kerberos/#slurm-batch-script-example-obtaining-krbafs-granting-tickets","title":"Slurm batch script example: obtaining KRB+AFS granting tickets","text":""},{"location":"merlin6/how-to-use-merlin/kerberos/#example-1-independent-crendetial-cache-per-slurm-job","title":"Example 1: Independent crendetial cache per Slurm job","text":"This is the recommended way. At the end of the job, is strongly recommended to remove / destroy the existing kerberos tickets.
Bash#!/bin/bash\n#SBATCH --partition=hourly # Specify 'general' or 'daily' or 'hourly'\n#SBATCH --time=01:00:00 # Strictly recommended when using 'general' partition.\n#SBATCH --output=run.out # Generate custom output file\n#SBATCH --error=run.err # Generate custom error file\n#SBATCH --nodes=1 # Uncomment and specify #nodes to use\n#SBATCH --ntasks=1 # Uncomment and specify #nodes to use\n#SBATCH --cpus-per-task=1\n#SBATCH --constraint=xeon-gold-6152\n#SBATCH --hint=nomultithread\n#SBATCH --job-name=krb5\n\nexport KRB5CCNAME=\"$(mktemp \"$HOME/.k5/krb5cc_XXXXXX\")\"\nkinit -kt \"$HOME/.k5/krb5.keytab\" $USER@D.PSI.CH\naklog\nklist\n\necho \"Here should go my batch script code.\"\n\n# Destroy Kerberos tickets created for this job only\nkdestroy\nklist\n"},{"location":"merlin6/how-to-use-merlin/kerberos/#example-2-shared-credential-cache","title":"Example 2: Shared credential cache","text":"Some users may need/prefer to run with a shared cache file. For doing that, one needs to setup KRB5CCNAME from the login node session, before submitting the job.
export KRB5CCNAME=\"$(mktemp \"$HOME/.k5/krb5cc_XXXXXX\")\"\n Then, you can run one or multiple jobs scripts (or parallel job with srun). KRB5CCNAME will be propagated to the job script or to the parallel job, therefore a single credential cache will be shared amongst different Slurm runs.
#!/bin/bash\n#SBATCH --partition=hourly # Specify 'general' or 'daily' or 'hourly'\n#SBATCH --time=01:00:00 # Strictly recommended when using 'general' partition.\n#SBATCH --output=run.out # Generate custom output file\n#SBATCH --error=run.err # Generate custom error file\n#SBATCH --nodes=1 # Uncomment and specify #nodes to use\n#SBATCH --ntasks=1 # Uncomment and specify #nodes to use \n#SBATCH --cpus-per-task=1\n#SBATCH --constraint=xeon-gold-6152\n#SBATCH --hint=nomultithread\n#SBATCH --job-name=krb5\n\n# KRB5CCNAME is inherit from the login node session\nkinit -kt \"$HOME/.k5/krb5.keytab\" $USER@D.PSI.CH\naklog\nklist\n\necho \"Here should go my batch script code.\"\n\necho \"No need to run 'kdestroy', as it may have to survive for running other jobs\"\n"},{"location":"merlin6/how-to-use-merlin/nomachine/","title":"Remote Desktop Access","text":""},{"location":"merlin6/how-to-use-merlin/nomachine/#remote-desktop-access","title":"Remote Desktop Access","text":"Users can login in Merlin through a Linux Remote Desktop Session. NoMachine is a desktop virtualization tool. It is similar to VNC, Remote Desktop, etc. It uses the NX protocol to enable a graphical login to remote servers.
"},{"location":"merlin6/how-to-use-merlin/nomachine/#installation","title":"Installation","text":"NoMachine is available for PSI Windows computers in the Software Kiosk under the name NX Client. Please use the latest version (at least 6.0). For MacOS and Linux, the NoMachine client can be downloaded from https://www.nomachine.com/.
"},{"location":"merlin6/how-to-use-merlin/nomachine/#accessing-merlin6-nomachine-from-psi","title":"Accessing Merlin6 NoMachine from PSI","text":"The Merlin6 NoMachine service is hosted in the following machine:
merlin-nx.psi.chThis is the front-end (hence, the door) to the NoMachine back-end nodes, which contain the NoMachine desktop service. The back-end nodes are the following:
merlin-l-001.psi.chmerlin-l-002.psi.chAny access to the login node desktops must be done through merlin-nx.psi.ch (or from rem-acc.psi.ch -> merlin-nx.psi.ch when connecting from outside PSI).
The front-end service running on merlin-nx.psi.ch will load balance the sessions and login to any of the available nodes in the back-end.
Only 1 session per back-end is possible.
Below are explained all the steps necessary for configuring the access to the NoMachine service running on a login node.
"},{"location":"merlin6/how-to-use-merlin/nomachine/#creating-a-merlin6-nomachine-connection","title":"Creating a Merlin6 NoMachine connection","text":""},{"location":"merlin6/how-to-use-merlin/nomachine/#adding-a-new-connection-to-the-front-end","title":"Adding a new connection to the front-end","text":"Click the Add button to create a new connection to the merlin-nx.psi.ch front-end, and fill up the following fields:
merlin-nx, merlin-nx.psi.ch, Merlin Desktopmerlin-nx.psi.chNX4000.Depending on the client version, it may ask for different authentication options. If it's required, choose your authentication method and Continue (Password or Kerberos are the recommended ones).
You will be requested for the crendentials (username / password). Do not add PSICH\\ as a prefix for the username.
By default, when connecting to the merlin-nx.psi.ch front-end it will automatically open a new session if none exists.
If there are existing sessions, instead of opening a new desktop session, users can reconnect to an existing one by clicking to the proper icon (see image below).
Users can also create a second desktop session by selecting the New Desktop button (red rectangle in the below image). This will create a second session on the second login node, as long as this node is up and running.
An example of the NoMachine session, which is based on LightDM X Windows:
"},{"location":"merlin6/how-to-use-merlin/nomachine/#accessing-merlin6-nomachine-from-outside-psi","title":"Accessing Merlin6 NoMachine from outside PSI","text":""},{"location":"merlin6/how-to-use-merlin/nomachine/#no-vpn-access","title":"No VPN access","text":"Access to the Merlin6 NoMachine service is possible without VPN through 'rem-acc.psi.ch'. Please follow the steps described in PSI Remote Interactive Access for remote access to the Merlin6 NoMachine services. Once logged in 'rem-acc.psi.ch', you must then login to the merlin-nx.psi.ch front-end . services.
Remote access is also possible through VPN, however, you must not use 'rem-acc.psi.ch', and you have to connect directly to the Merlin6 NoMachine merlin-nx.psi.ch front-end as if you were inside PSI. For VPN access, you should request it to the IT department by opening a PSI Service Now ticket: VPN Access (PSI employees).
Nomachine Display Settings can be accessed and changed either when creating a new session or by clicking the very top right corner of a running session.
"},{"location":"merlin6/how-to-use-merlin/nomachine/#prevent-rescaling","title":"Prevent Rescaling","text":"These settings prevent \"bluriness\" at the cost of some performance! (You might want to choose depending on performance)
Merlin users sometimes will need to access the different Merlin services without being constantly requested by a password. One can achieve that with Kerberos authentication, however in some cases some software would require the setup of SSH Keys. One example is ANSYS Fluent, which, when used interactively, the way of communication between the GUI and the different nodes is through the SSH protocol, and the use of SSH Keys is enforced.
"},{"location":"merlin6/how-to-use-merlin/ssh-keys/#setting-up-ssh-keys-on-merlin","title":"Setting up SSH Keys on Merlin","text":"For security reason, users must always protect SSH Keys with a passphrase.
User can check whether a SSH key already exists. These would be placed in the ~/.ssh/ directory. RSA encryption is usually the default one, and files in there would be id_rsa (private key) and id_rsa.pub (public key).
ls ~/.ssh/id*\n For creating SSH RSA Keys, one should:
Run ssh-keygen, a password will be requested twice. You must remember this password for the future.
Add your public key to the authorized_keys file, and ensure proper permissions for that file, as follows:
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys\nchmod 0600 ~/.ssh/authorized_keys\n echo \"CanonicalizeHostname yes\" >> ~/.ssh/config\necho \"AddKeysToAgent yes\" >> ~/.ssh/config\necho \"ForwardAgent yes\" >> ~/.ssh/config\n Other options may be added.(base) \u2744 [caubet_m@merlin-l-001:/data/user/caubet_m]# cat ~/.ssh/config\nCanonicalizeHostname yes\nAddKeysToAgent yes\nForwardAgent yes\nBy default, when accessing the login node via SSH (with ForwardAgent=yes), it will automatically add your SSH Keys to the authentication agent. Hence, no actions should not be needed by the user. One can configure ForwardAgent=yes as follows:
* **(Recommended)** In your local Linux (workstation, laptop or desktop) add the following line in the\n $HOME/.ssh/config (or alternatively in /etc/ssh/ssh_config) file: ForwardAgent yes * Alternatively, on each SSH you can add the option ForwardAgent=yes in the SSH command. In example: bash ssh -XY -o ForwardAgent=yes merlin-l-001.psi.ch
If ForwardAgent is not enabled as shown above, one needs to run the authentication agent and then add your key to the ssh-agent. This must be done once per SSH session, as follows:
* Run `eval $(ssh-agent -s)` to run the **ssh-agent** in that SSH session\n* Check whether the authentication agent has your key already added:\n bash ssh-add -l | grep \"/psi/home/$(whoami)/.ssh\" * If no key is returned in the previous step, you have to add the private key identity to the authentication agent. You will be requested for the passphrase of your key, and it can be done by running: bash ssh-add
By default, when using a NoMachine session, the ssh-agent should be automatically started. Hence, there is no need of starting the agent or forwarding it.
However, for NoMachine one always need to add the private key identity to the authentication agent. This can be done as follows:
ssh-add -l | grep \"/psi/home/$(whoami)/.ssh\"\nssh-add\nYou just need to run it once per NoMachine session, and it would apply to all terminal windows within that NoMachine session.
"},{"location":"merlin6/how-to-use-merlin/ssh-keys/#troubleshooting","title":"Troubleshooting","text":""},{"location":"merlin6/how-to-use-merlin/ssh-keys/#errors-when-running-ssh-add","title":"Errors when running 'ssh-add'","text":"If the error Could not open a connection to your authentication agent. appears when running ssh-add, it means that the authentication agent is not running. Please follow the previous procedures for starting it.
If an existing SSH Key does not have password, or you want to update an existing password with a new one, you can do it as follows:
Bashssh-keygen -p -f ~/.ssh/id_rsa\n"},{"location":"merlin6/how-to-use-merlin/ssh-keys/#ssh-keys-deployed-but-not-working","title":"SSH Keys deployed but not working","text":"Please ensure proper permissions of the involved files, as well as any typos in the file names involved:
Bashchmod u+rwx,go-rwx,g+s ~/.ssh\nchmod u+rw-x,go-rwx ~/.ssh/authorized_keys\nchmod u+rw-x,go-rwx ~/.ssh/id_rsa\nchmod u+rw-x,go+r-wx ~/.ssh/id_rsa.pub\n"},{"location":"merlin6/how-to-use-merlin/ssh-keys/#testing-ssh-keys","title":"Testing SSH Keys","text":"Once SSH Key is created, for testing that the SSH Key is valid, one can do the following:
ssh merlin-l-001\nkdestroy\nssh-add -D\nssh-add\nssh-add -l\nssh -vvv merlin-l-002\nIf the last step succeeds, then means that your SSH Key is properly setup.
"},{"location":"merlin6/how-to-use-merlin/storage/","title":"Merlin6 Storage","text":""},{"location":"merlin6/how-to-use-merlin/storage/#merlin6-storage","title":"Merlin6 Storage","text":""},{"location":"merlin6/how-to-use-merlin/storage/#introduction","title":"Introduction","text":"This document describes the different directories of the Merlin6 cluster.
"},{"location":"merlin6/how-to-use-merlin/storage/#user-and-project-data","title":"User and project data","text":"Users are responsible for backing up their own data. Is recommended to backup the data on third party independent systems (i.e. LTS, Archive, AFS, SwitchDrive, Windows Shares, etc.).
/psi/home, as this contains a small amount of data, is the only directory where we can provide daily snapshots for one week. This can be found in the following directory /psi/home/.snapshot/When a user leaves PSI, she or her supervisor/team are responsible to backup and move the data out from the cluster: every few months, the storage space will be recycled for those old users who do not have an existing and valid PSI account.
Warning
When a user leaves PSI and his account has been removed, her storage space in Merlin may be recycled. Hence, when a user leaves PSI, she, her supervisor or team must ensure that the data is backed up to an external storage
"},{"location":"merlin6/how-to-use-merlin/storage/#checking-user-quota","title":"Checking user quota","text":"For each directory, we provide a way for checking quotas (when required). However, a single command merlin_quotas is provided. This is useful to show with a single command all quotas for your filesystems (including AFS, which is not mentioned here).
To check your quotas, please run:
Bashmerlin_quotas\n"},{"location":"merlin6/how-to-use-merlin/storage/#merlin6-directories","title":"Merlin6 directories","text":"Merlin6 offers the following directory classes for users:
/psi/home/<username>: Private user home directory
/data/user/<username>: Private user data directory
/data/project/general/<projectname>: Shared Project directory
/data/project/bio/$projectname exists./scratch: Local scratch disk (only visible by the node running a job).
/shared-scratch: Shared scratch disk (visible from all nodes)./export: Export directory for data transfer, visible from ra-merlin-01.psi.ch, ra-merlin-02.psi.ch and Merlin login nodes.Tip
In GPFS there is a concept called GraceTime. Filesystems have a block (amount of data) and file (number of files) quota. This quota contains a soft and hard limits. Once the soft limit is reached, users can keep writing up to their hard limit quota during the grace period. Once GraceTime or hard limit are reached, users will be unable to write and will need remove data below the soft limit (or ask for a quota increase when this is possible, see below table).
Properties of the directory classes:
Directory Block Quota [Soft:Hard] Block Quota [Soft:Hard] GraceTime Quota Change Policy: Block Quota Change Policy: Files Backup Backup Policy /psi/home/$username USR [10GB:11GB] Undef N/A Up to x2 when strongly justified. N/A yes Daily snapshots for 1 week /data/user/$username USR [1TB:1.074TB] USR [1M:1.1M] 7d Inmutable. Need a project. Changeable when justified. no Users responsible for backup /data/project/general/$projectname GRP [1TB:1.074TB] GRP [1M:1.1M] 7d Subject to project requirements. Subject to project requirements. no Project responsible for backup /scratch Undef Undef N/A N/A N/A no N/A /shared-scratch USR [512GB:2TB] USR [2M:2.5M] 7d Up to x2 when strongly justified. Changeable when justified. no N/A /export USR [10MB:20TB] USR [512K:5M] 10d Soft can be temporary increased. Changeable when justified. no N/AWarning
The use of scratch and export areas as an extension of the quota is forbidden. scratch and export areas must not contain final data.
Auto cleanup policies in the scratch and export areas are applied.
"},{"location":"merlin6/how-to-use-merlin/storage/#user-home-directory","title":"User home directory","text":"This is the default directory users will land when login in to any Merlin6 machine. It is intended for your scripts, documents, software development, and other files which you want to have backuped. Do not use it for data or HPC I/O-hungry tasks.
This directory is mounted in the login and computing nodes under the path:
Bash/psi/home/$username\n Home directories are part of the PSI NFS Central Home storage provided by AIT and are managed by the Merlin6 administrators.
Users can check their quota by running the following command:
Bashquota -s\n"},{"location":"merlin6/how-to-use-merlin/storage/#home-directory-policy","title":"Home directory policy","text":"Is forbidden to use the home directories for IO intensive tasks
/scratch, /shared-scratch, /data/user or /data/project for this purpose.Users can retrieve up to 1 week of their lost data thanks to the automatic daily snapshots for 1 week. Snapshots can be accessed at this path:
/psi/home/.snapshop/$username\n"},{"location":"merlin6/how-to-use-merlin/storage/#user-data-directory","title":"User data directory","text":"The user data directory is intended for fast IO access and keeping large amounts of private data. This directory is mounted in the login and computing nodes under the directory
```bash /data/user/$username
Text OnlyUsers can check their quota by running the following command:\n\n```bash\nmmlsquota -u <username> --block-size auto merlin-user\n"},{"location":"merlin6/how-to-use-merlin/storage/#user-data-directory-policy","title":"User data directory policy","text":"Is forbidden to use the data directories as scratch area during a job runtime.
/scratch, /shared-scratch for this purpose.No backup policy is applied for user data directories: users are responsible for backing up their data.
This storage is intended for fast IO access and keeping large amounts of a project's data, where the data also can be shared by all members of the project (the project's corresponding unix group). We recommend to keep most data in project related storage spaces, since it allows users to coordinate. Also, project spaces have more flexible policies regarding extending the available storage space.
Experiments can request a project space as described in [Accessing Merlin -> Requesting a Project]
Once created, the project data directory will be mounted in the login and computing nodes under the dirctory:
Bash/data/project/general/$projectname\n Project quotas are defined on a per group basis. Users can check the project quota by running the following command:
Bashmmlsquota -j $projectname --block-size auto -C merlin.psi.ch merlin-proj\n"},{"location":"merlin6/how-to-use-merlin/storage/#project-directory-policy","title":"Project Directory policy","text":"scratch area during a job's runtime, i.e. for high throughput I/O for a job's temporary files. Please Use /scratch, /shared-scratch for this purpose.There are two different types of scratch storage: local (/scratch) and shared (/shared-scratch).
local scratch should be used for all jobs that do not require the scratch files to be accessible from multiple nodes, which is trivially true for all jobs running on a single node. shared scratch is intended for files that need to be accessible by multiple nodes, e.g. by a MPI-job where tasks are spread out over the cluster and all tasks need to do I/O on the same temporary files.
local scratch in Merlin6 computing nodes provides a huge number of IOPS thanks to the NVMe technology. Shared scratch is implemented using a distributed parallel filesystem (GPFS) resulting in a higher latency, since it involves remote storage resources and more complex I/O coordination.
/shared-scratch is only mounted in the Merlin6 computing nodes (i.e. not on the login nodes), and its current size is 50TB. This can be increased in the future.
The properties of the available scratch storage spaces are given in the following table
Cluster Service Scratch Scratch Mountpoint Shared Scratch Shared Scratch Mountpoint Comments merlin6 login node 100GB / SAS/scratch 50TB / GPFS /shared-scratch merlin-l-0[1,2] merlin6 computing node 1.3TB / NVMe /scratch 50TB / GPFS /shared-scratch merlin-c-[001-024,101-124,201-224] merlin6 login node 2.0TB / NVMe /scratch 50TB / GPFS /shared-scratch merlin-l-00[1,2]"},{"location":"merlin6/how-to-use-merlin/storage/#scratch-directories-policy","title":"Scratch directories policy","text":"Export directory is exclusively intended for transferring data from outside PSI to Merlin and viceversa. Is a temporary directoy with an auto-cleanup policy. Please read Transferring Data for more information about it.
"},{"location":"merlin6/how-to-use-merlin/storage/#export-directory-policy","title":"Export directory policy","text":"Most methods allow data to be either transmitted or received, so it may make sense to initiate the transfer from either merlin or the other system, depending on the network visibility.
datatransfer.psi.ch, using ssh-based protocols and GlobusThe following methods transfer data directly via the login nodes. They are suitable for use from within the PSI network.
"},{"location":"merlin6/how-to-use-merlin/transfer-data/#rsync","title":"Rsync","text":"Rsync is the preferred method to transfer data from Linux/MacOS. It allows transfers to be easily resumed if they get interrupted. The general syntax is:
Bashrsync -avAHXS <src> <dst>\n For example, to transfer files from your local computer to a merlin project directory:
Bashrsync -avAHXS ~/localdata user@merlin-l-01.psi.ch:/data/project/general/myproject/\n You can resume interrupted transfers by simply rerunning the command. Previously transferred files will be skipped.
"},{"location":"merlin6/how-to-use-merlin/transfer-data/#winscp","title":"WinSCP","text":"The WinSCP tool can be used for remote file transfer on Windows. It is available from the Software Kiosk on PSI machines. Add merlin-l-01.psi.ch as a host and connect with your PSI credentials. You can then drag-and-drop files between your local computer and merlin.
SWITCHfilesender is an installation of the FileSender project (filesender.org) which is a web based application that allows authenticated users to securely and easily send arbitrarily large files to other users.
Authentication of users is provided through SimpleSAMLphp, supporting SAML2, LDAP and RADIUS and more. Users without an account can be sent an upload voucher by an authenticated user. FileSender is developed to the requirements of the higher education and research community.
The purpose of the software is to send a large file to someone, have that file available for download for a certain number of downloads and/or a certain amount of time, and after that automatically delete the file. The software is not intended as a permanent file publishing platform.
SWITCHfilesender is fully integrated with PSI, therefore, PSI employees can log in by using their PSI account (through Authentication and Authorization Infrastructure / AAI, by selecting PSI as the institution to be used for log in).
"},{"location":"merlin6/how-to-use-merlin/transfer-data/#psi-data-transfer","title":"PSI Data Transfer","text":"From August 2024, Merlin is connected to the PSI Data Transfer service, datatransfer.psi.ch. This is a central service managed by the Linux team. However, any problems or questions related to it can be directly reported to the Merlin administrators, which will forward the request if necessary.
The PSI Data Transfer servers supports the following protocols:
Notice that datatransfer.psi.ch does not allow SSH login, only rsync, scp and Globus access is allowed.
The following filesystems are mounted:
/merlin/export which points to the /export directory in Merlin./merlin/data/experiment/mu3e which points to the /data/experiment/mu3e directories in Merlin.data (read-only mounted)/merlin/data/project/general which points to the /data/project/general directories in Merlin.CSCS is available for transferring files between PizDaint/Alps and Merlin/merlin/data/project/bio which points to the /data/project/bio directories in Merlin./merlin/data/user which points to the /data/user directories in Merlin.Access to the PSI Data Transfer uses Multi factor authentication (MFA). Therefore, having the Microsoft Authenticator App is required as explained here.
Official Documentation
Please follow the Official PSI Data Transfer documentation for further instructions.
"},{"location":"merlin6/how-to-use-merlin/transfer-data/#directories","title":"Directories","text":""},{"location":"merlin6/how-to-use-merlin/transfer-data/#merlindatauser","title":"/merlin/data/user","text":"User data directories are mounted in RW.
Secure Permissions
Please, ensure proper secured permissions in your /data/user directory. By default, when directory is created, the system applies the most restrictive permissions. However, this does not prevent users for changing permissions if they wish. At this point, users become responsible of those changes.
Transferring big amounts of data from outside PSI to Merlin is always possible through /export.
Export Directory Access
The /export directory can be used by any Merlin user. This is configured in Read/Write mode. If you need access, please, contact the Merlin administrators.
Export Usage Policy
The use export as an extension of the quota is forbidden. Auto cleanup policies in the export area apply for files older than 28 days.
"},{"location":"merlin6/how-to-use-merlin/transfer-data/#exporting-data-from-merlin","title":"Exporting data from Merlin","text":"For exporting data from Merlin to outside PSI by using /export, one has to:
/data/project, /data/user, /scratch) to /export. Ensure to properly secure your directories and files with proper permissions.datatransfer.psi.ch, copy the data from /merlin/export to outside PSIFor importing data from outside PSI to Merlin by using /export, one has to:
datatransfer.psi.ch, copy the data from outside PSI to /merlin/export.Ensure to properly secure your directories and files with proper permissions.
/export to any directory (i.e. /data/project, /data/user, /scratch).Optionally, instead of using /export, Merlin project owners can request Read/Write or Read/Only access to their project directory.
Project Access
Merlin projects can request direct access. This can be configured in Read/Write or Read/Only modes. If your project needs access, please, contact the Merlin administrators.
"},{"location":"merlin6/how-to-use-merlin/transfer-data/#connecting-to-merlin6-from-outside-psi","title":"Connecting to Merlin6 from outside PSI","text":"Merlin6 is fully accessible from within the PSI network. To connect from outside you can use:
merlin_rmount command","text":"Merlin provides a command for mounting remote file systems, called merlin_rmount. This provides a helpful wrapper over the Gnome storage utilities, and provides support for a wide range of remote file formats, including * SMB/CIFS (Windows shared folders) * WebDav * AFP * FTP, SFTP * others
More instruction on using merlin_rmount
On top of the operating system stack we provide different software using the PSI developed PModule system.
PModules is the official supported way and each package is deployed by a specific expert. Usually, in PModules software which is used by many people will be found.
If you miss any package/versions or a software with a specific missing feature, contact us. We will study if is feasible or not to install it.
"},{"location":"merlin6/how-to-use-merlin/using-modules/#module-release-stages","title":"Module release stages","text":"Three different release stages are available in Pmodules, ensuring proper software life cycling. These are the following: unstable, stable and deprecated
The unstable release stage contains unstable releases of software. Software compilations here are usually under development or are not fully production ready.
This release stage is not directly visible by the end users, and needs to be explicitly invoked as follows:
Bashmodule use unstable\n Once software is validated and considered production ready, this is moved to the stable release stage.
The stable release stage contains stable releases of software, which have been deeply tested and are fully supported.
This is the default release stage, and is visible by default. Whenever possible, users are strongly advised to use packages from this release stage.
"},{"location":"merlin6/how-to-use-merlin/using-modules/#deprecated-release-stage","title":"Deprecated release stage","text":"The deprecated release stage contains deprecated releases of software. Software in this release stage is usually deprecated or discontinued by their developers. Also, minor versions or redundant compilations are moved here as long as there is a valid copy in the stable repository.
This release stage is not directly visible by the users, and needs to be explicitly invoked as follows:
Bashmodule use deprecated\n However, software moved to this release stage can be directly loaded without the need of invoking it. This ensure proper life cycling of the software, and making it transparent for the end users.
"},{"location":"merlin6/how-to-use-merlin/using-modules/#module-overlays","title":"Module overlays","text":"Recent Pmodules releases contain a feature called Pmodules overlays. In Merlin, overlays are used to source software from a different location. In that way, we can have custom private versions of software in the cluster installed on high performance storage accessed over a low latency network.
Pmodules overlays are still under development, therefore consider that some features may not work or do not work as expected.
Pmodule overlays can be used from Pmodules v1.1.5. However, Merlin is running Pmodules v1.0.0rc10 as the default version. Therefore, one needs to load first a newer version of it: this is available in the repositories and can be loaded with module load Pmodules/$version command.
Once running the proper Pmodules version, overlays are added (or invoked) with the module use $overlay_name command.
Some Merlin software is already provided through PModule overlays and has been validated for using and running it in that way. Therefore, Melin contains an overlay called overlay_merlin. In this overlay, the software is installed in the Merlin high performance storage, specifically in the /data/software/pmodules directory. In general, if another copy exists in the standard repository, we strongly recommend to use the replica in the overlay_merlin overlay instead, as it provides faster access and it may also provide some customizations for the Merlin6 cluster.
For loading the overlay_merlin, please run:
module load Pmodules/1.1.6 # Or newer version\nmodule use overlay_merlin\n Then, once overlay_merlin is invoked, it will disable central software installations with the same version (if exist), and will be replaced by the local ones in Merlin. Releases from the central Pmodules repository which do not have a copy in the Merlin overlay will remain visible. In example, for each ANSYS release, one can identify where it is installed by searching ANSYS in PModules with the --verbose option. This will show the location of the different ANSYS releases as follows: * For ANSYS releases installed in the central repositories, the path starts with /opt/psi * For ANSYS releases installed in the Merlin6 repository (and/or overwritting the central ones), the path starts with /data/software/pmodules
(base) \u2744 [caubet_m@merlin-l-001:/data/user/caubet_m]# module load Pmodules/1.1.6\nmodule load: unstable module has been loaded -- Pmodules/1.1.6\n\n(base) \u2744 [caubet_m@merlin-l-001:/data/user/caubet_m]# module use merlin_overlay\n\n(base) \u2744 [caubet_m@merlin-l-001:/data/user/caubet_m]# module search ANSYS --verbose\n\nModule Rel.stage Group Dependencies/Modulefile\n-------------------------------------------------------------------------------------------------------------------------------------------------------------------------\nANSYS/2019R3 stable Tools dependencies:\n modulefile: /data/software/pmodules/Tools/modulefiles/ANSYS/2019R3\nANSYS/2020R1 stable Tools dependencies:\n modulefile: /opt/psi/Tools/modulefiles/ANSYS/2020R1\nANSYS/2020R1-1 stable Tools dependencies:\n modulefile: /opt/psi/Tools/modulefiles/ANSYS/2020R1-1\nANSYS/2020R2 stable Tools dependencies:\n modulefile: /data/software/pmodules/Tools/modulefiles/ANSYS/2020R2\nANSYS/2021R1 stable Tools dependencies:\n modulefile: /data/software/pmodules/Tools/modulefiles/ANSYS/2021R1\nANSYS/2021R2 stable Tools dependencies:\n modulefile: /data/software/pmodules/Tools/modulefiles/ANSYS/2021R2\n"},{"location":"merlin6/how-to-use-merlin/using-modules/#pmodules-commands","title":"PModules commands","text":"Below is listed a summary of all available commands:
Bashmodule use # show all available PModule Software Groups as well as Release Stages\nmodule avail # to see the list of available software packages provided via pmodules\nmodule use unstable # to get access to a set of packages not fully tested by the community\nmodule load <package>/<version> # to load specific software package with a specific version\nmodule search <string> # to search for a specific software package and its dependencies.\nmodule list # to list which software is loaded in your environment\nmodule purge # unload all loaded packages and cleanup the environment\n"},{"location":"merlin6/how-to-use-merlin/using-modules/#module-useunuse","title":"module use/unuse","text":"Without any parameter, use lists all available PModule Software Groups and Release Stages.
module use\n When followed by a parameter, use/unuse invokes/uninvokes a PModule Software Group or Release Stage.
module use EM # Invokes the 'EM' software group\nmodule unuse EM # Uninvokes the 'EM' software group\nmodule use unstable # Invokes the 'unstable' Release stable\nmodule unuse unstable # Uninvokes the 'unstable' Release stable\n"},{"location":"merlin6/how-to-use-merlin/using-modules/#module-avail","title":"module avail","text":"This option lists all available PModule Software Groups and their packages.
Please run module avail --help for further listing options.
This is used to search for software packages. By default, if no Release Stage or Software Group is specified in the options of the module search command, it will search from the already invoked Software Groups and Release Stages. Direct package dependencies will be also showed.
(base) [caubet_m@merlin-l-001 caubet_m]$ module search openmpi/4.0.5_slurm\n\nModule Release Group Requires\n---------------------------------------------------------------------------\nopenmpi/4.0.5_slurm stable Compiler gcc/8.4.0\nopenmpi/4.0.5_slurm stable Compiler gcc/9.2.0\nopenmpi/4.0.5_slurm stable Compiler gcc/9.3.0\nopenmpi/4.0.5_slurm stable Compiler intel/20.4\n\n(base) [caubet_m@merlin-l-001 caubet_m]$ module load intel/20.4 openmpi/4.0.5_slurm\n Please run module search --help for further search options.
This loads/unloads specific software packages. Packages might have direct dependencies that need to be loaded first. Other dependencies will be automatically loaded.
In the example below, the openmpi/4.0.5_slurm package will be loaded, however gcc/9.3.0 must be loaded as well as this is a strict dependency. Direct dependencies must be loaded in advance. Users can load multiple packages one by one or at once. This can be useful for instance when loading a package with direct dependencies.
# Single line\nmodule load gcc/9.3.0 openmpi/4.0.5_slurm\n\n# Multiple line\nmodule load gcc/9.3.0\nmodule load openmpi/4.0.5_slurm\n"},{"location":"merlin6/how-to-use-merlin/using-modules/#module-purge","title":"module purge","text":"This command is an alternative to module unload, which can be used to unload all loaded module files.
module purge\n"},{"location":"merlin6/how-to-use-merlin/using-modules/#when-to-request-for-new-pmodules-packages","title":"When to request for new PModules packages","text":""},{"location":"merlin6/how-to-use-merlin/using-modules/#missing-software","title":"Missing software","text":"If you don't find a specific software and you know from other people interesing on it, it can be installed in PModules. Please contact us and we will try to help with that. Deploying new software in PModules may take few days.
Usually installation of new software are possible as long as few users will use it. If you are insterested in to maintain this software, please let us know.
"},{"location":"merlin6/how-to-use-merlin/using-modules/#missing-version","title":"Missing version","text":"If the existing PModules versions for a specific package do not fit to your needs, is possible to ask for a new version.
Usually installation of newer versions will be supported, as long as few users will use it. Installation of intermediate versions can be supported if this is strictly justified.
"},{"location":"merlin6/jupyterhub/jupyter-examples/","title":"Jupyter examples on merlin6","text":""},{"location":"merlin6/jupyterhub/jupyter-examples/#jupyter-examples-on-merlin6","title":"Jupyter examples on merlin6","text":"These examples demonstrate the use of certain python libraries and modules in the merlin6 environment. They are provided to get you started fast. You can check out a repository of the examples from
https://git.psi.ch/lsm-hpce/merlin6-jupyterhub-examples
A number of standard data sets for the tutorials of the libraries are hosted on merlin6 centrally under /data/project/general/public, so you do not need to store them in your user space.
Dask is a flexible library for parallel computing in Python. It provides the abstraction of a dask dataframe that can reside on multiple machines and can be manipulated by an API designed to be as close as possible to pandas. The example shows how to start up dask workers on merlin6 through slurm.
/data/project/general/public/dask-tutorial.Plotly is an interactive open source plotting library
There exist a number of useful contributed but unofficial extensions that add useful features to your notebooks.
From the classic Notebook UI you can access the available extensions in a separate tab as displayed in the screenshot, below. You may have to unselect the disable configuration for nbextensions without explicit copatibility. The extensions we tested still worked fine with this jupyterhub version of 1.0.0.
"},{"location":"merlin6/jupyterhub/jupyter-extensions/#extensions-for-working-with-large-notebooks","title":"Extensions for working with large notebooks","text":"Especially the following extensions make working with larger notebooks easier
It may also be interesting for you to explore the Jupytext server extension.
"},{"location":"merlin6/jupyterhub/jupyter-extensions/#variable-inspector","title":"Variable Inspector","text":"The variable inspector extension provides a constantly updated window in which you can see the value and type of your notebook's variables.
In case of problems or requests, please either submit a PSI Service Now incident containing \"Merlin Jupyterhub\" as part of the subject, or contact us by mail through merlin-admins@lists.psi.ch.
"},{"location":"merlin6/jupyterhub/jupyterhub-trouble/#general-steps-for-troubleshooting","title":"General steps for troubleshooting","text":""},{"location":"merlin6/jupyterhub/jupyterhub-trouble/#investigate-the-slurm-output-file","title":"Investigate the Slurm output file","text":"Your jupyterhub session runs as a normal batch job on the cluster, and each launch will create a slurm output file in your home directory named like jupyterhub_batchspawner_{$JOBID}.log, where the $JOBID part is the slurm job ID of your job. After a failed launch, investigate the contents of that file. An error message will usually be found towards the end of the file, often including a python backtrace.
Jupyterhub just runs a jupyter notebook executable as your user inside the batch job. A frequent source of errors consists of a user's local python environment definitions getting mixed up with the environment that jupyter needs to launch.
pip install --user <some-package>). Such installation will interfere with the environment offered by the module system on our cluster (based on anaconda). You can list such packages by executing pip list user. They are usually located in ~/.local/lib/pythonX.Y/....You can investigate the launching of a notebook interactively, by logging in to Merlin6 and running a jupyter command in the correct environment.
Bashmodule use unstable\nmodule load anaconda/2019.07\nconda activate jupyterhub-1.0.0_py36\njupyter --paths\n"},{"location":"merlin6/jupyterhub/jupyterhub-trouble/#known-problems-and-workarounds","title":"Known Problems and workarounds","text":""},{"location":"merlin6/jupyterhub/jupyterhub-trouble/#spawner-times-out","title":"Spawner times out","text":"If the cluster is very full, it may be difficult to launch a session. We always reserve some slots for interactive Jupyterhub use, but it may be that these slots have been taken or that the resources you requested are currently not available.
Inside of a Merlin6 terminal shell, you can run the standard commands like sinfo and squeue to get an overview of how full the cluster is.
Refer to our documentation about using your own custom made environments with jupyterhub.
"},{"location":"merlin6/jupyterhub/jupyterhub-trouble/#cannot-save-notebook-xsrf-argument-missing","title":"Cannot save notebook - xsrf argument missing","text":"You cannot save your notebook anymore and you get this error:
Text Only'_xsrf' argument missing from POST\n This issue occurs very seldomly. There exists the following workaround:
Go to the jupyterhub file browsing window and just open another notebook using the same kernel in another browser window. The issue should then go away. For more information refer to this github thread
"},{"location":"merlin6/jupyterhub/jupyterhub/","title":"Jupyterhub on Merlin","text":""},{"location":"merlin6/jupyterhub/jupyterhub/#jupyterhub-on-merlin","title":"Jupyterhub on Merlin","text":"Jupyterhub provides jupyter notebooks that are launched on cluster nodes of merlin and can be accessed through a web portal.
"},{"location":"merlin6/jupyterhub/jupyterhub/#accessing-jupyterhub-and-launching-a-session","title":"Accessing Jupyterhub and launching a session","text":"The service is available inside of PSI (or through a VPN connection) at
https://merlin-jupyter.psi.ch:8000
Spawn button, your job will be sent to the Slurm batch system. If the cluster is not currently overloaded and the resources you requested are available, your job will usually start within 30 seconds.Your notebooks can run within different software environments which are offered by a number of available Jupyter kernels.
E.g. in this test installation we provide two environments targeted at data science
When you create a new notebook you will be asked to specify which kernel you want to use. It is also possible to switch the kernel of a running notebook, but you will lose the state of the current kernel, so you will have to recalculate the notebook cells with this new kernel.
These environments are also available for standard work in a shell session. You can activate an environment in a normal merlin terminal session by using the module (q.v. using Pmodules) command to load anaconda python, and from there using the conda command to switch to the desired environment:
module use unstable\nmodule load anaconda/2019.07\nconda activate tensorflow-1.13.1_py36\n When the anaconda module has been loaded, you can list the available environments by executing:
conda info -e\n You can get more info on the use of the conda package management tool at its official documentation site.
Python environments can take up a lot of space due to the many dependencies that will be installed. You should always install your extra environments to the data area belonging to your account, e.g. /data/user/${YOUR-USERNAME}/conda-envs
In order for jupyterhub (and jupyter in general) to recognize the provided environment as a valid kernel, make sure that you include the nb_conda_kernels package in your environment. This package provides the necessary activation and the dependencies.
Example:
Bashconda create -c conda-forge -p /data/user/${USER}/conda-envs/my-test-env python=3.7 nb_conda_kernels\n After this, your new kernel will be visible as my-test-env inside of your jupyterhub session.
The Spawner Options page covers the most common options. These are used to create a submission script for the jupyterhub job and submit it to the slurm queue. Additional customization can be implemented using the 'Optional user defined line to be added to the batch launcher script' option. This line is added to the submission script at the end of other #SBATCH lines. Parameters can be passed to SLURM by starting the line with #SBATCH, like in Running Slurm Scripts. Some ideas:
#SBATCH --mem=100G\n"},{"location":"merlin6/jupyterhub/jupyterhub/#request-multiple-gpus-gpu-partition-only","title":"Request multiple GPUs (gpu partition only)","text":"Bash#SBATCH --gpus=2\n"},{"location":"merlin6/jupyterhub/jupyterhub/#log-additional-information","title":"Log additional information","text":"Bashhostname; date; echo $USER\n Output is found in ~/jupyterhub_batchspawner_<jobid>.log.
In case of problems or requests, please either submit a PSI Service Now incident containing \"Merlin Jupyterhub\" as part of the subject, or contact us by mail through merlin-admins@lists.psi.ch.
"},{"location":"merlin6/jupyterhub/jupyterlab/","title":"Jupyterlab User interface","text":""},{"location":"merlin6/jupyterhub/jupyterlab/#jupyterlab-user-interface","title":"Jupyterlab User interface","text":""},{"location":"merlin6/jupyterhub/jupyterlab/#testing-out-jupyterlab","title":"Testing out Jupyterlab","text":"Jupyterlab is a new interface to interact with your Jupyter notebooks. However, it is in very active development and undergoing constant changes. You can read about its features on the official website.
You can test it out on our server by using the following kind of URL, where $YOUR-USER must be replaced by your PSI username. You must already have an active session on the jupyterhub.
https://merlin-jupyter.psi.ch:8000/user/$YOUR-USER/lab\n"},{"location":"merlin6/jupyterhub/jupyterlab/#switching-to-the-classic-notebook-user-interface","title":"Switching to the Classic Notebook user interface","text":"You can switch to the classical notebook UI by using the \"Launch Classic Notebook\" command from the left sidebar of JupyterLab.
"},{"location":"merlin6/jupyterhub/jupyterlab/#jupyterlab-does-not-support-the-older-nbextensions","title":"Jupyterlab does not support the older nbextensions","text":"These regrettably are not yet supported from within the JupyterLab UI, but you can activate them through the Classic Notebook interface (see above)
"},{"location":"merlin6/jupyterhub/jupytext/","title":"Jupytext - efficient editing","text":""},{"location":"merlin6/jupyterhub/jupytext/#jupytext-efficient-editing","title":"Jupytext - efficient editing","text":"Jupytext is a Jupyter serverextension that allows creating a text file from a notebook that can be kept in sync with it with the aim of using more efficient editors or IDEs on it. The file can be created in a number of formats, e.g. markdown, .py (light Script), and others. Jupytext will keep the both the notebook and this paired* file in sync: If you save the paired file, changes will be carried over into the notebook, and vice versa. This pairing will persist also in new sessions of your notebook until you explicitely remove it again.
The paired file contains only the cell contents and not the output. Therefore it also is much better suited for revision control, since the differences between versions are limited to the cells and these file formats yield more meaningful text differences than the default notebook storage format.
"},{"location":"merlin6/jupyterhub/jupytext/#creating-a-paired-file-in-python-format-for-efficient-refactoring","title":"Creating a paired file in python format for efficient refactoring","text":"From your notebook, go to the file menu and navigate to the jupytext submenu. Select the light script pairing option. This will create a *.py file version with the same basename as your notebook file.
You can edit that file separately in your favourite python editor. The markdown text parts will be conserved in the file in the form of python comments.
When you save the file and do a browser page reload of your jupyter notebook, you will see all the changes carried over into your jupyter notebook.
"},{"location":"merlin6/jupyterhub/jupytext/#creating-a-paired-file-in-mardown-format-for-efficient-text-authoring","title":"Creating a paired file in mardown format for efficient text authoring","text":"If you want to efficiently work on the descriptive text base of your notebook, just pair it using the Pair notebook with Markdown menu item and edit the generated *.md file with your favourite Markdown editor.
Your notebooks usually auto save every 2 min (default). Turn this feature off when working with the paired file. Otherwise Jupyter will continue to save the state while you are editing the paired file, and the changes will be synced to the disk version of the paired file. You can disable the autosave by unchecking the Autosave notebook menu item in the Juytext menu (see above image).
Please refer to:
For interactive command shell access, use an SSH client. We recommend to activate SSH's X11 forwarding to allow you to use graphical applications (e.g. a text editor, but for more performant graphical access, refer to the sections below). X applications are supported in the login nodes and X11 forwarding can be used for those users who have properly configured X11 support in their desktops, however:
Refer to {How To Use Merlin -> Accessing from Linux Clients} for Linux SSH client and X11 configuration.
"},{"location":"merlin6/quick-start-guide/accessing-interactive-nodes/#accessing-from-a-windows-client","title":"Accessing from a Windows client","text":"Refer to {How To Use Merlin -> Accessing from Windows Clients} for Windows SSH client and X11 configuration.
"},{"location":"merlin6/quick-start-guide/accessing-interactive-nodes/#accessing-from-a-macos-client","title":"Accessing from a MacOS client","text":"Refer to {How To Use Merlin -> Accessing from MacOS Clients} for MacOS SSH client and X11 configuration.
"},{"location":"merlin6/quick-start-guide/accessing-interactive-nodes/#nomachine-remote-desktop-access","title":"NoMachine Remote Desktop Access","text":"X applications are supported in the login nodes and can run efficiently through a NoMachine client. This is the officially supported way to run more demanding X applications on Merlin6.
Refer to {How To Use Merlin -> Remote Desktop Access} for further instructions of how to configure the NoMachine client and how to access it from PSI and from outside PSI.
"},{"location":"merlin6/quick-start-guide/accessing-interactive-nodes/#login-nodes-hardware-description","title":"Login nodes hardware description","text":"The Merlin6 login nodes are the official machines for accessing the recources of Merlin6. From these machines, users can submit jobs to the Slurm batch system as well as visualize or compile their software.
The Merlin6 login nodes are the following:
Hostname SSH NoMachine #cores #Threads CPU Memory Scratch Scratch Mountpoint merlin-l-001.psi.ch yes yes 2 x 22 2 Intel Xeon Gold 6152 384GB 1.8TB NVMe/scratch merlin-l-002.psi.ch yes yes 2 x 22 2 Intel Xeon Gold 6142 384GB 1.8TB NVMe /scratch"},{"location":"merlin6/quick-start-guide/accessing-slurm/","title":"Accessing Slurm Cluster","text":""},{"location":"merlin6/quick-start-guide/accessing-slurm/#accessing-slurm-cluster","title":"Accessing Slurm Cluster","text":""},{"location":"merlin6/quick-start-guide/accessing-slurm/#the-merlin-slurm-clusters","title":"The Merlin Slurm clusters","text":"Merlin contains a multi-cluster setup, where multiple Slurm clusters coexist under the same umbrella. It basically contains the following clusters:
merlin6.gmerlin6.Any job submission must be performed from a Merlin login node. Please refer to the Accessing the Interactive Nodes documentation for further information about how to access the cluster.
In addition, any job must be submitted from a high performance storage area visible by the login nodes and by the computing nodes. For this, the possible storage areas are the following:
/data/user/data/project/shared-scratchPlease, avoid using /psi/home directories for submitting jobs.
The Merlin6 CPU cluster (merlin6) is the default cluster configured in the login nodes. Any job submission will use by default this cluster, unless the option --cluster is specified with another of the existing clusters.
For further information about how to use this cluster, please visit: Merlin6 CPU Slurm Cluster documentation.
"},{"location":"merlin6/quick-start-guide/accessing-slurm/#merlin6-gpu-cluster-access","title":"Merlin6 GPU cluster access","text":"The Merlin6 GPU cluster (gmerlin6) is visible from the login nodes. However, to submit jobs to this cluster, one needs to specify the option --cluster=gmerlin6 when submitting a job or allocation.
For further information about how to use this cluster, please visit: Merlin6 GPU Slurm Cluster documentation.
"},{"location":"merlin6/quick-start-guide/code-of-conduct/","title":"Code Of Conduct","text":""},{"location":"merlin6/quick-start-guide/code-of-conduct/#code-of-conduct","title":"Code Of Conduct","text":""},{"location":"merlin6/quick-start-guide/code-of-conduct/#the-basic-principle","title":"The Basic principle","text":"The basic principle is courtesy and consideration for other users.
During the runtime of a job, it is mandatory to use the /scratch and /shared-scratch partitions for temporary data:
/data/user, /data/project or /psi/home/ for that purpose./scratch over /shared-scratch and use the latter only when you require the temporary files to be visible from multiple nodes.Read the description in Merlin6 directory structure for learning about the correct usage of each partition type.
Users are responsible for backing up their own data. Is recommended to backup the data on third party independent systems (i.e. LTS, Archive, AFS, SwitchDrive, Windows Shares, etc.).
/psi/home, as this contains a small amount of data, is the only directory where we can provide daily snapshots for one week. This can be found in the following directory /psi/home/.snapshot/When a user leaves PSI, she or her supervisor/team are responsible to backup and move the data out from the cluster: every few months, the storage space will be recycled for those old users who do not have an existing and valid PSI account.
Warning
When a user leaves PSI and his account has been removed, her storage space in Merlin may be recycled. Hence, when a user leaves PSI, she, her supervisor or team must ensure that the data is backed up to an external storage
"},{"location":"merlin6/quick-start-guide/code-of-conduct/#system-administrator-rights","title":"System Administrator Rights","text":"Historically, the local HPC clusters at PSI were named Merlin. Over the years, multiple generations of Merlin have been deployed.
Access to the different Slurm clusters is possible from the Merlin login nodes, which can be accessed through the SSH protocol or the NoMachine (NX) service.
The following image shows the Slurm architecture design for the Merlin5 & Merlin6 (CPU & GPU) clusters:
"},{"location":"merlin6/quick-start-guide/introduction/#merlin6","title":"Merlin6","text":"Merlin6 is a the official PSI Local HPC cluster for development and mission-critical applications that has been built in 2019. It replaces the Merlin5 cluster.
Merlin6 is designed to be extensible, so is technically possible to add more compute nodes and cluster storage without significant increase of the costs of the manpower and the operations.
Merlin6 contains all the main services needed for running cluster, including login nodes, storage, computing nodes and other subservices, connected to the central PSI IT infrastructure.
"},{"location":"merlin6/quick-start-guide/introduction/#cpu-and-gpu-slurm-clusters","title":"CPU and GPU Slurm clusters","text":"The Merlin6 computing nodes are mostly based on CPU resources. However, in the past it also contained a small amount of GPU-based resources, which were mostly used by the BIO Division and by Deep Leaning projects. Today, only Gwendolen is available on gmerlin6.
These computational resources are split into two different Slurm clusters:
merlin6.--cluster will be submited to this cluster.gmerlin6.gmerlin6 GPU cluster need to specify the option --cluster=gmerlin6.In the past, access to the public Merlin6 cluster was regulated via the svc-cluster_merlin6 group, which is no longer in use. Merlin6 has become a private cluster, and to request access, users must now be members of one of the Unix groups authorized to use it, including Gwendolen.
Requests for Merlin6 access must be submitted using the Request Linux Group Membership form, available in the PSI ServiceNow Service Catalog. Access is granted by requesting membership in a Unix group that is permitted to use the cluster.
"},{"location":"merlin6/quick-start-guide/requesting-accounts/#mandatory-fields","title":"Mandatory fields","text":"The following fields must be completed:
Once the request is submitted, the corresponding group administrators will review and approve it as soon as possible (typically within a few working hours). After approval, it may take up to 30 minutes for the account to be fully configured and access to become effective.
"},{"location":"merlin6/quick-start-guide/requesting-accounts/#further-documentation","title":"Further documentation","text":"Additional information is available in the Linux Central Documentation:
A project owns its own storage area in Merlin, which can be accessed by other group members.
Projects can receive a higher storage quota than user areas and should be the primary way of organizing bigger storage requirements in a multi-user collaboration.
Access to a project's directories is governed by project members belonging to a common Unix group. You may use an existing Unix group or you may have a new Unix group created especially for the project. The project responsible will be the owner of the Unix group (this is important)!
This document explains how to request new Unix group, to request membership for existing groups, and the procedure for requesting a Merlin project.
"},{"location":"merlin6/quick-start-guide/requesting-projects/#about-unix-groups","title":"About Unix groups","text":"Before requesting a Merlin project, it is important to have a Unix group that can be used to grant access to it to different members of the project.
Unix groups in the PSI Active Directory (which is the PSI central database containing user and group information, and more) are defined by the unx- prefix, followed by a name. In general, PSI employees working on Linux systems (including HPC clusters, like Merlin) can request for a non-existing Unix group, and can become responsible for managing it. In addition, a list of administrators can be set. The administrators, together with the group manager, can approve or deny membership requests. Further information about this topic is covered in the Linux Documentation - Services Admin Guides: Unix Groups / Group Management, managed by the Central Linux Team.
To gran access to specific Merlin project directories, some users may require to be added to some specific Unix groups:
/data/project/{bio|general}/$projectname) or experiment (i.e. /data/experiment/$experimentname) directory has access restricted by ownership and group membership (with a very few exceptions allowing public access).If you need a new Unix group to be created, you need to first get this group through a separate PSI Service Now ticket. Please use the following template. You can also specify the login names of the initial group members and the owner of the group. The owner of the group is the person who will be allowed to modify the group.
Subject: Request for new unix group xxxx\n Dear HelpDesk\n\nI would like to request a new unix group.\n\nUnix Group Name: unx-xxxxx\nInitial Group Members: xxxxx, yyyyy, zzzzz, ...\nGroup Owner: xxxxx\nGroup Administrators: aaaaa, bbbbb, ccccc, ....\n\nBest regards,\n"},{"location":"merlin6/quick-start-guide/requesting-projects/#requesting-unix-group-membership","title":"Requesting Unix group membership","text":"Existing Merlin projects have already a Unix group assigned. To have access to a project, users must belong to the proper Unix group owning that project. Supervisors should inform new users which extra groups are needed for their project(s). If this information is not known, one can check the permissions for that directory. In example:
Bash(base) \u2744 [caubet_m@merlin-l-001:/data/user/caubet_m]# ls -ltrhd /data/project/general/$projectname\n(base) \u2744 [caubet_m@merlin-l-001:/data/user/caubet_m]# ls -ltrhd /data/project/bio/$projectname\n Requesting membership for a specific Unix group has to be done with the corresponding Request Linux Group Membership form, available in the PSI Service Now Service Catalog.
Once submitted, the responsible of the Unix group has to approve the request.
Important note: Requesting access to specific Unix Groups will require validation from the responsible of the Unix Group. If you ask for inclusion in many groups it may take longer, since the fulfillment of the request will depend on more people.
Further information can be found in the Linux Documentation - Services User guide: Unix Groups / Group Management
"},{"location":"merlin6/quick-start-guide/requesting-projects/#managing-unix-groups","title":"Managing Unix Groups","text":"Other administration operations on Unix Groups it's mainly covered in the Linux Documentation - Services Admin Guides: Unix Groups / Group Management, managed by the Central Linux Team.
"},{"location":"merlin6/quick-start-guide/requesting-projects/#requesting-a-merlin-project_1","title":"Requesting a Merlin project","text":"Once a Unix group is available, a Merlin project can be requested. To request a project, please provide the following information in a PSI Service Now ticket
Subject: [Merlin6] Project Request for project name xxxxxx\n Dear HelpDesk\n\nI would like to request a new Merlin6 project.\n\nProject Name: xxxxx\nUnixGroup: xxxxx # Must be an existing Unix Group\n\nThe project responsible is the Owner of the Unix Group.\nIf you need a storage quota exceeding the defaults, please provide a description\nand motivation for the higher storage needs:\n\nStorage Quota: 1TB with a maximum of 1M Files\nReason: (None for default 1TB/1M)\n\nBest regards,\n The default storage quota for a project is 1TB (with a maximal Number of Files of 1M). If you need a larger assignment, you need to request this and provide a description of your storage needs.
"},{"location":"merlin6/quick-start-guide/requesting-projects/#further-documentation","title":"Further documentation","text":"Further information it's also available in the Linux Central Documentation:
Special thanks to the Linux Central Team and AIT to make this possible.
"},{"location":"merlin6/slurm-general-docs/interactive-jobs/","title":"Running Interactive Jobs","text":""},{"location":"merlin6/slurm-general-docs/interactive-jobs/#running-interactive-jobs","title":"Running Interactive Jobs","text":""},{"location":"merlin6/slurm-general-docs/interactive-jobs/#running-interactive-jobs_1","title":"Running interactive jobs","text":"There are two different ways for running interactive jobs in Slurm. This is possible by using the salloc and srun commands:
salloc: to obtain a Slurm job allocation (a set of nodes), execute command(s), and then release the allocation when the command is finished.srun: is used for running parallel tasks.Is run is used to run parallel jobs in the batch system. It can be used within a batch script (which can be run with sbatch), or within a job allocation (which can be run with salloc). Also, it can be used as a direct command (in example, from the login nodes).
When used inside a batch script or during a job allocation, srun is constricted to the amount of resources allocated by the sbatch/salloc commands. In sbatch, usually these resources are defined inside the batch script with the format #SBATCH <option>=<value>. In other words, if you define in your batch script or allocation 88 tasks (and 1 thread / core) and 2 nodes, srun is constricted to these amount of resources (you can use less, but never exceed those limits).
When used from the login node, usually is used to run a specific command or software in an interactive way. srun is a blocking process (it will block bash prompt until the srun command finishes, unless you run it in background with &). This can be very useful to run interactive software which pops up a Window and then submits jobs or run sub-tasks in the background (in example, Relion, cisTEM, etc.)
Refer to man srun for exploring all possible options for that command.
(base) [caubet_m@merlin-l-001 ~]$ srun --clusters=merlin6 --ntasks=6 --ntasks-per-node=2 --nodes=3 hostname\nsrun: job 135088230 queued and waiting for resources\nsrun: job 135088230 has been allocated resources\nmerlin-c-102.psi.ch\nmerlin-c-102.psi.ch\nmerlin-c-101.psi.ch\nmerlin-c-101.psi.ch\nmerlin-c-103.psi.ch\nmerlin-c-103.psi.ch\n"},{"location":"merlin6/slurm-general-docs/interactive-jobs/#salloc","title":"salloc","text":"salloc is used to obtain a Slurm job allocation (a set of nodes). Once job is allocated, users are able to execute interactive command(s). Once finished (exit or Ctrl+D), the allocation is released. salloc is a blocking command, it is, command will be blocked until the requested resources are allocated.
When running salloc, once the resources are allocated, by default the user will get a new shell on one of the allocated resources (if a user has requested few nodes, it will prompt a new shell on the first allocated node). However, this behaviour can be changed by adding a shell ($SHELL) at the end of the salloc command. In example:
# Typical 'salloc' call\n# - Same as running:\n# 'salloc --clusters=merlin6 -N 2 -n 2 srun -n1 -N1 --mem-per-cpu=0 --gres=gpu:0 --pty --preserve-env --mpi=none $SHELL'\nsalloc --clusters=merlin6 -N 2 -n 2\n\n# Custom 'salloc' call\n# - $SHELL will open a local shell on the login node from where ``salloc`` is running\nsalloc --clusters=merlin6 -N 2 -n 2 $SHELL\n Allocating 2 cores (1 task/core) in 2 nodes (1 core/node) - default Bash Session(base) [caubet_m@merlin-l-001 ~]$ salloc --clusters=merlin6 --ntasks=2 --nodes=2\nsalloc: Pending job allocation 135171306\nsalloc: job 135171306 queued and waiting for resources\nsalloc: job 135171306 has been allocated resources\nsalloc: Granted job allocation 135171306\n\n(base) [caubet_m@merlin-c-213 ~]$ srun hostname\nmerlin-c-213.psi.ch\nmerlin-c-214.psi.ch\n\n(base) [caubet_m@merlin-c-213 ~]$ exit\nexit\nsalloc: Relinquishing job allocation 135171306\n\n(base) [caubet_m@merlin-l-001 ~]$ salloc --clusters=merlin6 -N 2 -n 2 srun -n1 -N1 --mem-per-cpu=0 --gres=gpu:0 --pty --preserve-env --mpi=none $SHELL\nsalloc: Pending job allocation 135171342\nsalloc: job 135171342 queued and waiting for resources\nsalloc: job 135171342 has been allocated resources\nsalloc: Granted job allocation 135171342\n\n(base) [caubet_m@merlin-c-021 ~]$ srun hostname\nmerlin-c-021.psi.ch\nmerlin-c-022.psi.ch\n\n(base) [caubet_m@merlin-c-021 ~]$ exit\nexit\nsalloc: Relinquishing job allocation 135171342\n Allocating 2 cores (1 task/core) in 2 nodes (1 core/node) - $SHELL Bash Session(base) [caubet_m@merlin-export-01 ~]$ salloc --clusters=merlin6 --ntasks=2 --nodes=2 $SHELL\nsalloc: Pending job allocation 135171308\nsalloc: job 135171308 queued and waiting for resources\nsalloc: job 135171308 has been allocated resources\nsalloc: Granted job allocation 135171308\n\n(base) [caubet_m@merlin-export-01 ~]$ srun hostname\nmerlin-c-218.psi.ch\nmerlin-c-117.psi.ch\n\n(base) [caubet_m@merlin-export-01 ~]$ exit\nexit\nsalloc: Relinquishing job allocation 135171308\n"},{"location":"merlin6/slurm-general-docs/interactive-jobs/#running-interactive-jobs-with-x11-support","title":"Running interactive jobs with X11 support","text":""},{"location":"merlin6/slurm-general-docs/interactive-jobs/#requirements","title":"Requirements","text":""},{"location":"merlin6/slurm-general-docs/interactive-jobs/#graphical-access","title":"Graphical access","text":"NoMachine is the official supported service for graphical access in the Merlin cluster. This service is running on the login nodes. Check the document {Accessing Merlin -> NoMachine} for details about how to connect to the NoMachine service in the Merlin cluster.
For other non officially supported graphical access (X11 forwarding):
Merlin5 and Merlin6 clusters allow running any windows based applications. For that, you need to add the option --x11 to the srun command. In example:
srun --clusters=merlin6 --x11 xclock\n will popup a X11 based clock.
In the same manner, you can create a bash shell with x11 support. For doing that, you need to add the option --pty to the srun --x11 command. Once resource is allocated, from there you can interactively run X11 and non-X11 based commands.
srun --clusters=merlin6 --x11 --pty bash\n Using 'srun' with X11 support Bash Session(base) [caubet_m@merlin-l-001 ~]$ srun --clusters=merlin6 --x11 xclock\nsrun: job 135095591 queued and waiting for resources\nsrun: job 135095591 has been allocated resources\n\n(base) [caubet_m@merlin-l-001 ~]$\n\n(base) [caubet_m@merlin-l-001 ~]$ srun --clusters=merlin6 --x11 --pty bash\nsrun: job 135095592 queued and waiting for resources\nsrun: job 135095592 has been allocated resources\n\n(base) [caubet_m@merlin-c-205 ~]$ xclock\n\n(base) [caubet_m@merlin-c-205 ~]$ echo \"This was an example\"\nThis was an example\n\n(base) [caubet_m@merlin-c-205 ~]$ exit\nexit\n"},{"location":"merlin6/slurm-general-docs/interactive-jobs/#salloc-with-x11-support","title":"'salloc' with x11 support","text":"Merlin5 and Merlin6 clusters allow running any windows based applications. For that, you need to add the option --x11 to the salloc command. In example:
salloc --clusters=merlin6 --x11 xclock\n will popup a X11 based clock.
In the same manner, you can create a bash shell with x11 support. For doing that, you need to add to run just salloc --clusters=merlin6 --x11. Once resource is allocated, from there you can interactively run X11 and non-X11 based commands.
salloc --clusters=merlin6 --x11\n Using 'salloc' with X11 support examples Bash Session(base) [caubet_m@merlin-l-001 ~]$ salloc --clusters=merlin6 --x11 xclock\nsalloc: Pending job allocation 135171355\nsalloc: job 135171355 queued and waiting for resources\nsalloc: job 135171355 has been allocated resources\nsalloc: Granted job allocation 135171355\nsalloc: Relinquishing job allocation 135171355\n\n(base) [caubet_m@merlin-l-001 ~]$ salloc --clusters=merlin6 --x11\nsalloc: Pending job allocation 135171349\nsalloc: job 135171349 queued and waiting for resources\nsalloc: job 135171349 has been allocated resources\nsalloc: Granted job allocation 135171349\nsalloc: Waiting for resource configuration\nsalloc: Nodes merlin-c-117 are ready for job\n\n(base) [caubet_m@merlin-c-117 ~]$ xclock\n\n(base) [caubet_m@merlin-c-117 ~]$ echo \"This was an example\"\nThis was an example\n\n(base) [caubet_m@merlin-c-117 ~]$ exit\nexit\nsalloc: Relinquishing job allocation 135171349\n"},{"location":"merlin6/slurm-general-docs/monitoring/","title":"Monitoring","text":""},{"location":"merlin6/slurm-general-docs/monitoring/#monitoring","title":"Monitoring","text":""},{"location":"merlin6/slurm-general-docs/monitoring/#slurm-monitoring","title":"Slurm Monitoring","text":""},{"location":"merlin6/slurm-general-docs/monitoring/#job-status","title":"Job status","text":"The status of submitted jobs can be check with the squeue command:
squeue -u $username\n Common statuses:
scancel to remove the job and resubmit with fewer resources, or else wait for your other jobs to finish.scancel and resubmit to a different partition (-p) or with fewer resources.Check in the man pages (man squeue) for all possible options for this command.
# squeue -u feichtinger\n JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON)\n134332544 general spawner- feichtin R 5-06:47:45 1 merlin-c-204\n134321376 general subm-tal feichtin R 5-22:27:59 1 merlin-c-204\n"},{"location":"merlin6/slurm-general-docs/monitoring/#partition-status","title":"Partition status","text":"The status of the nodes and partitions (a.k.a. queues) can be seen with the sinfo command:
sinfo\n Check in the man pages (man sinfo) for all possible options for this command.
# sinfo -l\nThu Jan 23 16:34:49 2020\nPARTITION AVAIL TIMELIMIT JOB_SIZE ROOT OVERSUBS GROUPS NODES STATE NODELIST\ntest up 1-00:00:00 1-infinite no NO all 3 mixed merlin-c-[024,223-224]\ntest up 1-00:00:00 1-infinite no NO all 2 allocated merlin-c-[123-124]\ntest up 1-00:00:00 1-infinite no NO all 1 idle merlin-c-023\ngeneral* up 7-00:00:00 1-50 no NO all 6 mixed merlin-c-[007,204,207-209,219]\ngeneral* up 7-00:00:00 1-50 no NO all 57 allocated merlin-c-[001-005,008-020,101-122,201-203,205-206,210-218,220-222]\ngeneral* up 7-00:00:00 1-50 no NO all 3 idle merlin-c-[006,021-022]\ndaily up 1-00:00:00 1-60 no NO all 9 mixed merlin-c-[007,024,204,207-209,219,223-224]\ndaily up 1-00:00:00 1-60 no NO all 59 allocated merlin-c-[001-005,008-020,101-124,201-203,205-206,210-218,220-222]\ndaily up 1-00:00:00 1-60 no NO all 4 idle merlin-c-[006,021-023]\nhourly up 1:00:00 1-infinite no NO all 9 mixed merlin-c-[007,024,204,207-209,219,223-224]\nhourly up 1:00:00 1-infinite no NO all 59 allocated merlin-c-[001-005,008-020,101-124,201-203,205-206,210-218,220-222]\nhourly up 1:00:00 1-infinite no NO all 4 idle merlin-c-[006,021-023]\ngpu up 7-00:00:00 1-infinite no NO all 1 mixed merlin-g-007\ngpu up 7-00:00:00 1-infinite no NO all 8 allocated merlin-g-[001-006,008-009]\n"},{"location":"merlin6/slurm-general-docs/monitoring/#job-accounting","title":"Job accounting","text":"Users can check detailed information of jobs (pending, running, completed, failed, etc.) with the sacct command. This command is very flexible and can provide a lot of information. For checking all the available options, please read man sacct. Below, we summarize some examples that can be useful for the users:
# Today jobs, basic summary\nsacct\n\n# Today jobs, with details\nsacct --long\n\n# Jobs from January 1, 2022, 12pm, with details\nsacct -S 2021-01-01T12:00:00 --long\n\n# Specific job accounting\nsacct --long -j $jobid\n\n# Jobs custom details, without steps (-X)\nsacct -X --format=User%20,JobID,Jobname,partition,state,time,submit,start,end,elapsed,AveRss,MaxRss,MaxRSSTask,MaxRSSNode%20,MaxVMSize,nnodes,ncpus,ntasks,reqcpus,totalcpu,reqmem,cluster,TimeLimit,TimeLimitRaw,cputime,nodelist%50,AllocTRES%80\n\n# Jobs custom details, with steps\nsacct --format=User%20,JobID,Jobname,partition,state,time,submit,start,end,elapsed,AveRss,MaxRss,MaxRSSTask,MaxRSSNode%20,MaxVMSize,nnodes,ncpus,ntasks,reqcpus,totalcpu,reqmem,cluster,TimeLimit,TimeLimitRaw,cputime,nodelist%50,AllocTRES%80\n"},{"location":"merlin6/slurm-general-docs/monitoring/#job-efficiency","title":"Job efficiency","text":"Users can check how efficient are their jobs. For that, the seff command is available.
seff $jobid\n Using 'seff' example Bash Session# seff 134333893\nJob ID: 134333893\nCluster: merlin6\nUser/Group: albajacas_a/unx-sls\nState: COMPLETED (exit code 0)\nNodes: 1\nCores per node: 8\nCPU Utilized: 00:26:15\nCPU Efficiency: 49.47% of 00:53:04 core-walltime\nJob Wall-clock time: 00:06:38\nMemory Utilized: 60.73 MB\nMemory Efficiency: 0.19% of 31.25 GB\n"},{"location":"merlin6/slurm-general-docs/monitoring/#list-job-attributes","title":"List job attributes","text":"The sjstat command is used to display statistics of jobs under control of SLURM. To use it
sjstat\n Using 'sjstat' example Bash Session# sjstat -v\n\nScheduling pool data:\n----------------------------------------------------------------------------------\n Total Usable Free Node Time Other\nPool Memory Cpus Nodes Nodes Nodes Limit Limit traits\n----------------------------------------------------------------------------------\ntest 373502Mb 88 6 6 1 UNLIM 1-00:00:00\ngeneral* 373502Mb 88 66 66 8 50 7-00:00:00\ndaily 373502Mb 88 72 72 9 60 1-00:00:00\nhourly 373502Mb 88 72 72 9 UNLIM 01:00:00\ngpu 128000Mb 8 1 1 0 UNLIM 7-00:00:00\ngpu 128000Mb 20 8 8 0 UNLIM 7-00:00:00\n\nRunning job data:\n---------------------------------------------------------------------------------------------------\n Time Time Time\nJobID User Procs Pool Status Used Limit Started Master/Other\n---------------------------------------------------------------------------------------------------\n13433377 collu_g 1 gpu PD 0:00 24:00:00 N/A (Resources)\n13433389 collu_g 20 gpu PD 0:00 24:00:00 N/A (Resources)\n13433382 jaervine 4 gpu PD 0:00 24:00:00 N/A (Priority)\n13433386 barret_d 20 gpu PD 0:00 24:00:00 N/A (Priority)\n13433382 pamula_f 20 gpu PD 0:00 168:00:00 N/A (Priority)\n13433387 pamula_f 4 gpu PD 0:00 24:00:00 N/A (Priority)\n13433365 andreani 132 daily PD 0:00 24:00:00 N/A (Dependency)\n13433388 marino_j 6 gpu R 1:43:12 168:00:00 01-23T14:54:57 merlin-g-007\n13433377 choi_s 40 gpu R 2:09:55 48:00:00 01-23T14:28:14 merlin-g-006\n13433373 qi_c 20 gpu R 7:00:04 24:00:00 01-23T09:38:05 merlin-g-004\n13433390 jaervine 2 gpu R 5:18 24:00:00 01-23T16:32:51 merlin-g-007\n13433390 jaervine 2 gpu R 15:18 24:00:00 01-23T16:22:51 merlin-g-007\n13433375 bellotti 4 gpu R 7:35:44 9:00:00 01-23T09:02:25 merlin-g-001\n13433358 bellotti 1 gpu R 1-05:52:19 144:00:00 01-22T10:45:50 merlin-g-007\n13433377 lavriha_ 20 gpu R 5:13:24 24:00:00 01-23T11:24:45 merlin-g-008\n13433370 lavriha_ 40 gpu R 22:43:09 24:00:00 01-22T17:55:00 merlin-g-003\n13433373 qi_c 20 gpu R 15:03:15 24:00:00 01-23T01:34:54 merlin-g-002\n13433371 qi_c 4 gpu R 22:14:14 168:00:00 01-22T18:23:55 merlin-g-001\n13433254 feichtin 2 general R 5-07:26:11 156:00:00 01-18T09:11:58 merlin-c-204\n13432137 feichtin 2 general R 5-23:06:25 160:00:00 01-17T17:31:44 merlin-c-204\n13433389 albajaca 32 hourly R 41:19 1:00:00 01-23T15:56:50 merlin-c-219\n13433387 riemann_ 2 general R 1:51:47 4:00:00 01-23T14:46:22 merlin-c-204\n13433370 jimenez_ 2 general R 23:20:45 168:00:00 01-22T17:17:24 merlin-c-106\n13433381 jimenez_ 2 general R 4:55:33 168:00:00 01-23T11:42:36 merlin-c-219\n13433390 sayed_m 128 daily R 21:49 10:00:00 01-23T16:16:20 merlin-c-223\n13433359 adelmann 2 general R 1-05:00:09 48:00:00 01-22T11:38:00 merlin-c-204\n13433377 zimmerma 2 daily R 6:13:38 24:00:00 01-23T10:24:31 merlin-c-007\n13433375 zohdirad 24 daily R 7:33:16 10:00:00 01-23T09:04:53 merlin-c-218\n13433363 zimmerma 6 general R 1-02:54:20 47:50:00 01-22T13:43:49 merlin-c-106\n13433376 zimmerma 6 general R 7:25:42 23:50:00 01-23T09:12:27 merlin-c-007\n13433371 vazquez_ 16 daily R 21:46:31 23:59:00 01-22T18:51:38 merlin-c-106\n13433382 vazquez_ 16 daily R 4:09:23 23:59:00 01-23T12:28:46 merlin-c-024\n13433376 jiang_j1 440 daily R 7:11:14 10:00:00 01-23T09:26:55 merlin-c-123\n13433376 jiang_j1 24 daily R 7:08:19 10:00:00 01-23T09:29:50 merlin-c-220\n13433384 kranjcev 440 daily R 2:48:19 24:00:00 01-23T13:49:50 merlin-c-108\n13433371 vazquez_ 16 general R 20:15:15 120:00:00 01-22T20:22:54 merlin-c-210\n13433371 vazquez_ 16 general R 21:15:51 120:00:00 01-22T19:22:18 merlin-c-210\n13433374 colonna_ 176 daily R 8:23:18 24:00:00 01-23T08:14:51 merlin-c-211\n13433374 bures_l 88 daily R 10:45:06 24:00:00 01-23T05:53:03 merlin-c-001\n13433375 derlet 88 daily R 7:32:05 24:00:00 01-23T09:06:04 merlin-c-107\n13433373 derlet 88 daily R 17:21:57 24:00:00 01-22T23:16:12 merlin-c-002\n13433373 derlet 88 daily R 18:13:05 24:00:00 01-22T22:25:04 merlin-c-112\n13433365 andreani 264 daily R 4:10:08 24:00:00 01-23T12:28:01 merlin-c-003\n13431187 mahrous_ 88 general R 6-15:59:16 168:00:00 01-17T00:38:53 merlin-c-111\n13433387 kranjcev 2 general R 1:48:47 4:00:00 01-23T14:49:22 merlin-c-204\n13433368 karalis_ 352 general R 1-00:05:22 96:00:00 01-22T16:32:47 merlin-c-013\n13433367 karalis_ 352 general R 1-00:06:44 96:00:00 01-22T16:31:25 merlin-c-118\n13433385 karalis_ 352 general R 1:37:24 96:00:00 01-23T15:00:45 merlin-c-213\n13433374 sato 256 general R 14:55:55 24:00:00 01-23T01:42:14 merlin-c-204\n13433374 sato 64 general R 10:43:35 24:00:00 01-23T05:54:34 merlin-c-106\n67723568 sato 32 general R 10:40:07 24:00:00 01-23T05:58:02 merlin-c-007\n13433265 khanppna 440 general R 3-18:20:58 168:00:00 01-19T22:17:11 merlin-c-008\n13433375 khanppna 704 general R 7:31:24 24:00:00 01-23T09:06:45 merlin-c-101\n13433371 khanppna 616 general R 21:40:33 24:00:00 01-22T18:57:36 merlin-c-208\n"},{"location":"merlin6/slurm-general-docs/monitoring/#graphical-user-interface","title":"Graphical user interface","text":"When using ssh with X11 forwarding (ssh -XY), or when using NoMachine, users can use sview. SView is a graphical user interface to view and modify Slurm states. To run sview:
ssh -XY $username@merlin-l-001.psi.ch # Not necessary when using NoMachine\nsview\n "},{"location":"merlin6/slurm-general-docs/monitoring/#general-monitoring","title":"General Monitoring","text":"The following pages contain basic monitoring for Slurm and computing nodes. Currently, monitoring is based on Grafana + InfluxDB. In the future it will be moved to a different service based on ElasticSearch + LogStash + Kibana.
In the meantime, the following monitoring pages are available in a best effort support:
"},{"location":"merlin6/slurm-general-docs/monitoring/#merlin6-monitoring-pages","title":"Merlin6 Monitoring Pages","text":"Before starting using the cluster, please read the following rules:
--time=<D-HH:MM:SS> for that.hourly get more priority than jobs submitted to daily: always use hourly for jobs shorter than 1 hour.daily get more priority than jobs submitted to general: always use daily for jobs shorter than 1 day.Tip
Having a good estimation of the time needed by your jobs, a proper way for running them, and optimizing the jobs to run within one day will contribute to make the system fairly and efficiently used.
"},{"location":"merlin6/slurm-general-docs/running-jobs/#basic-commands-for-running-batch-scripts","title":"Basic commands for running batch scripts","text":"sbatch for submitting a batch script to Slurm.srun for running parallel tasks.squeue for checking jobs status.scancel for cancelling/deleting a job from the queue.Tip
Use Linux man pages when needed (i.e. man sbatch), mostly for checking the available options for the above commands.
For a complete list of options and parameters available is recommended to use the man pages (i.e. man sbatch, man srun, man salloc).
Please, notice that behaviour for some parameters might change depending on the command used when running jobs (in example, --exclusive behaviour in sbatch differs from srun).
In this chapter we show the basic parameters which are usually needed in the Merlin cluster.
"},{"location":"merlin6/slurm-general-docs/running-jobs/#common-settings","title":"Common settings","text":"The following settings are the minimum required for running a job in the Merlin CPU and GPU nodes. Please, consider taking a look to the man pages (i.e. man sbatch, man salloc, man srun) for more information about all possible options. Also, do not hesitate to contact us on any questions.
#SBATCH --clusters=<cluster_name> # Possible values: merlin6, gmerlin6\n Refer to the documentation of each cluster (merlin6,gmerlin6 for further information.
#SBATCH --partition=<partition_name> # Check each cluster documentation for possible values\n Refer to the documentation of each cluster (merlin6,gmerlin6 for further information.
#SBATCH --exclusive # Only if you want a dedicated node\n MaxTime of the affected partition.#SBATCH --time=<D-HH:MM:SS> # Can not exceed the partition `MaxTime`\n Refer to the documentation of each cluster (merlin6,gmerlin6 for further information about partition MaxTime values.
slurm-%j.out, where %j is the job_id) and error (slurm-%j.err, where %j is the job_id) files in the directory from where the job was submitted. Users can change default name with the following options:#SBATCH --output=<filename> # Can include path. Patterns accepted (i.e. %j)\n#SBATCH --error=<filename> # Can include path. Patterns accepted (i.e. %j)\n Use man sbatch (man sbatch | grep -A36 '^filename pattern') for getting a list specification of filename patterns.
#SBATCH --hint=multithread # Use extra threads with in-core multi-threading.\n#SBATCH --hint=nomultithread # Don't use extra threads with in-core multi-threading.\n Refer to the documentation of each cluster (merlin6,gmerlin6 for further information about node configuration and Hyper-Threading. Consider that, sometimes, depending on your job requirements, you might need also to setup how many --ntasks-per-core or --cpus-per-task (even other options) in addition to the --hint command. Please, contact us in case of doubts.
!!! tip In general, for the cluster merlin6 --hint=[no]multithread is a recommended field. On the other hand, --ntasks-per-core is only needed when one needs to define how a task should be handled within a core, and this setting will not be generally used on Hybrid MPI/OpenMP jobs where multiple cores are needed for single tasks.
The following examples apply to the Merlin6 cluster.
"},{"location":"merlin6/slurm-general-docs/running-jobs/#nomultithreaded-jobs-template","title":"Nomultithreaded jobs template","text":"The following template should be used by any user submitting jobs to the Merlin6 CPU nodes:
Bash#!/bin/bash\n#SBATCH --cluster=merlin6 # Cluster name\n#SBATCH --partition=general,daily,hourly # Specify one or multiple partitions\n#SBATCH --time=<D-HH:MM:SS> # Strongly recommended\n#SBATCH --output=<output_file> # Generate custom output file\n#SBATCH --error=<error_file> # Generate custom error file\n#SBATCH --hint=nomultithread # Mandatory for multithreaded jobs\n##SBATCH --exclusive # Uncomment if you need exclusive node usage\n##SBATCH --ntasks-per-core=1 # Only mandatory for multithreaded single tasks\n\n## Advanced options example\n##SBATCH --nodes=1 # Uncomment and specify #nodes to use\n##SBATCH --ntasks=44 # Uncomment and specify #nodes to use\n##SBATCH --ntasks-per-node=44 # Uncomment and specify #tasks per node\n##SBATCH --cpus-per-task=44 # Uncomment and specify the number of cores per task\n"},{"location":"merlin6/slurm-general-docs/running-jobs/#multithreaded-jobs-template","title":"Multithreaded jobs template","text":"The following template should be used by any user submitting jobs to the Merlin6 CPU nodes:
Bash#!/bin/bash\n#SBATCH --cluster=merlin6 # Cluster name\n#SBATCH --partition=general,daily,hourly # Specify one or multiple partitions\n#SBATCH --time=<D-HH:MM:SS> # Strongly recommended\n#SBATCH --output=<output_file> # Generate custom output file\n#SBATCH --error=<error_file> # Generate custom error file\n#SBATCH --hint=multithread # Mandatory for multithreaded jobs\n##SBATCH --exclusive # Uncomment if you need exclusive node usage\n##SBATCH --ntasks-per-core=2 # Only mandatory for multithreaded single tasks\n\n## Advanced options example\n##SBATCH --nodes=1 # Uncomment and specify #nodes to use\n##SBATCH --ntasks=88 # Uncomment and specify #nodes to use\n##SBATCH --ntasks-per-node=88 # Uncomment and specify #tasks per node\n##SBATCH --cpus-per-task=88 # Uncomment and specify the number of cores per task\n"},{"location":"merlin6/slurm-general-docs/running-jobs/#gpu-based-jobs-templates","title":"GPU-based jobs templates","text":"The following template should be used by any user submitting jobs to GPU nodes:
Bash#!/bin/bash\n#SBATCH --cluster=gmerlin6 # Cluster name\n#SBATCH --partition=gpu,gpu-short # Specify one or multiple partitions, or\n#SBATCH --partition=gwendolen,gwendolen-long # Only for Gwendolen users\n#SBATCH --gpus=\"<type>:<num_gpus>\" # <type> is optional, <num_gpus> is mandatory\n#SBATCH --time=<D-HH:MM:SS> # Strongly recommended\n#SBATCH --output=<output_file> # Generate custom output file\n#SBATCH --error=<error_file> # Generate custom error file\n##SBATCH --exclusive # Uncomment if you need exclusive node usage\n\n## Advanced options example\n##SBATCH --nodes=1 # Uncomment and specify number of nodes to use\n##SBATCH --ntasks=1 # Uncomment and specify number of nodes to use\n##SBATCH --cpus-per-gpu=5 # Uncomment and specify the number of cores per task\n##SBATCH --mem-per-gpu=16000 # Uncomment and specify the number of cores per task\n##SBATCH --gpus-per-node=<type>:2 # Uncomment and specify the number of GPUs per node\n##SBATCH --gpus-per-socket=<type>:2 # Uncomment and specify the number of GPUs per socket\n##SBATCH --gpus-per-task=<type>:1 # Uncomment and specify the number of GPUs per task\n"},{"location":"merlin6/slurm-general-docs/running-jobs/#advanced-configurations","title":"Advanced configurations","text":""},{"location":"merlin6/slurm-general-docs/running-jobs/#array-jobs-launching-a-large-number-of-related-jobs","title":"Array Jobs: launching a large number of related jobs","text":"If you need to run a large number of jobs based on the same executable with systematically varying inputs, e.g. for a parameter sweep, you can do this most easily in form of a simple array job.
Bash#!/bin/bash\n#SBATCH --job-name=test-array\n#SBATCH --partition=daily\n#SBATCH --ntasks=1\n#SBATCH --time=08:00:00\n#SBATCH --array=1-8\n\necho $(date) \"I am job number ${SLURM_ARRAY_TASK_ID}\"\nsrun myprogram config-file-${SLURM_ARRAY_TASK_ID}.dat\n This will run 8 independent jobs, where each job can use the counter variable SLURM_ARRAY_TASK_ID defined by Slurm inside of the job's environment to feed the correct input arguments or configuration file to the \"myprogram\" executable. Each job will receive the same set of configurations (e.g. time limit of 8h in the example above).
The jobs are independent, but they will run in parallel (if the cluster resources allow for it). The jobs will get JobIDs like {some-number}_0 to {some-number}_7, and they also will each have their own output file.
Note
#SBATCH --array=1-100%5 syntax. The %5 will define that only 5 sub jobs may ever run in parallel.You also can use an array job approach to run over all files in a directory, substituting the payload with
BashFILES=(/path/to/data/*)\nsrun ./myprogram ${FILES[$SLURM_ARRAY_TASK_ID]}\n Or for a trivial case you could supply the values for a parameter scan in form of a argument list that gets fed to the program using the counter variable.
BashARGS=(0.05 0.25 0.5 1 2 5 100)\nsrun ./my_program.exe ${ARGS[$SLURM_ARRAY_TASK_ID]}\n"},{"location":"merlin6/slurm-general-docs/running-jobs/#array-jobs-running-very-long-tasks-with-checkpoint-files","title":"Array jobs: running very long tasks with checkpoint files","text":"If you need to run a job for much longer than the queues (partitions) permit, and your executable is able to create checkpoint files, you can use this strategy:
Bash#!/bin/bash\n#SBATCH --job-name=test-checkpoint\n#SBATCH --partition=general\n#SBATCH --ntasks=1\n#SBATCH --time=7-00:00:00 # each job can run for 7 days\n#SBATCH --cpus-per-task=1\n#SBATCH --array=1-10%1 # Run a 10-job array, one job at a time.\nif test -e checkpointfile; then\n # There is a checkpoint file;\n myprogram --read-checkp checkpointfile\nelse\n # There is no checkpoint file, start a new simulation.\n myprogram\nfi\n The %1 in the #SBATCH --array=1-10%1 statement defines that only 1 subjob can ever run in parallel, so this will result in subjob n+1 only being started when job n has finished. It will read the checkpoint file if it is present.
Since the launching of a Slurm job incurs some overhead, you should not submit each short task as a separate Slurm job. Use job packing, i.e. you run the short tasks within the loop of a single Slurm job.
You can launch the short tasks using srun with the --exclusive switch (not to be confused with the switch of the same name used in the SBATCH commands). This switch will ensure that only a specified number of tasks can run in parallel.
As an example, the following job submission script will ask Slurm for 44 cores (threads), then it will run the =myprog= program 1000 times with arguments passed from 1 to 1000. But with the =-N1 -n1 -c1 --exclusive= option, it will control that at any point in time only 44 instances are effectively running, each being allocated one CPU. You can at this point decide to allocate several CPUs or tasks by adapting the corresponding parameters.
Bash#! /bin/bash\n#SBATCH --job-name=test-checkpoint\n#SBATCH --partition=general\n#SBATCH --ntasks=1\n#SBATCH --time=7-00:00:00\n#SBATCH --ntasks=44 # defines the number of parallel tasks\nfor i in {1..1000}\ndo\n srun -N1 -n1 -c1 --exclusive ./myprog $i &\ndone\nwait\n Note
The & at the end of the srun line is needed to not have the script waiting (blocking). The wait command waits for all such background tasks to finish and returns the exit code.
In this document some basic commands for using Slurm are showed. Advanced examples for some of these are explained in other Merlin6 Slurm pages. You can always use man <command> pages for more information about options and examples.
Useful commands for the slurm:
Bashsinfo # to see the name of nodes, their occupancy,\n # name of slurm partitions, limits (try out with \"-l\" option)\nsqueue # to see the currently running/waiting jobs in slurm\n # (additional \"-l\" option may also be useful)\nsbatch Script.sh # to submit a script (example below) to the slurm.\nsrun <command> # to submit a command to Slurm. Same options as in 'sbatch' can be used.\nsalloc # to allocate computing nodes. Use for interactive runs.\nscancel job_id # to cancel slurm job, job id is the numeric id, seen by the squeue.\nsview # X interface for managing jobs and track job run information.\nseff # Calculates the efficiency of a job\nsjstat # List attributes of jobs under the SLURM control\nsacct # Show job accounting, useful for checking details of finished jobs.\n"},{"location":"merlin6/slurm-general-docs/slurm-basic-commands/#advanced-basic-commands","title":"Advanced basic commands","text":"Bashsinfo -N -l # list nodes, state, resources (#CPUs, memory per node, ...), etc.\nsshare -a # to list shares of associations to a cluster\nsprio -l # to view the factors that comprise a job's scheduling priority\n # add '-u <username>' for filtering user\n"},{"location":"merlin6/slurm-general-docs/slurm-examples/","title":"Slurm Examples","text":""},{"location":"merlin6/slurm-general-docs/slurm-examples/#slurm-examples","title":"Slurm Examples","text":""},{"location":"merlin6/slurm-general-docs/slurm-examples/#single-core-based-job-examples","title":"Single core based job examples","text":""},{"location":"merlin6/slurm-general-docs/slurm-examples/#example-1-hyperthreaded-job","title":"Example 1: Hyperthreaded job","text":"In this example we want to use hyperthreading (--ntasks-per-core=2 and --hint=multithread). In our Merlin6 configuration, the default memory per CPU (a CPU is equivalent to a core thread) is 4000MB, hence each task can use up 8000MB (2 threads x 4000MB).
#!/bin/bash\n#SBATCH --partition=hourly # Using 'hourly' will grant higher priority\n#SBATCH --ntasks-per-core=2 # Request the max ntasks be invoked on each core\n#SBATCH --hint=multithread # Use extra threads with in-core multi-threading\n#SBATCH --time=00:30:00 # Define max time job will run\n#SBATCH --output=myscript.out # Define your output file\n#SBATCH --error=myscript.err # Define your error file\n\nmodule purge\nmodule load $MODULE_NAME # where $MODULE_NAME is a software in PModules\nsrun $MYEXEC # where $MYEXEC is a path to your binary file\n"},{"location":"merlin6/slurm-general-docs/slurm-examples/#example-2-non-hyperthreaded-job","title":"Example 2: Non-hyperthreaded job","text":"In this example we do not want hyper-threading (--ntasks-per-core=1 and --hint=nomultithread). In our Merlin6 configuration, the default memory per cpu (a CPU is equivalent to a core thread) is 4000MB. If we do not specify anything else, our single core task will use a default of 4000MB. However, one could double it with --mem-per-cpu=8000 if you require more memory (remember, the second thread will not be used so we can safely assign +4000MB to the unique active thread).
#!/bin/bash\n#SBATCH --partition=hourly # Using 'hourly' will grant higher priority\n#SBATCH --ntasks-per-core=1 # Request the max ntasks be invoked on each core\n#SBATCH --hint=nomultithread # Don't use extra threads with in-core multi-threading\n#SBATCH --time=00:30:00 # Define max time job will run\n#SBATCH --output=myscript.out # Define your output file\n#SBATCH --error=myscript.err # Define your error file\n\nmodule purge\nmodule load $MODULE_NAME # where $MODULE_NAME is a software in PModules\nsrun $MYEXEC # where $MYEXEC is a path to your binary file\n"},{"location":"merlin6/slurm-general-docs/slurm-examples/#multi-core-based-job-examples","title":"Multi core based job examples","text":""},{"location":"merlin6/slurm-general-docs/slurm-examples/#example-1-mpi-with-hyper-threading","title":"Example 1: MPI with Hyper-Threading","text":"In this example we run a job that will run 88 tasks. Merlin6 Apollo nodes have 44 cores each one with hyper-threading enabled. This means that we can run 2 threads per core, in total 88 threads. To accomplish that, users should specify --ntasks-per-core=2 and --hint=multithread.
Use --nodes=1 if you want to use a node exclusively (88 hyperthreaded tasks would fit in a Merlin6 node).
#!/bin/bash\n#SBATCH --partition=hourly # Using 'hourly' will grant higher priority\n#SBATCH --ntasks=88 # Job will run 88 tasks\n#SBATCH --ntasks-per-core=2 # Request the max ntasks be invoked on each core\n#SBATCH --hint=multithread # Use extra threads with in-core multi-threading\n#SBATCH --time=00:30:00 # Define max time job will run\n#SBATCH --output=myscript.out # Define your output file\n#SBATCH --error=myscript.err # Define your error file\n\nmodule purge\nmodule load $MODULE_NAME # where $MODULE_NAME is a software in PModules\nsrun $MYEXEC # where $MYEXEC is a path to your binary file\n"},{"location":"merlin6/slurm-general-docs/slurm-examples/#example-2-mpi-without-hyper-threading","title":"Example 2: MPI without Hyper-Threading","text":"In this example, we want to run a job that will run 44 tasks, and due to performance reasons we want to disable hyper-threading. Merlin6 Apollo nodes have 44 cores, each one with hyper-threading enabled. For ensuring that only 1 thread will be used per task, users should specify --ntasks-per-core=1 and --hint=nomultithread. With this configuration, we tell Slurm to run only 1 tasks per core and no hyperthreading should be used. Hence, each tasks will be assigned to an independent core.
Use --nodes=1 if you want to use a node exclusively (44 non-hyperthreaded tasks would fit in a Merlin6 node).
#!/bin/bash\n#SBATCH --partition=hourly # Using 'hourly' will grant higher priority\n#SBATCH --ntasks=44 # Job will run 44 tasks\n#SBATCH --ntasks-per-core=1 # Request the max ntasks be invoked on each core\n#SBATCH --hint=nomultithread # Don't use extra threads with in-core multi-threading\n#SBATCH --time=00:30:00 # Define max time job will run\n#SBATCH --output=myscript.out # Define your output file\n#SBATCH --error=myscript.err # Define your output file\n\nmodule purge\nmodule load $MODULE_NAME # where $MODULE_NAME is a software in PModules\nsrun $MYEXEC # where $MYEXEC is a path to your binary file\n"},{"location":"merlin6/slurm-general-docs/slurm-examples/#example-3-hyperthreaded-hybrid-mpiopenmp-job","title":"Example 3: Hyperthreaded Hybrid MPI/OpenMP job","text":"In this example, we want to run a Hybrid Job using MPI and OpenMP using hyperthreading. In this job, we want to run 4 MPI tasks by using 8 CPUs per task. Each task in our example requires 128GB of memory. Then we specify 16000MB per CPU (8 x 16000MB = 128000MB). Notice that since hyperthreading is enabled, Slurm will use 4 cores per task (with hyperthreading 2 threads -a.k.a. Slurm CPUs- fit into a core).
Bash#!/bin/bash -l\n#SBATCH --clusters=merlin6\n#SBATCH --job-name=test\n#SBATCH --ntasks=4\n#SBATCH --ntasks-per-socket=1\n#SBATCH --mem-per-cpu=16000\n#SBATCH --cpus-per-task=8\n#SBATCH --partition=hourly\n#SBATCH --time=01:00:00\n#SBATCH --output=srun_%j.out\n#SBATCH --error=srun_%j.err\n#SBATCH --hint=multithread\n\nmodule purge\nmodule load $MODULE_NAME # where $MODULE_NAME is a software in PModules\nsrun $MYEXEC # where $MYEXEC is a path to your binary file\n Memory Limit
Also, always consider that --mem-per-cpu x --cpus-per-task can never exceed the maximum amount of memory per node (352000MB).
In this example, we want to run a Hybrid Job using MPI and OpenMP without hyperthreading. In this job, we want to run 4 MPI tasks by using 8 CPUs per task. Each task in our example requires 128GB of memory. Then we specify 16000MB per CPU (8 x 16000MB = 128000MB). Notice that since hyperthreading is disabled, Slurm will use 8 cores per task (disabling hyperthreading we force the use of only 1 thread -a.k.a. 1 CPU- per core).
Bash#!/bin/bash -l\n#SBATCH --clusters=merlin6\n#SBATCH --job-name=test\n#SBATCH --ntasks=4\n#SBATCH --ntasks-per-socket=1\n#SBATCH --mem-per-cpu=16000\n#SBATCH --cpus-per-task=8\n#SBATCH --partition=hourly\n#SBATCH --time=01:00:00\n#SBATCH --output=srun_%j.out\n#SBATCH --error=srun_%j.err\n#SBATCH --hint=nomultithread\n\nmodule purge\nmodule load $MODULE_NAME # where $MODULE_NAME is a software in PModules\nsrun $MYEXEC # where $MYEXEC is a path to your binary file\n Memory Limit
Also, always consider that --mem-per-cpu x --cpus-per-task can never exceed the maximum amount of memory per node (352000MB).
Using GPUs requires two major changes. First, the cluster needs to be specified to gmerlin6. This should also be added to later commands pertaining to the job, e.g. scancel --cluster=gmerlin6 <jobid>. Second, the number of GPUs should be specified using --gpus, --gpus-per-task, or similar parameters. Here's an example for a simple test job:
#!/bin/bash\n#SBATCH --partition=gpu # Or 'gpu-short' for higher priority but 2-hour limit\n#SBATCH --cluster=gmerlin6 # Required for GPU\n#SBATCH --gpus=2 # Total number of GPUs\n#SBATCH --cpus-per-gpu=5 # Request CPU resources\n#SBATCH --time=1-00:00:00 # Define max time job will run\n#SBATCH --output=myscript.out # Define your output file\n#SBATCH --error=myscript.err # Define your error file\n\nmodule purge\nmodule load cuda # load any needed modules here\nsrun $MYEXEC # where $MYEXEC is a path to your binary file\n Slurm will automatically set the gpu visibility (eg $CUDA_VISIBLE_DEVICES).
If you need to run a large number of jobs based on the same executable with systematically varying inputs, e.g. for a parameter sweep, you can do this most easily in form of a simple array job.
Bash#!/bin/bash\n#SBATCH --job-name=test-array\n#SBATCH --partition=daily\n#SBATCH --ntasks=1\n#SBATCH --time=08:00:00\n#SBATCH --array=1-8\n\necho $(date) \"I am job number ${SLURM_ARRAY_TASK_ID}\"\nsrun $MYEXEC config-file-${SLURM_ARRAY_TASK_ID}.dat\n This will run 8 independent jobs, where each job can use the counter variable SLURM_ARRAY_TASK_ID defined by Slurm inside of the job's environment to feed the correct input arguments or configuration file to the \"myprogram\" executable. Each job will receive the same set of configurations (e.g. time limit of 8h in the example above).
The jobs are independent, but they will run in parallel (if the cluster resources allow for it). The jobs will get JobIDs like {some-number}_0 to {some-number}_7, and they also will each have their own output file.
Note
#SBATCH --array=1-100%5 syntax. The %5 will define that only 5 sub jobs may ever run in parallel.You also can use an array job approach to run over all files in a directory, substituting the payload with
BashFILES=(/path/to/data/*)\nsrun $MYEXEC ${FILES[$SLURM_ARRAY_TASK_ID]}\n Or for a trivial case you could supply the values for a parameter scan in form of a argument list that gets fed to the program using the counter variable.
BashARGS=(0.05 0.25 0.5 1 2 5 100)\nsrun $MYEXEC ${ARGS[$SLURM_ARRAY_TASK_ID]}\n"},{"location":"merlin6/slurm-general-docs/slurm-examples/#array-jobs-running-very-long-tasks-with-checkpoint-files","title":"Array jobs: running very long tasks with checkpoint files","text":"If you need to run a job for much longer than the queues (partitions) permit, and your executable is able to create checkpoint files, you can use this strategy:
Bash#!/bin/bash\n#SBATCH --job-name=test-checkpoint\n#SBATCH --partition=general\n#SBATCH --ntasks=1\n#SBATCH --time=7-00:00:00 # each job can run for 7 days\n#SBATCH --cpus-per-task=1\n#SBATCH --array=1-10%1 # Run a 10-job array, one job at a time.\nif test -e checkpointfile; then\n # There is a checkpoint file;\n $MYEXEC --read-checkp checkpointfile\nelse\n # There is no checkpoint file, start a new simulation.\n $MYEXEC\nfi\n The %1 in the #SBATCH --array=1-10%1 statement defines that only 1 subjob can ever run in parallel, so this will result in subjob n+1 only being started when job n has finished. It will read the checkpoint file if it is present.
Since the launching of a Slurm job incurs some overhead, you should not submit each short task as a separate Slurm job. Use job packing, i.e. you run the short tasks within the loop of a single Slurm job.
You can launch the short tasks using srun with the --exclusive switch (not to be confused with the switch of the same name used in the SBATCH commands). This switch will ensure that only a specified number of tasks can run in parallel.
As an example, the following job submission script will ask Slurm for 44 cores (threads), then it will run the =myprog= program 1000 times with arguments passed from 1 to 1000. But with the =-N1 -n1 -c1 --exclusive= option, it will control that at any point in time only 44 instances are effectively running, each being allocated one CPU. You can at this point decide to allocate several CPUs or tasks by adapting the corresponding parameters.
Bash#! /bin/bash\n#SBATCH --job-name=test-checkpoint\n#SBATCH --partition=general\n#SBATCH --ntasks=1\n#SBATCH --time=7-00:00:00\n#SBATCH --ntasks=44 # defines the number of parallel tasks\nfor i in {1..1000}\ndo\n srun -N1 -n1 -c1 --exclusive $MYEXEC $i &\ndone\nwait\n Note
The & at the end of the srun line is needed to not have the script waiting (blocking). The wait command waits for all such background tasks to finish and returns the exit code.
Copy-paste the following example in a file called myAdvancedTest.batch):
Bash#!/bin/bash\n#SBATCH --partition=daily # name of slurm partition to submit\n#SBATCH --time=2:00:00 # limit the execution of this job to 2 hours, see sinfo for the max. allowance\n#SBATCH --nodes=2 # number of nodes\n#SBATCH --ntasks=44 # number of tasks\n#SBATCH --ntasks-per-core=1 # Request the max ntasks be invoked on each core\n#SBATCH --hint=nomultithread # Don't use extra threads with in-core multi-threading\n\nmodule load gcc/9.2.0 openmpi/3.1.5-1_merlin6\nmodule list\n\necho \"Example no-MPI:\" ; hostname # will print one hostname per node\necho \"Example MPI:\" ; srun hostname # will print one hostname per ntask\n In the above example are specified the options --nodes=2 and --ntasks=44. This means that up 2 nodes are requested, and is expected to run 44 tasks. Hence, 44 cores are needed for running that job. Slurm will try to allocate a maximum of 2 nodes, both together having at least 44 cores. Since our nodes have 44 cores / each, if nodes are empty (no other users have running jobs there), job can land on a single node (it has enough cores to run 44 tasks).
If we want to ensure that job is using at least two different nodes (i.e. for boosting CPU frequency, or because the job requires more memory per core) you should specify other options.
A good example is --ntasks-per-node=22. This will equally distribute 22 tasks on 2 nodes.
#SBATCH --ntasks-per-node=22\n A different example could be by specifying how much memory per core is needed. For instance --mem-per-cpu=32000 will reserve ~32000MB per core. Since we have a maximum of 352000MB per Apollo node, Slurm will be only able to allocate 11 cores (32000MB x 11cores = 352000MB) per node. It means that 4 nodes will be needed (max 11 tasks per node due to memory definition, and we need to run 44 tasks), in this case we need to change --nodes=4 (or remove --nodes). Alternatively, we can decrease --mem-per-cpu to a lower value which can allow the use of at least 44 cores per node (i.e. with 16000 should be able to use 2 nodes)
#SBATCH --mem-per-cpu=16000\n Finally, in order to ensure exclusivity of the node, an option --exclusive can be used (see below). This will ensure that the requested nodes are exclusive for the job (no other users jobs will interact with this node, and only completely free nodes will be allocated).
Bash#SBATCH --exclusive\n This can be combined with the previous examples.
More advanced configurations can be defined and can be combined with the previous examples. More information about advanced options can be found in the following link: https://slurm.schedmd.com/sbatch.html (or run man sbatch).
If you have questions about how to properly execute your jobs, please contact us through merlin-admins@lists.psi.ch. Do not run advanced configurations unless your are sure of what you are doing.
"},{"location":"merlin6/software-support/ansys-cfx/","title":"ANSYS - CFX","text":""},{"location":"merlin6/software-support/ansys-cfx/#ansys-cfx","title":"ANSYS - CFX","text":"Is always recommended to check which parameters are available in CFX and adapt the below examples according to your needs. For that, run cfx5solve -help for getting a list of options.
Is strongly recommended the use of the latest ANSYS software available in PModules.
Bashmodule use unstable\nmodule load Pmodules/1.1.6\nmodule use overlay_merlin\nmodule load ANSYS/2022R1\n"},{"location":"merlin6/software-support/ansys-cfx/#interactive-rsm-from-remote-psi-workstations","title":"Interactive: RSM from remote PSI Workstations","text":"Is possible to run CFX through RSM from remote PSI (Linux or Windows) Workstation having a local installation of ANSYS CFX and RSM client. For that, please refer to the ANSYS RSM in the Merlin documentation for further information of how to setup a RSM client for submitting jobs to Merlin.
"},{"location":"merlin6/software-support/ansys-cfx/#non-interactive-sbatch","title":"Non-interactive: sbatch","text":"Running jobs with sbatch is always the recommended method. This makes the use of the resources more efficient. Notice that for running non interactive Mechanical APDL jobs one must specify the -batch option.
This example shows a very basic serial job.
Bash#!/bin/bash\n#SBATCH --job-name=CFX # Job Name\n#SBATCH --partition=hourly # Using 'daily' will grant higher priority than 'general'\n#SBATCH --time=0-01:00:00 # Time needed for running the job. Must match with 'partition' limits.\n#SBATCH --cpus-per-task=1 # Double if hyperthreading enabled\n#SBATCH --ntasks-per-core=1 # Double if hyperthreading enabled\n#SBATCH --hint=nomultithread # Disable Hyperthreading\n#SBATCH --error=slurm-%j.err # Define your error file\n\nmodule use unstable\nmodule load ANSYS/2020R1-1\n\n# [Optional:BEGIN] Specify your license server if this is not 'lic-ansys.psi.ch'\nLICENSE_SERVER=<your_license_server>\nexport ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER\nexport ANSYSLI_SERVERS=2325@$LICENSE_SERVER\n# [Optional:END]\n\nSOLVER_FILE=/data/user/caubet_m/CFX5/mysolver.in\ncfx5solve -batch -def \"$JOURNAL_FILE\"\n One can enable hypertheading by defining --hint=multithread, --cpus-per-task=2 and --ntasks-per-core=2. However, this is in general not recommended, unless one can ensure that can be beneficial.
An example for running CFX using a Slurm batch script is the following:
Bash#!/bin/bash\n#SBATCH --job-name=CFX # Job Name\n#SBATCH --partition=hourly # Using 'daily' will grant higher priority than 'general'\n#SBATCH --time=0-01:00:00 # Time needed for running the job. Must match with 'partition' limits.\n#SBATCH --nodes=1 # Number of nodes\n#SBATCH --ntasks=44 # Number of tasks\n#SBATCH --cpus-per-task=1 # Double if hyperthreading enabled\n#SBATCH --ntasks-per-core=1 # Double if hyperthreading enabled\n#SBATCH --hint=nomultithread # Disable Hyperthreading\n#SBATCH --error=slurm-%j.err # Define a file for standard error messages\n##SBATCH --exclusive # Uncomment if you want exclusive usage of the nodes\n\nmodule use unstable\nmodule load ANSYS/2020R1-1\n\n# [Optional:BEGIN] Specify your license server if this is not 'lic-ansys.psi.ch'\nLICENSE_SERVER=<your_license_server>\nexport ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER\nexport ANSYSLI_SERVERS=2325@$LICENSE_SERVER\n# [Optional:END]\n\nexport HOSTLIST=$(scontrol show hostname | tr '\\n' ',' | sed 's/,$//g')\n\nJOURNAL_FILE=myjournal.in\n\n# INTELMPI=no for IBM MPI\n# INTELMPI=yes for INTEL MPI\nINTELMPI=no\n\nif [ \"$INTELMPI\" == \"yes\" ]\nthen\n export I_MPI_DEBUG=4\n export I_MPI_PIN_CELL=core\n\n # Simple example: cfx5solve -batch -def \"$JOURNAL_FILE\" -par-dist \"$HOSTLIST\" \\\n # -part $SLURM_NTASKS \\\n # -start-method 'Intel MPI Distributed Parallel'\n cfx5solve -batch -part-large -double -verbose -def \"$JOURNAL_FILE\" -par-dist \"$HOSTLIST\" \\\n -part $SLURM_NTASKS -par-local -start-method 'Intel MPI Distributed Parallel'\nelse\n # Simple example: cfx5solve -batch -def \"$JOURNAL_FILE\" -par-dist \"$HOSTLIST\" \\\n # -part $SLURM_NTASKS \\\n # -start-method 'IBM MPI Distributed Parallel'\n cfx5solve -batch -part-large -double -verbose -def \"$JOURNAL_FILE\" -par-dist \"$HOSTLIST\" \\\n -part $SLURM_NTASKS -par-local -start-method 'IBM MPI Distributed Parallel'\nfi\n In the above example, one can increase the number of nodes and/or ntasks if needed and combine it with --exclusive whenever needed. In general, no hypertheading is recommended for MPI based jobs.
Also, one can combine it with --exclusive when necessary. Finally, one can change the MPI technology in -start-method (check CFX documentation for possible values).
Some users might need to visualize or change some parameters when running calculations with the CFX Solver. For running TurboGrid, CFX-Pre, CFX-Solver Manager or CFD-Post one should run it with the cfx5 launcher binary:
cfx5\n Then, from the launcher, one can open the proper application (i.e. CFX-Solver Manager for visualizing and modifying an existing job run)
For running CFX5 Launcher, is required a proper SSH + X11 Forwarding access (ssh -XY) or preferrible NoMachine. If ssh does not work for you, please use NoMachine instead (which is the supported X based access, and simpler).
Is always recommended to check which parameters are available in Fluent and adapt the below example according to your needs. For that, run fluent -help for getting a list of options. However, as when running Fluent one must specify one of the following flags:
Is strongly recommended the use of the latest ANSYS software available in PModules.
Bashmodule use unstable\nmodule load Pmodules/1.1.6\nmodule use overlay_merlin\nmodule load ANSYS/2022R1\n"},{"location":"merlin6/software-support/ansys-fluent/#interactive-rsm-from-remote-psi-workstations","title":"Interactive: RSM from remote PSI Workstations","text":"Is possible to run Fluent through RSM from remote PSI (Linux or Windows) Workstation having a local installation of ANSYS Fluent and RSM client. For that, please refer to the ANSYS RSM in the Merlin documentation for further information of how to setup a RSM client for submitting jobs to Merlin.
"},{"location":"merlin6/software-support/ansys-fluent/#non-interactive-sbatch","title":"Non-interactive: sbatch","text":"Running jobs with sbatch is always the recommended method. This makes the use of the resources more efficient. For running it as a job, one needs to run in no graphical mode (-g option).
This example shows a very basic serial job.
Bash#!/bin/bash\n#SBATCH --job-name=Fluent # Job Name\n#SBATCH --partition=hourly # Using 'daily' will grant higher priority than 'general'\n#SBATCH --time=0-01:00:00 # Time needed for running the job. Must match with 'partition' limits.\n#SBATCH --cpus-per-task=1 # Double if hyperthreading enabled\n#SBATCH --hint=nomultithread # Disable Hyperthreading\n#SBATCH --error=slurm-%j.err # Define your error file\n\nmodule use unstable\nmodule load ANSYS/2020R1-1\n\n# [Optional:BEGIN] Specify your license server if this is not 'lic-ansys.psi.ch'\nLICENSE_SERVER=<your_license_server>\nexport ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER\nexport ANSYSLI_SERVERS=2325@$LICENSE_SERVER\n# [Optional:END]\n\nJOURNAL_FILE=/data/user/caubet_m/Fluent/myjournal.in\nfluent 3ddp -g -i ${JOURNAL_FILE}\n One can enable hypertheading by defining --hint=multithread, --cpus-per-task=2 and --ntasks-per-core=2. However, this is in general not recommended, unless one can ensure that can be beneficial.
An example for running Fluent using a Slurm batch script is the following:
Bash#!/bin/bash\n#SBATCH --job-name=Fluent # Job Name\n#SBATCH --partition=hourly # Using 'daily' will grant higher priority than 'general'\n#SBATCH --time=0-01:00:00 # Time needed for running the job. Must match with 'partition' limits.\n#SBATCH --nodes=1 # Number of nodes\n#SBATCH --ntasks=44 # Number of tasks\n#SBATCH --cpus-per-task=1 # Double if hyperthreading enabled\n#SBATCH --ntasks-per-core=1 # Run one task per core\n#SBATCH --hint=nomultithread # Disable Hyperthreading\n#SBATCH --error=slurm-%j.err # Define a file for standard error messages\n##SBATCH --exclusive # Uncomment if you want exclusive usage of the nodes\n\nmodule use unstable\nmodule load ANSYS/2020R1-1\n\n# [Optional:BEGIN] Specify your license server if this is not 'lic-ansys.psi.ch'\nLICENSE_SERVER=<your_license_server>\nexport ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER\nexport ANSYSLI_SERVERS=2325@$LICENSE_SERVER\n# [Optional:END]\n\nJOURNAL_FILE=/data/user/caubet_m/Fluent/myjournal.in\nfluent 3ddp -g -t ${SLURM_NTASKS} -i ${JOURNAL_FILE}\n In the above example, one can increase the number of nodes and/or ntasks if needed. One can remove --nodes for running on multiple nodes, but may lead to communication overhead. In general, no hyperthreading is recommended for MPI based jobs. Also, one can combine it with --exclusive when necessary.
Running Fluent interactively is strongly not recommended and one should whenever possible use sbatch. However, sometimes interactive runs are needed. For jobs requiring only few CPUs (in example, 2 CPUs) and for a short period of time, one can use the login nodes. Otherwise, one must use the Slurm batch system using allocations:
hourly).Please refer to the documentation Running Interactive Jobs for firther information about different ways for running interactive jobs in the Merlin6 cluster.
"},{"location":"merlin6/software-support/ansys-fluent/#requirements","title":"Requirements","text":""},{"location":"merlin6/software-support/ansys-fluent/#ssh-keys","title":"SSH Keys","text":"Running Fluent interactively requires the use of SSH Keys. This is the way of communication between the GUI and the different nodes. For doing that, one must have a passphrase protected SSH Key. If the user does not have SSH Keys yet (simply run ls $HOME/.ssh/ to check whether id_rsa files exist or not). For deploying SSH Keys for running Fluent interactively, one should follow this documentation: Configuring SSH Keys
For running Fluent using Slurm computing nodes, one needs to get the list of the reserved nodes. For getting that list, once you have the allocation, one can run the following command:
Bashscontrol show hostname\n This list must be included in the settings as the list of hosts where to run Fluent. Alternatively, one can give that list as parameter (-cnf option) when running fluent, as follows:
$ salloc --nodes=2 --ntasks=88 --hint=nomultithread --time=0-01:00:00 --partition=test $SHELL\nsalloc: Pending job allocation 135030174\nsalloc: job 135030174 queued and waiting for resources\nsalloc: job 135030174 has been allocated resources\nsalloc: Granted job allocation 135030174\n\n$ module use unstable\n$ module load ANSYS/2020R1-1\nmodule load: unstable module has been loaded -- ANSYS/2020R1-1\n\n$ fluent 3ddp -t$SLURM_NPROCS -cnf=$(scontrol show hostname | tr '\\n' ',')\n\n$ exit\nexit\nsalloc: Relinquishing job allocation 135030174\nsalloc: Job allocation 135030174 has been revoked.\n"},{"location":"merlin6/software-support/ansys-hfss/","title":"ANSYS HFSS (ElectroMagnetics)","text":""},{"location":"merlin6/software-support/ansys-hfss/#ansys-hfss-electromagnetics","title":"ANSYS HFSS (ElectroMagnetics)","text":"This recipe is intended to show how to run ANSYS HFSS (ElectroMagnetics) in Slurm. Having in mind that in general, running ANSYS HFSS means running ANSYS Electronics Desktop.
"},{"location":"merlin6/software-support/ansys-hfss/#running-hfss-electromagnetics-jobs","title":"Running HFSS / Electromagnetics jobs","text":""},{"location":"merlin6/software-support/ansys-hfss/#pmodules","title":"PModules","text":"Is necessary to run at least ANSYS software ANSYS/2022R1, which is available in PModules:
Bashmodule use unstable\nmodule load Pmodules/1.1.6\nmodule use overlay_merlin\nmodule load ANSYS/2022R1\n"},{"location":"merlin6/software-support/ansys-hfss/#remote-job-submission-hfss-rsm-and-slurm","title":"Remote job submission: HFSS RSM and SLURM","text":"Running jobs through Remote RSM or Slurm is the recommended way for running ANSYS HFSS.
sbatch command or interactively from ANSYS Electronics Desktop)Running jobs through Remote RSM is the way for running ANSYS HFSS when submitting from an ANSYS HFSS installation on a PSI Windows workstation. A HFSS RSM service is running on each Merlin login node, and the listening port depends on the ANSYS EM version. Current support ANSYS EM RSM release and associated listening ports are the following:
ANSYS version Login nodes Listening port 2022R1 merlin-l-001 merlin-l-001 merlin-l-001 32958 2022R2 merlin-l-001 merlin-l-001 merlin-l-001 32959 2023R2 merlin-l-001 merlin-l-001 merlin-l-001 32960Notice that by default ANSYS EM is listening on port 32958, this is the default for ANSYS/2022R1 only.
Notice that HFSS RSM is not the same RSM provided for other ANSYS products. Therefore, the configuration is different from ANSYS RSM.
To setup HFSS RSM for using it with the Merlin cluster, it must be done from the following ANSYS Electronics Desktop menu:
* **Select Scheduler**: `Remote RSM`.\n* **Server**: Add a Merlin login node.\n* **User name**: Add your Merlin username.\n* **Password**: Add you Merlin username password.\n Once refreshed, the Scheduler info box must provide Slurm information of the server (see above picture). If the box contains that information, then you can save changes (OK button).
* In example, for **ANSYS/2022R1**, the location is `/data/software/pmodules/Tools/ANSYS/2021R1/v211/AnsysEM21.1/Linux64/ansysedt.exe`.\n"},{"location":"merlin6/software-support/ansys-hfss/#hfss-slurm-from-login-node-only","title":"HFSS Slurm (from login node only)","text":"Running jobs through Slurm from ANSYS Electronics Desktop is the way for running ANSYS HFSS when submitting from an ANSYS HFSS installation in a Merlin login node. ANSYS Electronics Desktop usually needs to be run from the Merlin NoMachine service, which currently runs on:
merlin-l-001.psi.chmerlin-l-002.psi.chSince the Slurm client is present in the login node (where ANSYS Electronics Desktop is running), the application will be able to detect and to submit directly to Slurm. Therefore, we only have to configure ANSYS Electronics Desktop to submit to Slurm. This can set as follows:
* **Select Scheduler**: `Slurm`.\n* **Server**: must point to `localhost`.\n* **User name**: must be empty.\n* **Password**: must be empty.\n The Server, User name and Password boxes can't be modified, but if value do not match with the above settings, they should be changed by selecting another Scheduler which allows editig these boxes (i.e. RSM Remote).
Once refreshed, the Scheduler info box must provide Slurm information of the server (see above picture). If the box contains that information, then you can save changes (OK button).
Is always recommended to check which parameters are available in Mechanical APDL and adapt the below examples according to your needs. For that, please refer to the official Mechanical APDL documentation.
"},{"location":"merlin6/software-support/ansys-mapdl/#running-mechanical-apdl-jobs","title":"Running Mechanical APDL jobs","text":""},{"location":"merlin6/software-support/ansys-mapdl/#pmodules","title":"PModules","text":"Is strongly recommended the use of the latest ANSYS software available in PModules.
Bashmodule use unstable\nmodule load Pmodules/1.1.6\nmodule use overlay_merlin\nmodule load ANSYS/2022R1\n"},{"location":"merlin6/software-support/ansys-mapdl/#interactive-rsm-from-remote-psi-workstations","title":"Interactive: RSM from remote PSI Workstations","text":"Is possible to run Mechanical through RSM from remote PSI (Linux or Windows) Workstation having a local installation of ANSYS Mechanical and RSM client. For that, please refer to the ANSYS RSM in the Merlin documentation for further information of how to setup a RSM client for submitting jobs to Merlin.
"},{"location":"merlin6/software-support/ansys-mapdl/#non-interactive-sbatch","title":"Non-interactive: sbatch","text":"Running jobs with sbatch is always the recommended method. This makes the use of the resources more efficient. Notice that for running non interactive Mechanical APDL jobs one must specify the -b option.
This example shows a very basic serial job.
Bash#!/bin/bash\n#SBATCH --job-name=MAPDL # Job Name\n#SBATCH --partition=hourly # Using 'daily' will grant higher priority than 'general'\n#SBATCH --time=0-01:00:00 # Time needed for running the job. Must match with 'partition' limits.\n#SBATCH --cpus-per-task=1 # Double if hyperthreading enabled\n#SBATCH --ntasks-per-core=1 # Double if hyperthreading enabled\n#SBATCH --hint=nomultithread # Disable Hyperthreading\n#SBATCH --error=slurm-%j.err # Define your error file\n\nmodule use unstable\nmodule load ANSYS/2020R1-1\n\n# [Optional:BEGIN] Specify your license server if this is not 'lic-ansys.psi.ch'\nLICENSE_SERVER=<your_license_server>\nexport ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER\nexport ANSYSLI_SERVERS=2325@$LICENSE_SERVER\n# [Optional:END]\n\nSOLVER_FILE=/data/user/caubet_m/MAPDL/mysolver.in\nmapdl -b -i \"$SOLVER_FILE\"\n One can enable hypertheading by defining --hint=multithread, --cpus-per-task=2 and --ntasks-per-core=2. However, this is in general not recommended, unless one can ensure that can be beneficial.
This example shows how to running Mechanical APDL in Shared-Memory Parallelism mode. It limits the use to 1 single node, but by using many cores. In the example below, we use a node by using all his cores and the whole memory.
Bash#!/bin/bash\n#SBATCH --job-name=MAPDL # Job Name\n#SBATCH --partition=hourly # Using 'daily' will grant higher priority than 'general'\n#SBATCH --time=0-01:00:00 # Time needed for running the job. Must match with 'partition' limits.\n#SBATCH --nodes=1 # Number of nodes\n#SBATCH --ntasks=1 # Number of tasks\n#SBATCH --cpus-per-task=44 # Double if hyperthreading enabled\n#SBATCH --hint=nomultithread # Disable Hyperthreading\n#SBATCH --error=slurm-%j.err # Define a file for standard error messages\n#SBATCH --exclusive # Uncomment if you want exclusive usage of the nodes\n\nmodule use unstable\nmodule load ANSYS/2020R1-1\n\n# [Optional:BEGIN] Specify your license server if this is not 'lic-ansys.psi.ch'\nLICENSE_SERVER=<your_license_server>\nexport ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER\nexport ANSYSLI_SERVERS=2325@$LICENSE_SERVER\n# [Optional:END]\n\nSOLVER_FILE=/data/user/caubet_m/MAPDL/mysolver.in\nmapdl -b -np ${SLURM_CPUS_PER_TASK} -i \"$SOLVER_FILE\"\n In the above example, one can reduce the number of cpus per task. Here usually --exclusive is recommended if one needs to use the whole memory.
For SMP runs, one might try the hyperthreading mode by doubling the proper settings (--cpus-per-task), in some cases it might be beneficial.
Please notice that --ntasks-per-core=1 is not defined here, this is because we want to run 1 task on many cores! As an alternative, one can explore --ntasks-per-socket or --ntasks-per-node for fine grained configurations.
This example enables Distributed ANSYS for running Mechanical APDL using a Slurm batch script.
Bash#!/bin/bash\n#SBATCH --job-name=MAPDL # Job Name\n#SBATCH --partition=hourly # Using 'daily' will grant higher priority than 'general'\n#SBATCH --time=0-01:00:00 # Time needed for running the job. Must match with 'partition' limits.\n#SBATCH --nodes=1 # Number of nodes\n#SBATCH --ntasks=44 # Number of tasks\n#SBATCH --cpus-per-task=1 # Double if hyperthreading enabled\n#SBATCH --ntasks-per-core=1 # Run one task per core\n#SBATCH --hint=nomultithread # Disable Hyperthreading\n#SBATCH --error=slurm-%j.err # Define a file for standard error messages\n##SBATCH --exclusive # Uncomment if you want exclusive usage of the nodes\n\nmodule use unstable\nmodule load ANSYS/2020R1-1\n\n# [Optional:BEGIN] Specify your license server if this is not 'lic-ansys.psi.ch'\nLICENSE_SERVER=<your_license_server>\nexport ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER\nexport ANSYSLI_SERVERS=2325@$LICENSE_SERVER\n# [Optional:END]\n\nSOLVER_FILE=input.dat\n\n# INTELMPI=no for IBM MPI\n# INTELMPI=yes for INTEL MPI\nINTELMPI=no\n\nif [ \"$INTELMPI\" == \"yes\" ]\nthen\n # When using -mpi=intelmpi, KMP Affinity must be disabled\n export KMP_AFFINITY=disabled\n\n # INTELMPI is not aware about distribution of tasks.\n # - We need to define tasks distribution.\n HOSTLIST=$(srun hostname | sort | uniq -c | awk '{print $2 \":\" $1}' | tr '\\n' ':' | sed 's/:$/\\n/g')\n mapdl -b -dis -mpi intelmpi -machines $HOSTLIST -np ${SLURM_NTASKS} -i \"$SOLVER_FILE\"\nelse\n # IBMMPI (default) will be aware of the distribution of tasks.\n # - In principle, no need to force tasks distribution\n mapdl -b -dis -mpi ibmmpi -np ${SLURM_NTASKS} -i \"$SOLVER_FILE\"\nfi\n In the above example, one can increase the number of nodes and/or ntasks if needed and combine it with --exclusive when necessary. In general, no hypertheading is recommended for MPI based jobs. Also, one can combine it with --exclusive when necessary.
ANSYS Remote Solve Manager (RSM) is used by ANSYS Workbench to submit computational jobs to HPC clusters directly from Workbench on your desktop. Therefore, PSI workstations with direct access to Merlin can submit jobs by using RSM.
Users are responsible for requesting possible necessary network access and debugging any possible connectivity problem with the cluster. In example, in case that the workstation is behind a firewall, users would need to request a firewall rule to enable access to Merlin.
Warning
The Merlin6 administrators are not responsible for connectivity problems between users workstations and the Merlin6 cluster.
"},{"location":"merlin6/software-support/ansys-rsm/#the-merlin6-rsm-service","title":"The Merlin6 RSM service","text":"A RSM service is running on each login node. This service will listen a specific port and will process any request using RSM (in example, from ANSYS users workstations). The following login nodes are configured with such services:
merlin-l-01.psi.chmerlin-l-001.psi.chmerlin-l-002.psi.chEach ANSYS release installed in /data/software/pmodules/ANSYS should have its own RSM service running (the listening port is the default one set by that ANSYS release). With the following command users can check which ANSYS releases have an RSM instance running:
systemctl | grep pli-ansys-rsm-v[0-9][0-9][0-9].service\n Listing RSM service running on merlin-l-001.psi.ch Bash Session# systemctl | grep pli-ansys-rsm-v[0-9][0-9][0-9].service\n pli-ansys-rsm-v195.service loaded active exited PSI ANSYS RSM v195\n pli-ansys-rsm-v202.service loaded active exited PSI ANSYS RSM v202\n pli-ansys-rsm-v211.service loaded active exited PSI ANSYS RSM v211\n pli-ansys-rsm-v212.service loaded active exited PSI ANSYS RSM v212\n pli-ansys-rsm-v221.service loaded active exited PSI ANSYS RSM v221\n"},{"location":"merlin6/software-support/ansys-rsm/#configuring-rsm-client-on-windows-workstations","title":"Configuring RSM client on Windows workstations","text":"Users can setup ANSYS RSM in their workstations to connect to the Merlin6 cluster. The different steps and settings required to make it work are that following:
Merlin6 cluster - merlin-l-001SLURMmerlin-l-001.--hint=nomultithread should be at least present./shared-scratch as the \"Staging directory path on Cluster\"/scratch as the HPC scratch directory.PSICH\\ prefix must not be added. hourly, daily and general only.Tip
Repeat the process from for adding other login nodes if necessary. This will give users the alternative of using another login node in case of maintenance windows.
"},{"location":"merlin6/software-support/ansys-rsm/#using-rsm-in-ansys","title":"Using RSM in ANSYS","text":"Using the RSM service in ANSYS is slightly different depending on the ANSYS software being used. Please follow the official ANSYS documentation for details about how to use it for that specific software.
Alternativaly, please refer to some the examples showed in the following chapters (ANSYS specific software).
"},{"location":"merlin6/software-support/ansys-rsm/#using-rsm-in-ansys-fluent","title":"Using RSM in ANSYS Fluent","text":"For further information for using RSM with Fluent, please visit the ANSYS Fluent section.
"},{"location":"merlin6/software-support/ansys-rsm/#using-rsm-in-ansys-cfx","title":"Using RSM in ANSYS CFX","text":"For further information for using RSM with CFX, please visit the ANSYS CFX section.
"},{"location":"merlin6/software-support/ansys-rsm/#using-rsm-in-ansys-mapdl","title":"Using RSM in ANSYS MAPDL","text":"For further information for using RSM with MAPDL, please visit the ANSYS mapdl section.
"},{"location":"merlin6/software-support/ansys/","title":"ANSYS","text":""},{"location":"merlin6/software-support/ansys/#ansys","title":"ANSYS","text":"This document describes generic information of how to load and run ANSYS software in the Merlin cluster
"},{"location":"merlin6/software-support/ansys/#ansys-software-in-pmodules","title":"ANSYS software in Pmodules","text":"The ANSYS software can be loaded through PModules.
The default ANSYS versions are loaded from the central PModules repository. However, there are some known problems that can pop up when using some specific ANSYS packages in advanced mode. Due to this, and also to improve the interactive experience of the user, ANSYS has been also installed in the Merlin high performance storage and we have made it available from Pmodules.
"},{"location":"merlin6/software-support/ansys/#loading-merlin6-ansys","title":"Loading Merlin6 ANSYS","text":"For loading the Merlin6 ANSYS software, one needs to run Pmodules v1.1.4 or newer, and then use a specific repository (called overlay_merlin) which is only available from the Merlin cluster:
module load Pmodules/1.1.6\nmodule use overlay_merlin\n Once overlay_merlin is invoked, it will disable central ANSYS installations with the same version, which will be replaced by the local ones in Merlin. Releases from the central Pmodules repository which have not a local installation will remain visible. For each ANSYS release, one can identify where it is installed by searching ANSYS in PModules with the --verbose option. This will show the location of the different ANSYS releases as follows:
/opt/psi/data/software/pmodules# module load Pmodules/1.1.6\nmodule load: unstable module has been loaded -- Pmodules/1.1.6\n\n# module use merlin_overlay\n\n# module search ANSYS --verbose\n\nModule Rel.stage Group Dependencies/Modulefile\n-------------------------------------------------------------------------------------------------------------------------------------------------------------------------\nANSYS/2019R3 stable Tools dependencies:\n modulefile: /data/software/pmodules/Tools/modulefiles/ANSYS/2019R3\nANSYS/2020R1 stable Tools dependencies:\n modulefile: /opt/psi/Tools/modulefiles/ANSYS/2020R1\nANSYS/2020R1-1 stable Tools dependencies:\n modulefile: /opt/psi/Tools/modulefiles/ANSYS/2020R1-1\nANSYS/2020R2 stable Tools dependencies:\n modulefile: /data/software/pmodules/Tools/modulefiles/ANSYS/2020R2\nANSYS/2021R1 stable Tools dependencies:\n modulefile: /data/software/pmodules/Tools/modulefiles/ANSYS/2021R1\nANSYS/2021R2 stable Tools dependencies:\n modulefile: /data/software/pmodules/Tools/modulefiles/ANSYS/2021R2\n Tip
Please only use Merlin6 ANSYS installations from overlay_merlin in the Merlin cluster.
ANSYS Remote Solve Manager (RSM) is used by ANSYS Workbench to submit computational jobs to HPC clusters directly from Workbench on your desktop.
Therefore, PSI workstations with direct access to Merlin can submit jobs by using RSM.
For further information, please visit the ANSYS RSM section.
"},{"location":"merlin6/software-support/ansys/#ansys-fluent","title":"ANSYS Fluent","text":"For further information, please visit the ANSYS Fluent section.
"},{"location":"merlin6/software-support/ansys/#ansys-cfx","title":"ANSYS CFX","text":"For further information, please visit the ANSYS CFX section.
"},{"location":"merlin6/software-support/ansys/#ansys-mapdl","title":"ANSYS MAPDL","text":"For further information, please visit the ANSYS MAPDL section.
"},{"location":"merlin6/software-support/gothic/","title":"GOTHIC","text":""},{"location":"merlin6/software-support/gothic/#gothic","title":"GOTHIC","text":""},{"location":"merlin6/software-support/gothic/#installation","title":"Installation","text":"Gothic is locally installed in Merlin in the following directory:
Bash/data/project/general/software/gothic\n Multiple versions are available. As of August 22, 2022, the latest installed version is Gothic 8.3 QA.
Future releases will be placed in the PSI Modules system, therefore, loading it through PModules will be possible at some point. However, in the meantime one has to use the existing installations present in /data/project/general/software/gothic.
When running Gothic in interactive or batch mode, one has to consider the following requirements:
--nodes=1-1 or -N 1-1 is strongly recommended: this will prevent Slurm to allocate multiple nodes if the Slurm allocation definition is ambiguous.--ntasks=1 or -n 1).--cpus-per-task=<num_cpus> or -c <num_cpus> is in general recommended. Notice that <num_cpus> must never exceed the maximum number of CPUS in a compute node (usually 88).--hint=multithread for enforcing hyper-threading.--mem=<mem_in_MB> option. This is in general not necessary.Is not allowed to run CPU intensive interactive jobs in the login nodes. Only applications capable to limit the number of cores are allowed to run for longer time. Also, running in the login nodes is not efficient, since resources are shared with other processes and users.
Is possible to submit interactive jobs to the cluster by allocating a full compute node, or even by allocating a few cores only. This will grant dedicated CPUs and resources and in general it will not affect other users.
For interactive jobs, is strongly recommended to use the hourly partition, which usually has a good availability of nodes.
For longer runs, one should use the daily (or general) partition. However, getting interactive access to nodes on these partitions is sometimes more difficult if the cluster is pretty full.
To submit an interactive job, consider the following requirements:
--x11 is necessary.GTHTMP environment variable. There are two options:Use local scratch: Each compute node has its own /scratch area. This area is independent to any other node, therefore not visible by other nodes. Using the top directory /scratch for interactive jobs is the simplest way, and it can be defined before or after the allocation creation, as follows:
# Example 1: Define GTHTMP before the allocation\nexport GTHTMP=/scratch\nsalloc ...\n\n# Example 2: Define GTHTMP after the allocation\nsalloc ...\nexport GTHTMP=/scratch\n Notice that if you want to create a custom sub-directory (i.e. /scratch/$USER, one has to create the sub-directory on every new allocation! In example:
# Example 1:\nexport GTHTMP=/scratch/$USER\nsalloc ...\nmkdir -p $GTHTMP\n\n# Example 2:\nsalloc ...\nexport GTHTMP=/scratch/$USER\nmkdir -p $GTHTMP\n Creating sub-directories makes the process more complex, therefore using just /scratch is simpler and recommended. 2. Shared scratch: Using shared scratch allows to have a directory visible from all compute nodes and login nodes. Therefore, one can use /shared-scratch to achieve the same as in 1., but creating a sub-directory needs to be done just once.
Please, consider that /scratch usually provides better performance and, in addition, will offload the main storage. Therefore, using local scratch is strongly recommended. Use the shared scratch only when strongly necessary.
Use the hourly partition: Using the hourly partition is recommended for running interactive jobs (latency is in general lower). However, daily and general are also available if you expect longer runs, but in these cases you should expect longer waiting times.
These requirements are in addition to the requirements previously described in the General requirements section.
"},{"location":"merlin6/software-support/gothic/#interactive-allocations-examples","title":"Interactive allocations: examples","text":"salloc --partition=hourly -N 1 -n 1 -c 88 --hint=multithread --x11 --exclusive --mem=0\n num_cpus=22\nsalloc --partition=hourly -N 1 -n 1 -c $num_cpus --hint=multithread --x11\n"},{"location":"merlin6/software-support/gothic/#batch-job","title":"Batch job","text":"The Slurm cluster is mainly used by non interactive batch jobs: Users submit a job, which goes into a queue, and waits until Slurm can assign resources to it. In general, the longer the job, the longer the waiting time, unless there are enough free resources to inmediately start running it.
Running Gothic in a Slurm batch script is pretty simple. One has to mainly consider the requirements described in the General requirements section, and:
GTHTMP in a batch script is simpler than on an allocation. If you plan to run multiple jobs in the same node, you can even create a second sub-directory level based on the Slurm Job ID:mkdir -p /scratch/$USER/$SLURM_JOB_ID\nexport GTHTMP=/scratch/$USER/$SLURM_JOB_ID\n... # Run Gothic here\nrm -rf /scratch/$USER/$SLURM_JOB_ID\n Temporary data generated by the job in GTHTMP must be removed at the end of the job, as showed above.
#!/bin/bash -l\n#SBATCH --job-name=Gothic\n#SBATCH --time=3-00:00:00\n#SBATCH --partition=general\n#SBATCH --nodes=1\n#SBATCH --ntasks=1\n#SBATCH --cpus-per-task=88\n#SBATCH --hint=multithread\n#SBATCH --exclusive\n#SBATCH --mem=0\n#SBATCH --clusters=merlin6\n\nINPUT_FILE='MY_INPUT.SIN'\n\nmkdir -p /scratch/$USER/$SLURM_JOB_ID\nexport GTHTMP=/scratch/$USER/$SLURM_JOB_ID\n\n/data/project/general/software/gothic/gothic8.3qa/bin/gothic_s.sh $INPUT_FILE -m -np $SLURM_CPUS_PER_TASK\ngth_exit_code=$?\n\n# Clean up data in /scratch\nrm -rf /scratch/$USER/$SLURM_JOB_ID\n\n# Return exit code from GOTHIC\nexit $gth_exit_code\n #!/bin/bash -l\n#SBATCH --job-name=Gothic\n#SBATCH --time=3-00:00:00\n#SBATCH --partition=general\n#SBATCH --nodes=1\n#SBATCH --ntasks=1\n#SBATCH --cpus-per-task=22\n#SBATCH --hint=multithread\n#SBATCH --clusters=merlin6\n\nINPUT_FILE='MY_INPUT.SIN'\n\nmkdir -p /scratch/$USER/$SLURM_JOB_ID\nexport GTHTMP=/scratch/$USER/$SLURM_JOB_ID\n\n/data/project/general/software/gothic/gothic8.3qa/bin/gothic_s.sh $INPUT_FILE -m -np $SLURM_CPUS_PER_TASK\ngth_exit_code=$?\n\n# Clean up data in /scratch\nrm -rf /scratch/$USER/$SLURM_JOB_ID\n\n# Return exit code from GOTHIC\nexit $gth_exit_code\n"},{"location":"merlin6/software-support/impi/","title":"Intel MPI Support","text":""},{"location":"merlin6/software-support/impi/#intel-mpi-support","title":"Intel MPI Support","text":"This document describes which set of Intel MPI versions in PModules are supported in the Merlin6 cluster.
"},{"location":"merlin6/software-support/impi/#usage","title":"Usage","text":""},{"location":"merlin6/software-support/impi/#srun","title":"srun","text":"We strongly recommend the use of srun over mpirun or mpiexec. Using srun would properly bind tasks in to cores and less customization is needed, while mpirun and mpiexec might need more advanced configuration and should be only used by advanced users. Please, always adapt your scripts for using srun before opening a support ticket. Also, please contact us on any problem when using a module.
Tip
Always run Intel MPI with the srun command. The only exception is for advanced users, however srun is still recommended.
When running with srun, one should tell Intel MPI to use the PMI libraries provided by Slurm. For PMI-1:
Bashexport I_MPI_PMI_LIBRARY=/usr/lib64/libpmi.so\n\nsrun ./app\n Alternatively, one can use PMI-2, but then one needs to specify it as follows:
Bashexport I_MPI_PMI_LIBRARY=/usr/lib64/libpmi2.so\nexport I_MPI_PMI2=yes\n\nsrun ./app\n For more information, please read Slurm Intel MPI Guide
Note
Please note that PMI2 might not work properly in some Intel MPI versions. If so, you can either fallback to PMI-1 or to contact the Merlin administrators.
"},{"location":"merlin6/software-support/merlin-rmount/","title":"merlin_rmount","text":""},{"location":"merlin6/software-support/merlin-rmount/#merlin_rmount","title":"merlin_rmount","text":""},{"location":"merlin6/software-support/merlin-rmount/#background","title":"Background","text":"Merlin provides a command for mounting remote file systems, called merlin_rmount. This provides a helpful wrapper over the Gnome storage utilities (GIO and GVFS), and provides support for a wide range of remote file formats, including:
First, start a new session. This will start a new bash shell in the current terminal where you can add further commands.
Bash Session$ merlin_rmount --init\n[INFO] Starting new D-Bus RMOUNT session\n\n(RMOUNT STARTED) [bliven_s@merlin-l-002 ~]$\n Note that behind the scenes this is creating a new dbus daemon. Running multiple daemons on the same login node leads to unpredictable results, so it is best not to initialize multiple sessions in parallel.
"},{"location":"merlin6/software-support/merlin-rmount/#standard-endpoints","title":"Standard Endpoints","text":"Standard endpoints can be mounted using
Bashmerlin_rmount --select-mount\n Select the desired url using the arrow keys.
From this list any of the standard supported endpoints can be mounted.
"},{"location":"merlin6/software-support/merlin-rmount/#other-endpoints","title":"Other endpoints","text":"Other endpoints can be mounted using the merlin_rmount --mount <endpoint> command.
After mounting a volume the script will print the mountpoint. It should be of the form
Bash/run/user/$UID/gvfs/<endpoint>\n where $UID gives your unix user id (a 5-digit number, also viewable with id -u) and <endpoint> is some string generated from the mount options.
For convenience, it may be useful to add a symbolic link for this gvfs directory. For instance, this would allow all volumes to be accessed in ~/mnt/:
Bashln -s ~/mnt /run/user/$UID/gvfs\n Files are accessible as long as the merlin_rmount shell remains open.
To disconnect, close the session with one of the following:
Disconnecting will unmount all volumes.
"},{"location":"merlin6/software-support/merlin-rmount/#alternatives","title":"Alternatives","text":""},{"location":"merlin6/software-support/merlin-rmount/#thunar","title":"Thunar","text":"Users that prefer a GUI file browser may prefer the thunar command, which opens the Gnome File Browser. This is also available in NoMachine sessions in the bottom bar (1). Thunar supports the same remote filesystems as merlin_rmount; just type the URL in the address bar (2).
When using thunar within a NoMachine session, file transfers continue after closing NoMachine (as long as the NoMachine session stays active).
Files can also be accessed at the command line as needed (see 'Accessing Files' above).
"},{"location":"merlin6/software-support/merlin-rmount/#resources","title":"Resources","text":"This document describes which set of OpenMPI versions in PModules are supported in the Merlin6 cluster.
"},{"location":"merlin6/software-support/openmpi/#usage","title":"Usage","text":""},{"location":"merlin6/software-support/openmpi/#srun","title":"srun","text":"We strongly recommend the use of srun over mpirun or mpiexec. Using srun would properly bind tasks in to cores and less customization is needed, while mpirun and 'mpiexec' might need more advanced configuration and should be only used by advanced users. Please, always adapt your scripts for using srun before opening a support ticket. Also, please contact us on any problem when using a module.
Example:
Bashsrun ./app\n Tip
Always run OpenMPI with the srun command. The only exception is for advanced users, however srun is still recommended.
OpenMPI supports UCX starting from version 3.0, but it\u2019s recommended to use version 4.0 or higher due to stability and performance improvements. UCX should be used only by advanced users, as it requires to run it with mpirun (needs advanced knowledge) and is an exception for running MPI without srun (UCX is not integrated at PSI within srun).
For running UCX, one should:
mpirun:-mca pml ucx --mca btl ^vader,tcp,openib,uct -x UCX_NET_DEVICES=mlx5_0:1\n mpirun:export OMPI_MCA_pml=\"ucx\"\nexport OMPI_MCA_btl=\"^vader,tcp,openib,uct\"\nexport UCX_NET_DEVICES=mlx5_0:1\n In addition, one can add the following options for debugging purposes (visit UCX Logging for possible UCX_LOG_LEVEL values):
-x UCX_LOG_LEVEL=<data|debug|warn|info|...> -x UCX_LOG_FILE=<filename>\n This can be also added externally before the mpirun call (see below example). Full example:
mpirun command:mpirun -np $SLURM_NTASKS -mca pml ucx --mca btl ^vader,tcp,openib,uct -x UCX_NET_DEVICES=mlx5_0:1 -x UCX_LOG_LEVEL=data -x UCX_LOG_FILE=UCX-$SLURM_JOB_ID.log ./app\n mpirun command:export OMPI_MCA_pml=\"ucx\"\nexport OMPI_MCA_btl=\"^vader,tcp,openib,uct\"\nexport UCX_NET_DEVICES=mlx5_0:1\nexport UCX_LOG_LEVEL=data\nexport UCX_LOG_FILE=UCX-$SLURM_JOB_ID.log\n\nmpirun -np $SLURM_NTASKS ./app\n"},{"location":"merlin6/software-support/openmpi/#supported-openmpi-versions","title":"Supported OpenMPI versions","text":"For running OpenMPI properly in a Slurm batch system, OpenMPI and Slurm must be compiled accordingly.
We can find a large number of compilations of OpenMPI modules in the PModules central repositories. However, only some of them are suitable for running in a Slurm cluster: any OpenMPI versions with suffixes _slurm are suitable for running in the Merlin6 cluster. Also, OpenMPI with suffix _merlin6 can be used, but these will be fully replaced by the _slurm series in the future (so it can be used on any Slurm cluster at PSI). Please, avoid using any other OpenMPI releases.
Tip
Suitable OpenMPI versions for running in the Merlin6 cluster:
openmpi/<version>_slurm [Recommended]openmpi/<version>_merlin6New OpenMPI versions that need to be tested will be compiled first in the unstable repository, and once validated will be moved to stable. We can not ensure that modules in that repository are production ready, but you can use it at your own risk.
For using unstable modules, you might need to load the unstable PModules repository as follows:
module use unstable\n"},{"location":"merlin6/software-support/openmpi/#stable-repository","title":"'stable' repository","text":"Officially supported OpenMPI versions will be available in the stable repository (which is the default loaded repository).
For further information, please check Current and still supported versions in the left-hand sidebar.
Usually, not more than 2 minor update releases will be present in the stable repository. Older minor update releases will be moved to deprecated despite are officially supported. This will ensure that users compile new software with the latest stable versions, but we keep available the old versions for software which was compiled with it.
Old OpenMPI versions (it is, any official OpenMPI version which has been moved to retired or ancient) will be moved to the deprecated PModules repository. For further information, please check Older versions in the left-hand sidebar. versions.
Also, as mentioned in before, older official supported OpenMPI releases (minor updates) will be moved to deprecated.
For using deprecated modules, you might need to load the deprecated PModules repository as follows:
module use deprecated\n However, this is usually not needed: when loading directly a specific version in the deprecated repository, if this is not found in stable it try to search and to fallback to other repositories (deprecated or unstable).
For legacy software, some users might require a different OpenMPI version. We always encourage users to try one of the existing stable versions (OpenMPI always with suffix _slurm or _merlin6!), as they will contain the latest bug fixes and they usually should work. In the worst case, you can also try with the ones in the deprecated repository (again, OpenMPI always with suffix _slurm or _merlin6!), or for very old software which was based on OpenMPI v1 you can follow the guide FAQ: Removed MPI constructs, which provides some easy steps for migrating from OpenMPI v1 to v2 or superior or also is useful to find out why your code does not compile properly.
When, after trying the mentioned versions and guide, you are still facing problems, please contact us. Also, please contact us if you require a newer version with a different gcc or intel compiler (in example, Intel v19).
Note
NoMachine is the official strongly recommended and supported tool for running ParaView. Consider that running over SSH (X11-Forwarding needed) is very slow, but also configuration might not work as it also depends on the client configuration (Linux workstation/laptop, Windows with XMing, etc.). Hence, please avoid running Paraview over SSH. The only exception for running over SSH is when running it as a job from a NoMachine client.
"},{"location":"merlin6/software-support/paraview/#usage","title":"Usage","text":""},{"location":"merlin6/software-support/paraview/#pmodules","title":"PModules","text":"Is strongly recommended the use of the latest ParaView version available in PModules. In example, for loading paraview:
Bashmodule use unstable\nmodule load paraview/5.8.1\n"},{"location":"merlin6/software-support/paraview/#running-paraview","title":"Running ParaView","text":"For running ParaView, one can run it with VirtualGL to take advantatge of the GPU card located on each login node. For that, once loaded, you can start paraview as follows:
Bashvglrun paraview\n Alternatively, one can run paraview with mesa support with the below command. This can be useful when running on CPU computing nodes (with srun / salloc) which have no graphics card (and where vglrun is not possible):
paraview-mesa paraview\n"},{"location":"merlin6/software-support/paraview/#running-older-versions-of-paraview","title":"Running older versions of ParaView","text":"Older versions of ParaView available in PModules (i.e. paraview/5.0.1 and paraview/5.4.1) might require a different command for running paraview with Mesa support. The command is the following:
# Warning: only for Paraview 5.4.1 and older\nparaview --mesa\n"},{"location":"merlin6/software-support/paraview/#running-paraview-interactively-in-the-batch-system","title":"Running ParaView interactively in the batch system","text":"One can run ParaView interactively in the CPU cluster as follows:
Bash# First, load module. In example: \"module load paraview/5.8.1\"\nsrun --pty --x11 --partition=general --ntasks=1 paraview-mesa paraview\n One can change the partition, number of tasks or specify extra parameters to srun if needed.
PSI provides a variety of ways to execute python code.
Anaconda (\"conda\" for short) is a package manager with excellent python integration. Using it you can create isolated environments for each of your python applications, containing exactly the dependencies needed for that app. It is similar to the virtualenv python package, but can also manage non-python requirements.
"},{"location":"merlin6/software-support/python/#loading-conda","title":"Loading conda","text":"Conda is loaded from the module system:
Bashmodule load anaconda\n"},{"location":"merlin6/software-support/python/#using-pre-made-environments","title":"Using pre-made environments","text":"Loading the module provides the conda command, but does not otherwise change your environment. First an environment needs to be activated. Available environments can be seen with conda info --envs and include many specialized environments for software installs. After activating you should see the environment name in your prompt:
conda activate datascience_py37\n"},{"location":"merlin6/software-support/python/#condarc-file","title":"CondaRC file","text":"Creating a ~/.condarc file is recommended if you want to create new environments on merlin. Environments can grow quite large, so you will need to change the default storage location from the default (your home directory) to a larger volume (usually /data/user/$USER).
Save the following as $HOME/.condarc:
always_copy: true\n\nenvs_dirs:\n - /data/user/$USER/conda/envs\n\npkgs_dirs:\n - /data/user/$USER/conda/pkgs\n - $ANACONDA_PREFIX/conda/pkgs\n\nchannels:\n - conda-forge\n - nodefaults\n Run conda info to check that the variables are being set correctly.
We will create an environment named myenv which uses an older version of numpy, e.g. to test for backwards compatibility of our code (the -q and --yes switches are just for not getting prompted and disabling the progress bar). The environment will be created in the default location as defined by the .condarc configuration file (see above).
$ conda create -q --yes -n 'myenv1' numpy=1.8 scipy ipython\n\nFetching package metadata: ...\nSolving package specifications: .\nPackage plan for installation in environment /gpfs/home/feichtinger/conda-envs/myenv1:\n\nThe following NEW packages will be INSTALLED:\n\n ipython: 2.3.0-py27_0\n numpy: 1.8.2-py27_0\n openssl: 1.0.1h-1\n pip: 1.5.6-py27_0\n python: 2.7.8-1\n readline: 6.2-2\n scipy: 0.14.0-np18py27_0\n setuptools: 5.8-py27_0\n sqlite: 3.8.4.1-0\n system: 5.8-1\n tk: 8.5.15-0\n zlib: 1.2.7-0\n\nTo activate this environment, use:\n$ source activate myenv1\n\nTo deactivate this environment, use:\n$ source deactivate\n The created environment contains just the packages that are needed to satisfy the requirements and it is local to your installation. The python installation is even independent of the central installation, i.e. your code will still work in such an environment, even if you are offline or AFS is down. However, you need the central installation if you want to use the conda command itself.
Packages for your new environment will be either copied from the central one into your new environment, or if there are newer packages available from anaconda and you did not specify exactly the version from our central installation, they may get downloaded from the web. This will require significant space in the envs_dirs that you defined in .condarc. If you create other environments on the same local disk, they will share the packages using hard links.
We can switch to the newly created environment with the conda activate command.
conda activate myenv1\n Info
Note that anaconda's activate/deactivate scripts are compatible with the bash and zsh shells but not with [t]csh.
Let's test whether we indeed got the desired numpy version:
Bash Session$ python -c 'import numpy as np; print np.version.version'\n\n1.8.2\n You can install additional packages into the active environment using the conda install command.
$ conda install --yes -q bottle\n\nFetching package metadata: ...\nSolving package specifications: .\nPackage plan for installation in environment /gpfs/home/feichtinger/conda-envs/myenv1:\n\nThe following NEW packages will be INSTALLED:\n\n bottle: 0.12.5-py27_0\n"},{"location":"merlin6/software-support/python/#jupyterhub","title":"Jupyterhub","text":"Jupyterhub is a service for running code notebooks on the cluster, particularly in python. It is a powerful tool for data analysis and prototyping. For more infomation see the Jupyterhub documentation.
"},{"location":"merlin6/software-support/python/#pythons-to-avoid","title":"Pythons to avoid","text":"Avoid using the system python (/usr/bin/python). It is intended for OS software and may not be up to date.
Also avoid the 'python' module (module load python). This is a minimal install of python intended for embedding in other modules.
For interactive command shell access, use an SSH client. We recommend to activate SSH's X11 forwarding to allow you to use graphical applications (e.g. a text editor, but for more performant graphical access, refer to the sections below). X applications are supported in the login nodes and X11 forwarding can be used for those users who have properly configured X11 support in their desktops, however:
Refer to {How To Use Merlin -> Accessing from Linux Clients} for Linux SSH client and X11 configuration.
"},{"location":"merlin7/01-Quick-Start-Guide/accessing-interactive-nodes/#accessing-from-a-windows-client","title":"Accessing from a Windows client","text":"Refer to {How To Use Merlin -> Accessing from Windows Clients} for Windows SSH client and X11 configuration.
"},{"location":"merlin7/01-Quick-Start-Guide/accessing-interactive-nodes/#accessing-from-a-macos-client","title":"Accessing from a MacOS client","text":"Refer to {How To Use Merlin -> Accessing from MacOS Clients} for MacOS SSH client and X11 configuration.
"},{"location":"merlin7/01-Quick-Start-Guide/accessing-interactive-nodes/#nomachine-remote-desktop-access","title":"NoMachine Remote Desktop Access","text":"X applications are supported in the login nodes and can run efficiently through a NoMachine client. This is the officially supported way to run more demanding X applications on Merlin7.
Refer to {How To Use Merlin -> Remote Desktop Access} for further instructions of how to configure the NoMachine client and how to access it from PSI and from outside PSI.
"},{"location":"merlin7/01-Quick-Start-Guide/accessing-interactive-nodes/#login-nodes-hardware-description","title":"Login nodes hardware description","text":"The Merlin7 login nodes are the official machines for accessing the recources of Merlin7. From these machines, users can submit jobs to the Slurm batch system as well as visualize or compile their software.
The Merlin7 login nodes are the following:
Hostname SSH NoMachine Scratch Scratch Mountpoint login001.merlin7.psi.ch yes yes 1TB NVMe/scratch login002.merlin7.psi.ch yes yes 1TB NVMe /scratch"},{"location":"merlin7/01-Quick-Start-Guide/accessing-slurm/","title":"Accessing Slurm Cluster","text":""},{"location":"merlin7/01-Quick-Start-Guide/accessing-slurm/#accessing-slurm-cluster","title":"Accessing Slurm Cluster","text":""},{"location":"merlin7/01-Quick-Start-Guide/accessing-slurm/#the-merlin-slurm-clusters","title":"The Merlin Slurm clusters","text":"Merlin contains a multi-cluster setup, where multiple Slurm clusters coexist under the same umbrella. It basically contains the following clusters:
merlin7.gmerlin7.Any job submission must be performed from a Merlin login node. Please refer to the Accessing the Interactive Nodes documentation for further information about how to access the cluster.
In addition, any job must be submitted from a high performance storage area visible by the login nodes and by the computing nodes. For this, the possible storage areas are the following: * /data/user * /data/project * /data/scratch/shared
The Merlin7 CPU cluster (merlin7) is the default cluster configured in the login nodes. Any job submission will use by default this cluster, unless the option --cluster is specified with another of the existing clusters.
For further information about how to use this cluster, please visit: Merlin7 CPU Slurm Cluster documentation.
"},{"location":"merlin7/01-Quick-Start-Guide/accessing-slurm/#merlin7-gpu-cluster-access","title":"Merlin7 GPU cluster access","text":"The Merlin7 GPU cluster (gmerlin7) is visible from the login nodes. However, to submit jobs to this cluster, one needs to specify the option --cluster=gmerlin7 when submitting a job or allocation.
For further information about how to use this cluster, please visit: Merlin7 GPU Slurm Cluster documentation.
"},{"location":"merlin7/01-Quick-Start-Guide/code-of-conduct/","title":"Code Of Conduct","text":""},{"location":"merlin7/01-Quick-Start-Guide/code-of-conduct/#code-of-conduct","title":"Code Of Conduct","text":""},{"location":"merlin7/01-Quick-Start-Guide/code-of-conduct/#the-basic-principle","title":"The Basic principle","text":"The basic principle is courtesy and consideration for other users.
/scratch and /data/scratch/shared partitions for temporary data:/data/user or /data/project for that purpose./scratch over /data/scratch/shared and use the latter only when you require the temporary files to be visible from multiple nodes.Warning
When a user leaves PSI and his account has been removed, her storage space in Merlin may be recycled. Hence, when a user leaves PSI, she, her supervisor or team must ensure that the data is backed up to an external storage!
"},{"location":"merlin7/01-Quick-Start-Guide/code-of-conduct/#system-administrator-rights","title":"System Administrator Rights","text":"Within his lair, the wizard ever strives for the perfection of his art.
"},{"location":"merlin7/01-Quick-Start-Guide/introduction/#about-merlin7","title":"About Merlin7","text":"PSI's Merlin7 cluster is run on top of an IaaS (Infrastructure as a Service) vCluster on the CSCS Alps infrastructure. It is fully integrated with the PSI service landscape was designed to provide the same end user experience as its PSI-local predecessor clusters.
Merlin7 has been in production since beginning of June 2025.
All PSI users can request access to Merlin7, please go to the Requesting Merlin Accounts page and complete the steps given there.
In case you identify errors or missing information, please provide feedback through merlin-admins mailing list mailing list or submit a ticket using the PSI service portal.
"},{"location":"merlin7/01-Quick-Start-Guide/introduction/#infrastructure","title":"Infrastructure","text":""},{"location":"merlin7/01-Quick-Start-Guide/introduction/#hardware","title":"Hardware","text":"The Merlin7 cluster contains the following node specification:
Node #N CPU RAM GPU #GPUs Login 2 2 AMD EPYC 7742 (64 Cores 2.25GHz) 512GB CPU 77 2 AMD EPYC 7742 (64 Cores 2.25GHz) 512GB GPU A100 8 2 AMD EPYC 7713 (64 Cores 3.2GHz) 512GB A100 80GB 4 GPU GH 5 NVIDIA ARM Grace Neoverse v2 (144 Cores 3.1GHz) 864GB (Unified) GH200 120GB 4"},{"location":"merlin7/01-Quick-Start-Guide/introduction/#network","title":"Network","text":"The Merlin7 cluster builds on top of HPE/Cray technologies, including a high-performance network fabric called Slingshot. This network fabric is able to provide up to 200 Gbit/s throughput between nodes. Further information on Slignshot can be found on at HPE.
Through software interfaces like libFabric (which available on Merlin7), application can leverage the network seamlessly.
"},{"location":"merlin7/01-Quick-Start-Guide/introduction/#storage","title":"Storage","text":"Unlike previous iteration of the Merlin HPC clusters, Merlin7 does not have any local storage. Instead storage for the entire cluster is provided through a dedicated storage appliance from HPE/Cray called ClusterStor.
The appliance is built of several storage servers:
With effective storage capacity of:
The storage is directly connected to the cluster (and each individual node) through the Slingshot NIC.
"},{"location":"merlin7/01-Quick-Start-Guide/requesting-accounts/","title":"Requesting Merlin Accounts","text":""},{"location":"merlin7/01-Quick-Start-Guide/requesting-accounts/#requesting-merlin-accounts","title":"Requesting Merlin Accounts","text":""},{"location":"merlin7/01-Quick-Start-Guide/requesting-accounts/#requesting-access-to-merlin7","title":"Requesting Access to Merlin7","text":"All PSI users can ask for access to the Merlin7 cluster. Access to Merlin7 is regulated by the PSI user's account being a member of the svc-cluster_merlin7 access group.
Requesting Merlin7 access has to be done using the Request Linux Group Membership form, available in PSI's central Service Catalog on Service Now.
Mandatory fields you need to fill: * Order Access for user: Defaults to the logged in user. However, requesting access for another user it's also possible. * Request membership for group: Choosesvc-cluster_merlin7. * Justification: Please add a short justification of what you will be running on Merlin7.
Once submitted, the Merlin responsibles will approve the request as soon as possible (within the next few hours on working days). Once the request is approved, it may take up to 30 minutes to get the account fully configured.
"},{"location":"merlin7/01-Quick-Start-Guide/requesting-projects/","title":"Requesting a Merlin Project","text":""},{"location":"merlin7/01-Quick-Start-Guide/requesting-projects/#requesting-a-merlin-project","title":"Requesting a Merlin Project","text":"A project owns its own storage area in Merlin, which can be accessed by other group members.
Projects can receive a higher storage quota than user areas and should be the primary way of organizing bigger storage requirements in a multi-user collaboration.
Access to a project's directories is governed by project members belonging to a common Unix group. You may use an existing Unix group or you may have a new Unix group created especially for the project. The project responsible will be the owner of the Unix group (this is important)!
This document explains how to request new Unix group, to request membership for existing groups, and the procedure for requesting a Merlin project.
"},{"location":"merlin7/01-Quick-Start-Guide/requesting-projects/#about-unix-groups","title":"About Unix groups","text":"Before requesting a Merlin project, it is important to have a Unix group that can be used to grant access to it to different members of the project.
Unix groups in the PSI Active Directory (which is the PSI central database containing user and group information, and more) are defined by the unx- prefix, followed by a name. In general, PSI employees working on Linux systems (including HPC clusters, like Merlin) can request for a non-existing Unix group, and can become responsible for managing it. In addition, a list of administrators can be set. The administrators, together with the group manager, can approve or deny membership requests. Further information about this topic is covered in the Linux Documentation - Services Admin Guides: Unix Groups / Group Management, managed by the Central Linux Team.
To gran access to specific Merlin project directories, some users may require to be added to some specific Unix groups: * Each Merlin project (i.e. /data/project/{bio|general}/$projectname) or experiment (i.e. /data/experiment/$experimentname) directory has access restricted by ownership and group membership (with a very few exceptions allowing public access). * Users requiring access to a specific restricted project or experiment directory have to request membership for the corresponding Unix group owning the directory.
If you need a new Unix group to be created, you need to first get this group through a separate PSI Service Now ticket. Please use the following template. You can also specify the login names of the initial group members and the owner of the group. The owner of the group is the person who will be allowed to modify the group.
Please open an Incident Request with subject:
Text OnlySubject: Request for new unix group xxxx\n and base the text field of the request on this template
Text OnlyDear HelpDesk\n\nI would like to request a new unix group.\n\nUnix Group Name: unx-xxxxx\nInitial Group Members: xxxxx, yyyyy, zzzzz, ...\nGroup Owner: xxxxx\nGroup Administrators: aaaaa, bbbbb, ccccc, ....\n\nBest regards,\n Existing Merlin projects have already a Unix group assigned. To have access to a project, users must belong to the proper Unix group owning that project.
Supervisors should inform new users which extra groups are needed for their project(s). If this information is not known, one can check the permissions for that directory. In example:
Bash(base) \u2744 [caubet_m@merlin-l-001:/data/user/caubet_m]# ls -ltrhd /data/project/general/$projectname\n(base) \u2744 [caubet_m@merlin-l-001:/data/user/caubet_m]# ls -ltrhd /data/project/bio/$projectname\n Requesting membership for a specific Unix group has to be done with the corresponding Request Linux Group Membership form, available in the PSI Service Now Service Catalog.
Once submitted, the responsible of the Unix group has to approve the request.
Important note: Requesting access to specific Unix Groups will require validation from the responsible of the Unix Group. If you ask for inclusion in many groups it may take longer, since the fulfillment of the request will depend on more people.
Further information can be found in the Linux Documentation - Services User guide: Unix Groups / Group Management
"},{"location":"merlin7/01-Quick-Start-Guide/requesting-projects/#managing-unix-groups","title":"Managing Unix Groups","text":"Other administration operations on Unix Groups it's mainly covered in the Linux Documentation - Services Admin Guides: Unix Groups / Group Management, managed by the Central Linux Team.
"},{"location":"merlin7/01-Quick-Start-Guide/requesting-projects/#requesting-a-merlin-project_1","title":"Requesting a Merlin project","text":"Once a Unix group is available, a Merlin project can be requested. To request a project, please provide the following information in a PSI Service Now ticket
Please open an Incident Request with subject:
Text OnlySubject: [Merlin7] Project Request for project name xxxxxx\n and base the text field of the request on this template
Text OnlyDear HelpDesk\n\nI would like to request a new Merlin7 project.\n\nProject Name: xxxxx\nUnixGroup: xxxxx # Must be an existing Unix Group\n\nThe project responsible is the Owner of the Unix Group.\nIf you need a storage quota exceeding the defaults, please provide a description\nand motivation for the higher storage needs:\n\nStorage Quota: 1TB with a maximum of 1M Files\nReason: (None for default 1TB/1M)\n\nBest regards,\n The default storage quota for a project is 1TB (with a maximal Number of Files of 1M). If you need a larger assignment, you need to request this and provide a description of your storage needs.
"},{"location":"merlin7/01-Quick-Start-Guide/requesting-projects/#further-documentation","title":"Further documentation","text":"Further information it's also available in the Linux Central Documentation: * Unix Group / Group Management for users * Unix Group / Group Management for group managers
Special thanks to the Linux Central Team and AIT to make this possible.
"},{"location":"merlin7/02-How-To-Use-Merlin/archive/","title":"Archive & PSI Data Catalog","text":""},{"location":"merlin7/02-How-To-Use-Merlin/archive/#archive-psi-data-catalog","title":"Archive & PSI Data Catalog","text":""},{"location":"merlin7/02-How-To-Use-Merlin/archive/#psi-data-catalog-as-a-psi-central-service","title":"PSI Data Catalog as a PSI Central Service","text":"PSI provides access to the Data Catalog for long-term data storage and retrieval. Data is stored on the PetaByte Archive at the Swiss National Supercomputing Centre (CSCS).
The Data Catalog and Archive is suitable for:
The Data Catalog is part of PSI's effort to conform to the FAIR principles for data management. In accordance with this policy, data will be publicly released under CC-BY-SA 4.0 after an embargo period expires.
The Merlin cluster is connected to the Data Catalog. Hence, users archive data stored in the Merlin storage under the /data directories (currentlyi, /data/user and /data/project). Archiving from other directories is also possible, however the process is much slower as data can not be directly retrieved by the PSI archive central servers (central mode), and needs to be indirectly copied to these (decentral mode).
Archiving can be done from any node accessible by the users (usually from the login nodes).
Tip
Archiving can be done in two different ways:
Below are the main steps for using the Data Catalog.
datasetIngestor script/data/user or /data/project. It would be also necessary when the Merlin export server (merlin-archive.psi.ch) is down for any reason.Archive for the datasetRetrievedatasetRetriever scriptSince large data sets may take a lot of time to transfer, some steps are designed to happen in the background. The discovery website can be used to track the progress of each step.
"},{"location":"merlin7/02-How-To-Use-Merlin/archive/#account-registration","title":"Account Registration","text":"Two types of account permit access to the Data Catalog. If your data was collected at a beamline, you may have been assigned a p-group (e.g. p12345) for the experiment. Other users are assigned a-group (e.g. a-12345).
Groups are usually assigned to a PI, and then individual user accounts are added to the group. This must be done under user request through PSI Service Now. For existing a-groups and p-groups, you can follow the standard central procedures. Alternatively, if you do not know how to do that, follow the Merlin7 Requesting extra Unix groups procedure, or open a PSI Service Now ticket.
"},{"location":"merlin7/02-How-To-Use-Merlin/archive/#documentation","title":"Documentation","text":"Accessing the Data Catalog is done through the SciCat software. Documentation is here: ingestManual.
"},{"location":"merlin7/02-How-To-Use-Merlin/archive/#loading-datacatalog-tools","title":"Loading datacatalog tools","text":"The latest datacatalog software is maintained in the PSI module system. To access it from the Merlin systems, run the following command:
Bashmodule load datacatalog\n It can be done from any host in the Merlin cluster accessible by users. Usually, login nodes will be the nodes used for archiving.
"},{"location":"merlin7/02-How-To-Use-Merlin/archive/#finding-your-token","title":"Finding your token","text":"As of 2022-04-14 a secure token is required to interact with the data catalog. This is a long random string that replaces the previous user/password authentication (allowing access for non-PSI use cases). This string should be treated like a password and not shared.
You will need to save this token for later steps. To avoid including it in all the commands, I suggest saving it to an environmental variable (Linux):
Text Only$ SCICAT_TOKEN=RqYMZcqpqMJqluplbNYXLeSyJISLXfnkwlfBKuvTSdnlpKkU\n (Hint: prefix this line with a space to avoid saving the token to your bash history.)
Tokens expire after 2 weeks and will need to be fetched from the website again.
"},{"location":"merlin7/02-How-To-Use-Merlin/archive/#ingestion","title":"Ingestion","text":"The first step to ingesting your data into the catalog is to prepare a file describing what data you have. This is called metadata.json, and can be created with a text editor (e.g. vim). It can in principle be saved anywhere, but keeping it with your archived data is recommended. For more information about the format, see the 'Bio metadata' section below. An example follows:
{\n \"principalInvestigator\": \"albrecht.gessler@psi.ch\",\n \"creationLocation\": \"/PSI/EMF/JEOL2200FS\",\n \"dataFormat\": \"TIFF+LZW Image Stack\",\n \"sourceFolder\": \"/gpfs/group/LBR/pXXX/myimages\",\n \"owner\": \"Wilhelm Tell\",\n \"ownerEmail\": \"wilhelm.tell@psi.ch\",\n \"type\": \"raw\",\n \"description\": \"EM micrographs of amygdalin\",\n \"ownerGroup\": \"a-12345\",\n \"scientificMetadata\": {\n \"description\": \"EM micrographs of amygdalin\",\n \"sample\": {\n \"name\": \"Amygdalin beta-glucosidase 1\",\n \"uniprot\": \"P29259\",\n \"species\": \"Apple\"\n },\n \"dataCollection\": {\n \"date\": \"2018-08-01\"\n },\n \"microscopeParameters\": {\n \"pixel size\": {\n \"v\": 0.885,\n \"u\": \"A\"\n },\n \"voltage\": {\n \"v\": 200,\n \"u\": \"kV\"\n },\n \"dosePerFrame\": {\n \"v\": 1.277,\n \"u\": \"e/A2\"\n }\n }\n }\n}\n It is recommended to use the ScicatEditor for creating metadata files. This is a browser-based tool specifically for ingesting PSI data. Using the tool avoids syntax errors and provides templates for common data sets and options. The finished JSON file can then be downloaded to merlin or copied into a text editor.
Another option is to use the SciCat graphical interface from NoMachine. This provides a graphical interface for selecting data to archive. This is particularly useful for data associated with a DUO experiment and p-group. Type SciCat`` to get started after loading thedatacatalog`` module. The GUI also replaces the the command-line ingestion described below.
The following steps can be run from wherever you saved your metadata.json. First, perform a \"dry-run\" which will check the metadata for errors:
datasetIngestor --token $SCICAT_TOKEN metadata.json\n It will ask for your PSI credentials and then print some info about the data to be ingested. If there are no errors, proceed to the real ingestion:
BashdatasetIngestor --token $SCICAT_TOKEN --ingest --autoarchive metadata.json\n You will be asked whether you want to copy the data to the central system:
/data/user or /data/project, answer 'no' since the data catalog candirectly read the data. * If you are on a directory other than /data/user and ``/data/project, or you are on a desktop computer, answer 'yes'. Copying large datasets to the PSI archive system may take quite a while (minutes to hours).
If there are no errors, your data has been accepted into the data catalog! From now on, no changes should be made to the ingested data. This is important, since the next step is for the system to copy all the data to the CSCS Petabyte archive. Writing to tape is slow, so this process may take several days, and it will fail if any modifications are detected.
If using the --autoarchive option as suggested above, your dataset should now be in the queue. Check the data catalog: <https://discovery.psi.ch. Your job should have status 'WorkInProgress'. You will receive an email when the ingestion is complete.
If you didn't use --autoarchive, you need to manually move the dataset into the archive queue. From discovery.psi.ch, navigate to the 'Archive' tab. You should see the newly ingested dataset. Check the dataset and click Archive. You should see the status change from datasetCreated to scheduleArchiveJob. This indicates that the data is in the process of being transferred to CSCS.
After a few days the dataset's status will change to datasetOnAchive indicating the data is stored. At this point it is safe to delete the data.
Running the datasetIngestor in dry mode (without --ingest) finds most errors. However, it is sometimes convenient to find potential errors yourself with simple unix commands.
Find problematic filenames
Bashfind . -iregex '.*/[^/]*[^a-zA-Z0-9_ ./-][^/]*'=\n Find broken links
Bashfind -L . -type l\n Find outside links
Bashfind . -type l -exec bash -c 'realpath --relative-base \"`pwd`\" \"$0\" 2>/dev/null |egrep \"^[./]\" |sed \"s|^|$0 ->|\" ' '{}' ';'\n Delete certain files (use with caution)
Bash# Empty directories\nfind . -type d -empty -delete\n# Backup files\nfind . -name '*~' -delete\nfind . -name '*#autosave#' -delete\n"},{"location":"merlin7/02-How-To-Use-Merlin/archive/#troubleshooting-known-bugs","title":"Troubleshooting & Known Bugs","text":"key_cert_check_authority: invalid certificate\nCertificate invalid: name is not a listed principal\n It indicates that no kerberos token was provided for authentication. You can avoid the warning by first running kinit (PSI linux systems). Running [/usr/bin/rsync -e ssh -avxz .... It is expected that this step will take a long time and may appear to have hung. You can check what files have been successfully transfered using rsync:rsync --list-only user_n@pb-archive.psi.ch:archive/UID/PATH/\n where UID is the dataset ID (12345678-1234-1234-1234-123456789012) and PATH is the absolute path to your data. Note that rsync creates directories first and that the transfer order is not alphabetical in some cases, but it should be possible to see whether any data has transferred.
There is currently a limit on the number of files per dataset (technically, the limit is from the total length of all file paths). It is recommended to break up datasets into 300'000 files or less.
tar -f [output].tar [srcdir]\n Uncompressed data can be compressed on the cluster using the following command:
Text Onlysbatch /data/software/Slurm/Utilities/Parallel_TarGz.batch -s [srcdir] -t [output].tar -n\n Run /data/software/Slurm/Utilities/Parallel_TarGz.batch -h for more details and options.
/data/project/bio/myproject/archive $ datasetIngestor -copy -autoarchive -allowexistingsource -ingest metadata.json\n2019/11/06 11:04:43 Latest version: 1.1.11\n\n2019/11/06 11:04:43 Your version of this program is up-to-date\n2019/11/06 11:04:43 You are about to add a dataset to the === production === data catalog environment...\n2019/11/06 11:04:43 Your username:\nuser_n\n2019/11/06 11:04:48 Your password:\n2019/11/06 11:04:52 User authenticated: XXX\n2019/11/06 11:04:52 User is member in following a or p groups: XXX\n2019/11/06 11:04:52 OwnerGroup information a-XXX verified successfully.\n2019/11/06 11:04:52 contactEmail field added: XXX\n2019/11/06 11:04:52 Scanning files in dataset /data/project/bio/myproject/archive\n2019/11/06 11:04:52 No explicit filelistingPath defined - full folder /data/project/bio/myproject/archive is used.\n2019/11/06 11:04:52 Source Folder: /data/project/bio/myproject/archive at /data/project/bio/myproject/archive\n2019/11/06 11:04:57 The dataset contains 100000 files with a total size of 50000000000 bytes.\n2019/11/06 11:04:57 creationTime field added: 2019-07-29 18:47:08 +0200 CEST\n2019/11/06 11:04:57 endTime field added: 2019-11-06 10:52:17.256033 +0100 CET\n2019/11/06 11:04:57 license field added: CC BY-SA 4.0\n2019/11/06 11:04:57 isPublished field added: false\n2019/11/06 11:04:57 classification field added: IN=medium,AV=low,CO=low\n2019/11/06 11:04:57 Updated metadata object:\n{\n \"accessGroups\": [\n \"XXX\"\n ],\n \"classification\": \"IN=medium,AV=low,CO=low\",\n \"contactEmail\": \"XXX\",\n \"creationLocation\": \"XXX\",\n \"creationTime\": \"2019-07-29T18:47:08+02:00\",\n \"dataFormat\": \"XXX\",\n \"description\": \"XXX\",\n \"endTime\": \"2019-11-06T10:52:17.256033+01:00\",\n \"isPublished\": false,\n \"license\": \"CC BY-SA 4.0\",\n \"owner\": \"XXX\",\n \"ownerEmail\": \"XXX\",\n \"ownerGroup\": \"a-XXX\",\n \"principalInvestigator\": \"XXX\",\n \"scientificMetadata\": {\n...\n },\n \"sourceFolder\": \"/data/project/bio/myproject/archive\",\n \"type\": \"raw\"\n}\n2019/11/06 11:04:57 Running [/usr/bin/ssh -l user_n pb-archive.psi.ch test -d /data/project/bio/myproject/archive].\nkey_cert_check_authority: invalid certificate\nCertificate invalid: name is not a listed principal\nuser_n@pb-archive.psi.ch's password:\n2019/11/06 11:05:04 The source folder /data/project/bio/myproject/archive is not centrally available (decentral use case).\nThe data must first be copied to a rsync cache server.\n\n2019/11/06 11:05:04 Do you want to continue (Y/n)?\nY\n2019/11/06 11:05:09 Created dataset with id 12.345.67890/12345678-1234-1234-1234-123456789012\n2019/11/06 11:05:09 The dataset contains 108057 files.\n2019/11/06 11:05:10 Created file block 0 from file 0 to 1000 with total size of 413229990 bytes\n2019/11/06 11:05:10 Created file block 1 from file 1000 to 2000 with total size of 416024000 bytes\n2019/11/06 11:05:10 Created file block 2 from file 2000 to 3000 with total size of 416024000 bytes\n2019/11/06 11:05:10 Created file block 3 from file 3000 to 4000 with total size of 416024000 bytes\n...\n2019/11/06 11:05:26 Created file block 105 from file 105000 to 106000 with total size of 416024000 bytes\n2019/11/06 11:05:27 Created file block 106 from file 106000 to 107000 with total size of 416024000 bytes\n2019/11/06 11:05:27 Created file block 107 from file 107000 to 108000 with total size of 850195143 bytes\n2019/11/06 11:05:27 Created file block 108 from file 108000 to 108057 with total size of 151904903 bytes\n2019/11/06 11:05:27 short dataset id: 0a9fe316-c9e7-4cc5-8856-e1346dd31e31\n2019/11/06 11:05:27 Running [/usr/bin/rsync -e ssh -avxz /data/project/bio/myproject/archive/ user_n@pb-archive.psi.ch:archive\n/0a9fe316-c9e7-4cc5-8856-e1346dd31e31/data/project/bio/myproject/archive].\nkey_cert_check_authority: invalid certificate\nCertificate invalid: name is not a listed principal\nuser_n@pb-archive.psi.ch's password:\nPermission denied, please try again.\nuser_n@pb-archive.psi.ch's password:\n/usr/libexec/test_acl.sh: line 30: /tmp/tmpacl.txt: Permission denied\n/usr/libexec/test_acl.sh: line 30: /tmp/tmpacl.txt: Permission denied\n/usr/libexec/test_acl.sh: line 30: /tmp/tmpacl.txt: Permission denied\n/usr/libexec/test_acl.sh: line 30: /tmp/tmpacl.txt: Permission denied\n/usr/libexec/test_acl.sh: line 30: /tmp/tmpacl.txt: Permission denied\n...\n2019/11/06 12:05:08 Successfully updated {\"pid\":\"12.345.67890/12345678-1234-1234-1234-123456789012\",...}\n2019/11/06 12:05:08 Submitting Archive Job for the ingested datasets.\n2019/11/06 12:05:08 Job response Status: okay\n2019/11/06 12:05:08 A confirmation email will be sent to XXX\n12.345.67890/12345678-1234-1234-1234-123456789012\n"},{"location":"merlin7/02-How-To-Use-Merlin/archive/#publishing","title":"Publishing","text":"After datasets are are ingested they can be assigned a public DOI. This can be included in publications and will make the datasets on http://doi.psi.ch.
For instructions on this, please read the 'Publish' section in the ingest manual.
"},{"location":"merlin7/02-How-To-Use-Merlin/archive/#retrieving-data","title":"Retrieving data","text":"Retrieving data from the archive is also initiated through the Data Catalog. Please read the 'Retrieve' section in the ingest manual.
"},{"location":"merlin7/02-How-To-Use-Merlin/archive/#further-information","title":"Further Information","text":"This is the standard method. Official X11 support is provided through NoMachine. For normal SSH sessions, use your SSH client as follows:
Bashssh $username@login001.merlin7.psi.ch\nssh $username@login002.merlin7.psi.ch\n"},{"location":"merlin7/02-How-To-Use-Merlin/connect-from-linux/#ssh-with-x11-forwarding","title":"SSH with X11 Forwarding","text":"Official X11 Forwarding support is through NoMachine. Please follow the document {Job Submission -> Interactive Jobs} and {Accessing Merlin -> NoMachine} for more details. However, we provide a small recipe for enabling X11 Forwarding in Linux.
~/.ssh/config to implicitly add -X to all ssh connections:ForwardAgent yes\nForwardX11Trusted yes\n -Y to the ssh command. In example:ssh -X $username@login001.merlin7.psi.ch\nssh -X $username@login002.merlin7.psi.ch\n sview. A X11 based slurm view of the cluster should popup in your client session:sview\n"},{"location":"merlin7/02-How-To-Use-Merlin/connect-from-macos/","title":"Connecting from a MacOS Client","text":""},{"location":"merlin7/02-How-To-Use-Merlin/connect-from-macos/#connecting-from-a-macos-client","title":"Connecting from a MacOS Client","text":""},{"location":"merlin7/02-How-To-Use-Merlin/connect-from-macos/#ssh-without-x11-forwarding","title":"SSH without X11 Forwarding","text":"This is the standard method. Official X11 support is provided through NoMachine. For normal SSH sessions, use your SSH client as follows:
Bashssh $username@login001.merlin7.psi.ch\nssh $username@login002.merlin7.psi.ch\n"},{"location":"merlin7/02-How-To-Use-Merlin/connect-from-macos/#ssh-with-x11-forwarding","title":"SSH with X11 Forwarding","text":""},{"location":"merlin7/02-How-To-Use-Merlin/connect-from-macos/#requirements","title":"Requirements","text":"For running SSH with X11 Forwarding in MacOS, one needs to have a X server running in MacOS. The official X Server for MacOS is XQuartz. Please ensure you have it running before starting a SSH connection with X11 forwarding.
"},{"location":"merlin7/02-How-To-Use-Merlin/connect-from-macos/#ssh-with-x11-forwarding-in-macos","title":"SSH with X11 Forwarding in MacOS","text":"Official X11 support is through NoMachine. Please follow the document {Job Submission -> Interactive Jobs} and {Accessing Merlin -> NoMachine} for more details. However, we provide a small recipe for enabling X11 Forwarding in MacOS.
Ensure that XQuartz is installed and running in your MacOS.
For enabling client X11 forwarding, add the following to the start of ~/.ssh/config to implicitly add -X to all ssh connections:
ForwardAgent yes\nForwardX11Trusted yes\n -Y to the ssh command. In example:ssh -X $username@login001.merlin7.psi.ch\nssh -X $username@login002.merlin7.psi.ch\n sview. A X11 based slurm view of the cluster should popup in your client session.sview\n"},{"location":"merlin7/02-How-To-Use-Merlin/connect-from-windows/","title":"Connecting from a Windows Client","text":""},{"location":"merlin7/02-How-To-Use-Merlin/connect-from-windows/#connecting-from-a-windows-client","title":"Connecting from a Windows Client","text":""},{"location":"merlin7/02-How-To-Use-Merlin/connect-from-windows/#ssh-with-putty-without-x11-forwarding","title":"SSH with PuTTY without X11 Forwarding","text":"PuTTY is one of the most common tools for SSH.
Check, if the following software packages are installed on the Windows workstation by inspecting the Start menu (hint: use the Search box to save time):
If they are missing, you can install them using the Software Kiosk icon on the Desktop.
Start PuTTY
[Optional] Enable xterm to have similar mouse behavour as in Linux:
Official X11 Forwarding support is through NoMachine. Please follow the document {Job Submission -> Interactive Jobs} and {Accessing Merlin -> NoMachine} for more details. However, we provide a small recipe for enabling X11 Forwarding in Windows.
Check, if the Xming is installed on the Windows workstation by inspecting the Start menu (hint: use the Search box to save time). If missing, you can install it by using the Software Kiosk icon (should be located on the Desktop).
Ensure that a X server (Xming) is running. Otherwise, start it.
Enable X11 Forwarding in your SSH client. In example, for Putty:
Projects and users have their own areas in the central PSI AFS service. In order to access to these areas, valid Kerberos and AFS tickets must be granted.
These tickets are automatically granted when accessing through SSH with username and password. Alternatively, one can get a granting ticket with the kinit (Kerberos) and aklog (AFS ticket, which needs to be run after kinit) commands.
Due to PSI security policies, the maximum lifetime of the ticket is 7 days, and the default time is 10 hours. It means than one needs to constantly renew (krenew command) the existing granting tickets, and their validity can not be extended longer than 7 days. At this point, one needs to obtain new granting tickets.
As already described above, the most common use case is to obtain Kerberos and AFS granting tickets by introducing username and password:
kinit (to obtain a granting Kerberos ticket) followed by aklog (to obtain a granting AFS ticket). See further details below.To manually obtain granting tickets, one has to:
kinit $USER and enter the PSI password.kinit $USER@D.PSI.CH\n aklog. No password is necessary, but a valid Kerberos ticket is mandatory.aklog\n klist command.klist\n krenew command.krenew\n Text Only* Keep in mind that the maximum lifetime for granting tickets is 7 days, therefore `krenew` can not be used beyond that limit,\n and then `kinit` should be used instead.\n"},{"location":"merlin7/02-How-To-Use-Merlin/kerberos/#obtanining-granting-tickets-with-keytab","title":"Obtanining granting tickets with keytab","text":"Sometimes, obtaining granting tickets by using password authentication is not possible. An example are user Slurm jobs requiring access to private areas in AFS. For that, there's the possibility to generate a keytab file.
Be aware that the keytab file must be private, fully protected by correct permissions and not shared with any other users.
"},{"location":"merlin7/02-How-To-Use-Merlin/kerberos/#creating-a-keytab-file","title":"Creating a keytab file","text":"For generating a keytab, one has to:
mkdir -p ~/.k5\n ktutil utility:ktutil\n ktutil console, one has to generate a keytab file as follows:# Replace $USER by your username\nadd_entry -password -k 0 -f -p $USER\nwkt /data/user/$USER/.k5/krb5.keytab\nexit\n Please note: * That you will need to add your password once. This step is required for generating the keytab file. * ktutildoes not report an error if you enter a wrong password! You can test with the kinit command documented below. If kinit fails with an error message like \"pre-authentication failed\", this is usually due to a wrong password/key in the keytab file. In this case you have to remove the keytab file and re-run the ktutil command. See \"Updating the keytab file\" in the section below.
After a password change you have to update your keytab:
rm -f ~/.k5/krb5.keytab\n ktutil utility:ktutil\n ktutil console, one has to generate a keytab file as follows:# Replace $USER by your username\nadd_entry -password -k 0 -f -p $USER\nwkt /data/user/$USER/.k5/krb5.keytab\nexit\n"},{"location":"merlin7/02-How-To-Use-Merlin/kerberos/#obtaining-tickets-by-using-keytab-files","title":"Obtaining tickets by using keytab files","text":"Once the keytab is created, one can obtain kerberos tickets without being prompted for a password as follows:
Bashkinit -kt ~/.k5/krb5.keytab $USER\naklog\n"},{"location":"merlin7/02-How-To-Use-Merlin/kerberos/#slurm-jobs-accessing-afs","title":"Slurm jobs accessing AFS","text":"Some jobs may require to access private areas in AFS. For that, having a valid keytab file is required. Then, from inside the batch script one can obtain granting tickets for Kerberos and AFS, which can be used for accessing AFS private areas.
The steps should be the following:
KRB5CCNAME, which can be used to specify the location of the Kerberos5 credentials (ticket) cache. In general it should point to a shared area ($HOME/.k5 is a good location), and is strongly recommended to generate an independent Kerberos5 credential cache (it is, creating a new credential cache per Slurm job):export KRB5CCNAME=\"$(mktemp \"$HOME/.k5/krb5cc_XXXXXX\")\"\n kinit by using your keytab:kinit -kt \"$HOME/.k5/krb5.keytab\" $USER@D.PSI.CH\n aklog:aklog\n kdestroy\n"},{"location":"merlin7/02-How-To-Use-Merlin/kerberos/#slurm-batch-script-example-obtaining-krbafs-granting-tickets","title":"Slurm batch script example: obtaining KRB+AFS granting tickets","text":""},{"location":"merlin7/02-How-To-Use-Merlin/kerberos/#example-1-independent-crendetial-cache-per-slurm-job","title":"Example 1: Independent crendetial cache per Slurm job","text":"This is the recommended way. At the end of the job, is strongly recommended to remove / destroy the existing kerberos tickets.
Bash#!/bin/bash\n#SBATCH --partition=hourly # Specify 'general' or 'daily' or 'hourly'\n#SBATCH --time=01:00:00 # Strictly recommended when using 'general' partition.\n#SBATCH --output=run.out # Generate custom output file\n#SBATCH --error=run.err # Generate custom error file\n#SBATCH --nodes=1 # Uncomment and specify #nodes to use\n#SBATCH --ntasks=1 # Uncomment and specify #nodes to use\n#SBATCH --cpus-per-task=1\n#SBATCH --constraint=xeon-gold-6152\n#SBATCH --hint=nomultithread\n#SBATCH --job-name=krb5\n\nexport KRB5CCNAME=\"$(mktemp \"$HOME/.k5/krb5cc_XXXXXX\")\"\nkinit -kt \"$HOME/.k5/krb5.keytab\" $USER@D.PSI.CH\naklog\nklist\n\necho \"Here should go my batch script code.\"\n\n# Destroy Kerberos tickets created for this job only\nkdestroy\nklist\n"},{"location":"merlin7/02-How-To-Use-Merlin/kerberos/#example-2-shared-credential-cache","title":"Example 2: Shared credential cache","text":"Some users may need/prefer to run with a shared cache file. For doing that, one needs to setup KRB5CCNAME from the login node session, before submitting the job.
export KRB5CCNAME=\"$(mktemp \"$HOME/.k5/krb5cc_XXXXXX\")\"\n Then, you can run one or multiple jobs scripts (or parallel job with srun). KRB5CCNAME will be propagated to the job script or to the parallel job, therefore a single credential cache will be shared amongst different Slurm runs.
#!/bin/bash\n#SBATCH --partition=hourly # Specify 'general' or 'daily' or 'hourly'\n#SBATCH --time=01:00:00 # Strictly recommended when using 'general' partition.\n#SBATCH --output=run.out # Generate custom output file\n#SBATCH --error=run.err # Generate custom error file\n#SBATCH --nodes=1 # Uncomment and specify #nodes to use\n#SBATCH --ntasks=1 # Uncomment and specify #nodes to use \n#SBATCH --cpus-per-task=1\n#SBATCH --constraint=xeon-gold-6152\n#SBATCH --hint=nomultithread\n#SBATCH --job-name=krb5\n\n# KRB5CCNAME is inherit from the login node session\nkinit -kt \"$HOME/.k5/krb5.keytab\" $USER@D.PSI.CH\nsrun aklog\n\necho \"Here should go my batch script code.\"\n\necho \"No need to run 'kdestroy', as it may have to survive for running other jobs\"\n"},{"location":"merlin7/02-How-To-Use-Merlin/merlin-rmount/","title":"Using merlin_rmount","text":""},{"location":"merlin7/02-How-To-Use-Merlin/merlin-rmount/#using-merlin_rmount","title":"Using merlin_rmount","text":""},{"location":"merlin7/02-How-To-Use-Merlin/merlin-rmount/#background","title":"Background","text":"Merlin provides a command for mounting remote file systems, called merlin_rmount. This provides a helpful wrapper over the Gnome storage utilities (GIO and GVFS), and provides support for a wide range of remote file formats, including - SMB/CIFS (Windows shared folders) - WebDav - AFP - FTP, SFTP - complete list
First, start a new session. This will start a new bash shell in the current terminal where you can add further commands.
Text Only$ merlin_rmount --init\n[INFO] Starting new D-Bus RMOUNT session\n\n(RMOUNT STARTED) [bliven_s@login002 ~]$\n Note that behind the scenes this is creating a new dbus daemon. Running multiple daemons on the same login node leads to unpredictable results, so it is best not to initialize multiple sessions in parallel.
"},{"location":"merlin7/02-How-To-Use-Merlin/merlin-rmount/#standard-endpoints","title":"Standard Endpoints","text":"Standard endpoints can be mounted using
Text Onlymerlin_rmount --select-mount\n Select the desired url using the arrow keys.
From this list any of the standard supported endpoints can be mounted.
"},{"location":"merlin7/02-How-To-Use-Merlin/merlin-rmount/#other-endpoints","title":"Other endpoints","text":"Other endpoints can be mounted using the merlin_rmount --mount <endpoint> command.
After mounting a volume the script will print the mountpoint. It should be of the form
Text Only/run/user/$UID/gvfs/<endpoint>\n where $UID gives your unix user id (a 5-digit number, also viewable with id -u) and <endpoint> is some string generated from the mount options.
For convenience, it may be useful to add a symbolic link for this gvfs directory. For instance, this would allow all volumes to be accessed in ~/mnt/:
Text Onlyln -s ~/mnt /run/user/$UID/gvfs\n Files are accessible as long as the merlin_rmount shell remains open.
To disconnect, close the session with one of the following:
Disconnecting will unmount all volumes.
"},{"location":"merlin7/02-How-To-Use-Merlin/merlin-rmount/#alternatives","title":"Alternatives","text":""},{"location":"merlin7/02-How-To-Use-Merlin/merlin-rmount/#thunar","title":"Thunar","text":"Users that prefer a GUI file browser may prefer the thunar command, which opens the Gnome File Browser. This is also available in NoMachine sessions in the bottom bar (1). Thunar supports the same remote filesystems as merlin_rmount; just type the URL in the address bar (2).
When using thunar within a NoMachine session, file transfers continue after closing NoMachine (as long as the NoMachine session stays active).
Files can also be accessed at the command line as needed (see 'Accessing Files' above).
"},{"location":"merlin7/02-How-To-Use-Merlin/merlin-rmount/#resources","title":"Resources","text":"We provide tool(s) to help user get the most out of using the cluster. The tools described here are organised by use case and include usage examples.
"},{"location":"merlin7/02-How-To-Use-Merlin/merlin_tools/#files-and-directories","title":"Files and Directories","text":""},{"location":"merlin7/02-How-To-Use-Merlin/merlin_tools/#merlin_quotas","title":"merlin_quotas","text":"This tool is available on all of the login nodes and provides a brief overview of a user's filesystem quotas. These are limits which restrict how much storage (or number of files) a user can create. A generic table of filesystem quotas can be found on the Storage page.
"},{"location":"merlin7/02-How-To-Use-Merlin/merlin_tools/#example-1-viewing-quotas","title":"Example #1: Viewing quotas","text":"Simply calling merlin_quotas will show you a table of our quotas:
$ merlin_quotas\nPath SpaceUsed SpaceQuota Space % FilesUsed FilesQuota Files %\n-------------- --------- ---------- ------- --------- ---------- -------\n/data/user 30.26G 1T 03% 367296 2097152 18%\n \u2514\u2500 <USERNAME>\n/afs/psi.ch 3.4G 9.5G 36% 0 0 00%\n \u2514\u2500 user/<USERDIR>\n/data/project 2.457T 10T 25% 58 2097152 00%\n \u2514\u2500 bio/shared\n/data/project 338.3G 10T 03% 199391 2097152 10%\n \u2514\u2500 bio/hpce\n Tip
You can change the width of the table by either passing --no-wrap (to disable wrapping of the Path) or --width N (to explicitly set some width by N characters).
The tool can also be used to list out information about what projects directories there are and who owns/manages these:
Bash Session$ merlin_quotas projects\nProject ID Path Owner Group\n---------- ------------------------ --------- --------------\n600000000 /data/project/bio/shared germann_e unx-merlin_adm\n600000001 /data/project/bio/hpce assman_g unx-merlin_adm\n By default this only shows information on projects that you have access to, but to view the whole list you can pass --all flag:
$ merlin_quotas projects --all\nProject ID Path Owner Group\n---------- ------------------------------- -------------- -----------------\n500000000 /data/project/general/mcnp gac-mcnp unx-mcnp_all\n500000001 /data/project/general/vis_as talanov_v unx-vis_as\n500000002 /data/project/general/mmm krack org-7302\n500000003 /data/project/general laeuch_a org-7201\n \u2514\u2500 LTC_CompPhys\n600000000 /data/project/bio/shared germann_e unx-merlin_adm\n600000001 /data/project/bio/hpce assman_g unx-merlin_adm\n600000002 /data/project/bio/abrahams abrahams_j unx-bio_abrahams\n600000003 /data/project/bio/benoit benoit_r unx-bio_benoit\n600000004 /data/project/bio/ishikawa ishikawa unx-bio_ishikawa\n600000005 /data/project/bio/kammerer kammerer_r unx-bio_kammerer\n600000006 /data/project/bio/korkhov korkhov_v unx-bio_korkhov\n600000007 /data/project/bio/luo luo_j unx-bio_luo\n600000008 /data/project/bio/mueller mueller_e unx-bio_mueller\n600000009 /data/project/bio/poghosyan poghosyan_e unx-bio_poghosyan\n600000010 /data/project/bio/schertler schertler_g unx-bio_schertler\n600000011 /data/project/bio/shivashankar shivashankar_g unx-bio_shivashan\n600000012 /data/project/bio/standfuss standfuss unx-bio_standfuss\n600000013 /data/project/bio/steinmetz steinmetz unx-bio_steinmetz\n Tip
As above you can change the table width by pass either --no-wrap or --width N.
To make tracking quotas of projects easier, merlin_quotas generates a config file in your home directory which defines the projects to show when you call the tool (called ~/.merlin_quotas).
The config file simply contains a list (one per line) of project IDs which should be tracked. In theory any (or all available projects) can be tracked, but due to UNIX and Lustre permissions, accessing quotas information for a project you're not a member of is not possible.
Updating the project config
If you are added/removed from a project, you can update this config file by calling merlin_quotas genconf --all-projects --force. The --all-projects will fully check your possible membership to all projects, and the --force will overwrite your existing config file. You can also edit the file by hand (not recommended).
Merlin7 NoMachine provides users with remote desktop access to the Merlin7 computing environment. This service enables users to connect to their computing resources from any location, whether they are inside the PSI network or accessing from outside via secure methods.
"},{"location":"merlin7/02-How-To-Use-Merlin/nomachine/#accessing-merlin7-nomachine","title":"Accessing Merlin7 NoMachine","text":""},{"location":"merlin7/02-How-To-Use-Merlin/nomachine/#from-inside-psi","title":"From Inside PSI","text":"If you are inside the PSI network, you can directly connect to the Merlin7 NoMachine service without the need to go through another service.
Open your web browser and navigate to https://merlin7-nx.psi.ch:4443.
"},{"location":"merlin7/02-How-To-Use-Merlin/nomachine/#method-2-using-the-nomachine-client","title":"Method 2: Using the NoMachine Client","text":"Settings for the NoMachine client:
merlin7-nx.psi.ch4000NXUse password authenticationUsers outside the PSI network have two options for accessing the Merlin7 NoMachine service: through nx.psi.ch or via a VPN connection.
nx.psi.ch","text":"Documentation about the nx.psi.ch service can be found here.
Open your web browser and navigate to https://nx.psi.ch.
"},{"location":"merlin7/02-How-To-Use-Merlin/nomachine/#using-the-nomachine-client","title":"Using the NoMachine Client","text":"Settings for the NoMachine client:
nx.psi.ch4000NXUse password authenticationAlternatively, you can use a VPN connection to access Merlin7 as if you were inside the PSI network.
The NoMachine client is available for PSI Windows computers in the Software Kiosk under the name NX Client.
"},{"location":"merlin7/02-How-To-Use-Merlin/nomachine/#macos-and-linux","title":"macOS and Linux","text":"The NoMachine client can be downloaded from NoMachine's download page.
"},{"location":"merlin7/02-How-To-Use-Merlin/nomachine/#connection-configuration","title":"Connection Configuration","text":"Create a New Connection: Click the Add button to create a new connection.
merlin7-nx.psi.ch).4000.NX.Use password authentication.When prompted, use your PSI credentials to authenticate.
"},{"location":"merlin7/02-How-To-Use-Merlin/nomachine/#managing-sessions","title":"Managing Sessions","text":"The Merlin7 NoMachine service is managed through a front-end server and back-end nodes, facilitating balanced and efficient access to remote desktop sessions.
"},{"location":"merlin7/02-How-To-Use-Merlin/nomachine/#architecture-overview","title":"Architecture Overview","text":"merlin7-nx.psi.chHandles load-balancing and directs users to available back-end nodes.
Back-End Nodes:
login001.merlin7.psi.chlogin002.merlin7.psi.chAccess to the login node desktops must be initiated through the merlin7-nx.psi.ch front-end. The front-end service will distribute sessions across available nodes in the back-end, ensuring optimal resource usage.
When connecting to the merlin7-nx.psi.ch front-end, a new session automatically opens if no existing session is found. Users can manage their sessions as follows:
New Desktop button. This option creates a second session on another login node, provided the node is available and operational.If you encounter any issues or need further assistance with the Merlin7 NoMachine service, support is available via email. Please contact us at merlin-admins@lists.psi.ch, and our support team will be happy to assist you.
"},{"location":"merlin7/02-How-To-Use-Merlin/nomachine/#advanced-display-settings","title":"Advanced Display Settings","text":"NoMachine provides several options to optimize the display settings for better performance and clarity. These settings can be accessed and adjusted when creating a new session or by clicking the top right corner of a running session.
"},{"location":"merlin7/02-How-To-Use-Merlin/nomachine/#prevent-rescaling","title":"Prevent Rescaling","text":"Preventing rescaling can help eliminate \"blurriness\" in your display, though it may affect performance. Adjust these settings based on your performance needs:
Resize remote display (forces 1:1 pixel sizes)Merlin7 provides a modular environment to ensure flexibility, compatibility, and optimized performance. The system supports three primary module types: PSI Environment Modules (PModules), Spack Modules, and Cray Environment Modules.
"},{"location":"merlin7/02-How-To-Use-Merlin/software-repositories/#psi-environment-modules-pmodules","title":"PSI Environment Modules (PModules)","text":"The PModules system, developed by PSI, is the officially supported module system on Merlin7. It is the preferred choice for accessing validated software across a wide range of applications.
Key Features: * Expert Deployment: Each package is deployed and maintained by specific experts to ensure reliability and compatibility. * Broad Availability: Commonly used software, such as OpenMPI, ANSYS, MATLAB, and other, is provided within PModules. * Custom Requests: If a package, version, or feature is missing, users can contact the support team to explore feasibility for installation.
Tip
For further information about PModules on Merlin7 please refer to the PSI Modules chapter.
"},{"location":"merlin7/02-How-To-Use-Merlin/software-repositories/#spack-modules","title":"Spack Modules","text":"Merlin7 also provides Spack modules, offering a modern and flexible package management system. Spack supports a wide variety of software packages and versions. For more information, refer to the external PSI Spack documentation.
Tip
For further information about Spack on Merlin7 please refer to the Spack chapter.
"},{"location":"merlin7/02-How-To-Use-Merlin/software-repositories/#cray-environment-modules","title":"Cray Environment Modules","text":"Merlin7 also supports Cray Environment Modules, which include compilers, MPI implementations, and libraries optimized for Cray systems. However, Cray modules are not recommended as the default choice due to potential backward compatibility issues when the Cray Programming Environment (CPE) is upgraded to a newer version.
Recommendations: * Compiling Software: Cray modules can be used when optimization for Cray hardware is essential. * General Use: For most applications, prefer PModules, which ensure stability, backward compatibility, and long-term support.
Tip
For further information about CPE on Merlin7 please refer to the Cray Modules chapter.
"},{"location":"merlin7/02-How-To-Use-Merlin/ssh-keys/","title":"Configuring SSH Keys in Merlin","text":""},{"location":"merlin7/02-How-To-Use-Merlin/ssh-keys/#configuring-ssh-keys-in-merlin","title":"Configuring SSH Keys in Merlin","text":"Merlin users sometimes will need to access the different Merlin services without being constantly requested by a password. One can achieve that with Kerberos authentication, however in some cases some software would require the setup of SSH Keys. One example is ANSYS Fluent, which, when used interactively, the way of communication between the GUI and the different nodes is through the SSH protocol, and the use of SSH Keys is enforced.
"},{"location":"merlin7/02-How-To-Use-Merlin/ssh-keys/#setting-up-ssh-keys-on-merlin","title":"Setting up SSH Keys on Merlin","text":"For security reason, users must always protect SSH Keys with a passphrase.
User can check whether a SSH key already exists. These would be placed in the ~/.ssh/ directory. RSA encryption is usually the default one, and files in there would be id_rsa (private key) and id_rsa.pub (public key).
ls ~/.ssh/id*\n For creating SSH RSA Keys, one should:
ssh-keygen, a password will be requested twice. You must remember this password for the future.authorized_keys file, and ensure proper permissions for that file, as follows:cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys\nchmod 0600 ~/.ssh/authorized_keys\n echo \"CanonicalizeHostname yes\" >> ~/.ssh/config\n echo \"AddKeysToAgent yes\" >> ~/.ssh/config\necho \"ForwardAgent yes\" >> ~/.ssh/config\n Other options may be added.
# cat ~/.ssh/config\nCanonicalizeHostname yes\nAddKeysToAgent yes\nForwardAgent yes\n"},{"location":"merlin7/02-How-To-Use-Merlin/ssh-keys/#using-the-ssh-keys","title":"Using the SSH Keys","text":""},{"location":"merlin7/02-How-To-Use-Merlin/ssh-keys/#using-authentication-agent-in-ssh-session","title":"Using Authentication Agent in SSH session","text":"By default, when accessing the login node via SSH (with ForwardAgent=yes), it will automatically add your SSH Keys to the authentication agent. Hence, no actions should not be needed by the user. One can configure ForwardAgent=yes as follows:
$HOME/.ssh/config (or alternatively in /etc/ssh/ssh_config) file:ForwardAgent yes\n ForwardAgent=yes in the SSH command. In example:ssh -XY -o ForwardAgent=yes login001.merlin7.psi.ch\n If ForwardAgent is not enabled as shown above, one needs to run the authentication agent and then add your key to the ssh-agent. This must be done once per SSH session, as follows:
eval $(ssh-agent -s) to run the ssh-agent in that SSH sessionssh-add -l | grep \"/data/user/$(whoami)/.ssh\"\n ssh-add\n"},{"location":"merlin7/02-How-To-Use-Merlin/ssh-keys/#using-authentication-agent-in-nomachine-session","title":"Using Authentication Agent in NoMachine Session","text":"By default, when using a NoMachine session, the ssh-agent should be automatically started. Hence, there is no need of starting the agent or forwarding it.
However, for NoMachine one always need to add the private key identity to the authentication agent. This can be done as follows:
ssh-add -l | grep \"/data/user/$(whoami)/.ssh\"\n 2. If no key is returned in the previous step, you have to add the private key identity to the authentication agent. You will be requested for the passphrase of your key, and it can be done by running: Bashssh-add\n You just need to run it once per NoMachine session, and it would apply to all terminal windows within that NoMachine session.
"},{"location":"merlin7/02-How-To-Use-Merlin/ssh-keys/#troubleshooting","title":"Troubleshooting","text":""},{"location":"merlin7/02-How-To-Use-Merlin/ssh-keys/#errors-when-running-ssh-add","title":"Errors when running 'ssh-add'","text":"If the error Could not open a connection to your authentication agent. appears when running ssh-add, it means that the authentication agent is not running. Please follow the previous procedures for starting it.
If an existing SSH Key does not have password, or you want to update an existing password with a new one, you can do it as follows:
Bashssh-keygen -p -f ~/.ssh/id_rsa\n"},{"location":"merlin7/02-How-To-Use-Merlin/ssh-keys/#ssh-keys-deployed-but-not-working","title":"SSH Keys deployed but not working","text":"Please ensure proper permissions of the involved files, as well as any typos in the file names involved:
Bashchmod u+rwx,go-rwx,g+s ~/.ssh\nchmod u+rw-x,go-rwx ~/.ssh/authorized_keys\nchmod u+rw-x,go-rwx ~/.ssh/id_rsa\nchmod u+rw-x,go+r-wx ~/.ssh/id_rsa.pub\n"},{"location":"merlin7/02-How-To-Use-Merlin/ssh-keys/#testing-ssh-keys","title":"Testing SSH Keys","text":"Once SSH Key is created, for testing that the SSH Key is valid, one can do the following:
ssh login001\n kdestroy\nssh-add -D\n ssh-add\n ssh-add -l\n ssh -vvv login002\n If the last step succeeds, then means that your SSH Key is properly setup.
"},{"location":"merlin7/02-How-To-Use-Merlin/storage/","title":"Merlin7 Storage","text":""},{"location":"merlin7/02-How-To-Use-Merlin/storage/#merlin7-storage","title":"Merlin7 Storage","text":""},{"location":"merlin7/02-How-To-Use-Merlin/storage/#introduction","title":"Introduction","text":"This document describes the different directories of the Merlin7 cluster.
"},{"location":"merlin7/02-How-To-Use-Merlin/storage/#backup-and-data-policies","title":"Backup and data policies","text":"Warning
When a user leaves PSI and their account is removed, their storage space in Merlin may be recycled. Hence, when a user leaves PSI, they, their supervisor or team must ensure that the data is backed up to an external storage!
"},{"location":"merlin7/02-How-To-Use-Merlin/storage/#how-to-check-quotas","title":"How to check quotas","text":"Some of the Merlin7 directories have quotas applied. A way for checking the quotas is provided with the merlin_quotas command. This command is useful to show all quotas for the different user storage directories and partitions (including AFS). To check your quotas, please run:
$ merlin_quotas\nPath SpaceUsed SpaceQuota Space % FilesUsed FilesQuota Files %\n-------------- --------- ---------- ------- --------- ---------- -------\n/data/user 30.26G 1T 03% 367296 2097152 18%\n \u2514\u2500 <USERNAME>\n/afs/psi.ch 3.4G 9.5G 36% 0 0 0%\n \u2514\u2500 user/<USERDIR>\n/data/scratch 688.9M 2T 00% 368471 0 00%\n \u2514\u2500 shared\n/data/project 3.373T 11T 31% 425644 2097152 20%\n \u2514\u2500 bio/shared\n/data/project 4.142T 11T 38% 579596 2097152 28%\n \u2514\u2500 bio/hpce\n Note
On first use you will see a message about some configuration being generated, this is expected. Don't be surprised that it takes some time. After this using merlin_quotas should be faster.
The output shows the quotas set and how much you are using of the quota, for each filesystem that has this set. Notice that some users will have one or more /data/project/... directories showing, depending on whether you are part of a specific PSI research group or project.
The general quota constraints for the different directories are shown in the table below. Further details on how to use merlin_quotas can be found on the Tools page.
Tip
If you're interesting, you can retrieve the Lustre-based quota information directly by calling lfs quota -h -p $(( 100000000 + $(id -u $USER) )) /data directly. Using the merlin_quotas command is more convenient and shows all your relevant filesystem quotas.
Merlin7 offers the following directory classes for users:
/data/user/<username>: Private user home directory/data/project/general: project directory for Merlin/data/project/bio/$projectname: project directory for BIO/data/project/mu3e/$projectname: project directory for Mu3e/data/project/meg/$projectname: project directory for Mu3e/scratch: Local scratch disk (only visible by the node running a job)./data/scratch/shared: Shared scratch disk (visible from all nodes).Tip
In Lustre there is a concept called grace time. Filesystems have a block (amount of data) and inode (number of files) quota. These quotas contain a soft and hard limits. Once the soft limit is reached, users can keep writing up to their hard limit quota during the grace period. Once the grace time or hard limit are reached, users will be unable to write and will need remove data below the soft limit (or ask for a quota increase when this is possible, see below table).
Properties of the directory classes:
Directory Block Quota [Soft:Hard] Inode Quota [Soft:Hard] GraceTime Quota Change Policy: Block Quota Change Policy: Inodes Backup /data/user/$username PRJ [1TB:1.074TB] PRJ [2M:2.1M] 7d Immutable. Need a project. Changeable when justified. no /data/project/bio/$projectname PRJ [1TB:1.074TB] PRJ [1M:1.1M] 7d Subject to project requirements. Subject to project requirements. no /data/project/general/$projectname PRJ [1TB:1.074TB] PRJ [1M:1.1M] 7d Subject to project requirements. Subject to project requirements. no /data/scratch/shared USR [512GB:2TB] 7d Up to x2 when strongly justified. Changeable when justified. no /scratch Undef Undef N/A N/A N/A noWarning
The use of /scratch and /data/scratch/shared areas as an extension of the quota is forbidden. The /scratch and /data/scratch/shared areas must not contain final data. Keep in mind that auto cleanup policies in the /scratch and /data/scratch/shared areas are applied.
This is the default directory users will land when login in to any Merlin7 machine. It is intended for your scripts, documents, software development and data. Do not use it for I/O-hungry tasks.
The home directories are mounted in the login and computing nodes under the directory
```bash /data/user/$username
Text OnlyDirectory policies:\n\n* Read **[Important: Code of Conduct](../01-Quick-Start-Guide/code-of-conduct.md)** for more information about Merlin7 policies.\n* Is **forbidden** to use the home directories for IO-intensive tasks, instead use one of the **[scratch](storage.md#scratch-directories)** areas instead!\n* No backup policy is applied for the user home directories: **users are responsible for backing up their data**.\n\nHome directory quotas are defined in a per Lustre project basis. The quota can be checked using the `merlin_quotas` command described\n[above](storage.md#how-to-check-quotas).\n\n### Project data directory\n\nThis storage is intended for keeping large amounts of a project's data, where the data also can be\nshared by all members of the project (the project's corresponding UNIX group). We recommend to keep most data in\nproject related storage spaces, since it allows users to coordinate. Also, project spaces have more flexible policies\nregarding extending the available storage space.\n\nScientists can request a Merlin project space as described in **[[Accessing Merlin -> Requesting a Project]](../01-Quick-Start-Guide/requesting-projects.md)**.\nBy default, Merlin can offer **general** project space, centrally covered, as long as it does not exceed 10TB (otherwise, it has to be justified).\nGeneral Merlin projects might need to be reviewed after one year of their creation.\n\nOnce a Merlin project is created, the directory will be mounted in the login and computing nodes under the directory:\n\n```bash\n/data/project/general/$projectname\n Project quotas are defined in a per Lustre project basis. Users can check the project quota by running the following command:
Bashlfs quota -h -p $projectid /data\n Warning
Checking quotas for the Merlin projects is not yet possible. In the future, a list of projectid will be provided, so users can check their quotas.
Directory policies:
/scratch area during a job's runtime, i.e. for high throughput I/O for a job's temporary files./scratch, /data/scratch/shared for this purpose.Some departments or divisions have bigger storage space requirements on Merlin7. At present, bio, mu3e and meg are the main ones. These are mounted under the following paths:
/data/project/bio\n/data/project/mu3e\n/data/project/meg\n They follow the same rules as the general projects, except that they have assigned more space.
"},{"location":"merlin7/02-How-To-Use-Merlin/storage/#scratch-directories","title":"Scratch directories","text":"There are two different types of scratch storage: local (/scratch) and shared (/data/scratch/shared).
/scratch\n /data/scratch/shared\n Scratch directories policies:
Most data transfer methods support both sending and receiving, so you may initiate the transfer from either Merlin or the other system \u2014 depending on network visibility.
rsync, or ftp are generally preferable. Transfers from Merlin7 to PSI may require special firewall rules.80 or 445 (e.g., HTTPS, WebDAV).datatransfer.psi.ch using SSH-based protocols or Globus.Note
SSH-based protocols using port 22 to most PSI servers are generally not permitted. However, transfers from any PSI host to Merlin7 using port 22 are allowed. Port 21 is also available for FTP transfers from PSI to Merlin7.
rsync Resume support, skips existing files, works over SSH Quick one-time small transfer scp Simple syntax, no need to install extra tools Large dataset, high speed needed (not sensitive) FTP via service03.merlin7.psi.ch Fastest transfer speed (unencrypted data channel) Large dataset, high speed needed (sensitive data) FTP via ftp-encrypted.merlin7.psi.ch Encrypted control & data channels for security, but slower than service03 Windows interactive GUI transfer WinSCP User-friendly interface, PSI Software Kiosk, supports drag-and-drop Cross-platform interactive GUI transfer FileZilla User-friendly interface, works on Linux/macOS/Windows, supports drag-and-drop From the internet to PSI PSI Data Transfer Service Supports SSH-based protocols and Globus Need for sharing large files SWITCHfilesender Supports sharing large file and expiration date PSI -> Merlin7 over FTP Any FTP-based client Port 21 allowed from PSI to Merlin7 PSI -> Merlin7 over SSH Any SSH-based method Port 22 allowed from PSI to Merlin7 The next chapters contain detailed information about the different transfer methods available on Merlin7.
"},{"location":"merlin7/02-How-To-Use-Merlin/transfer-data/#direct-transfer-via-merlin7-login-nodes","title":"Direct Transfer via Merlin7 Login Nodes","text":"The following methods transfer data directly via the login nodes. They are suitable for use from within the PSI network.
"},{"location":"merlin7/02-How-To-Use-Merlin/transfer-data/#rsync-recommended-for-linuxmacos","title":"Rsync (Recommended for Linux/macOS)","text":"Rsync is the preferred method for small datasets from Linux/macOS systems. It supports resuming interrupted transfers and skips already transferred files. Syntax:
Bashrsync -avAHXS <src> <dst>\n An example for transferring local files to a Merlin project directory
Bashrsync -avAHXS ~/localdata $USER@login001.merlin7.psi.ch:/data/project/general/myproject/\n Tip
If a transfer is interrupted, just rerun the command: rsync will skip existing files.
Warning
Rsync uses SSH (port 22). For large datasets, transfer speed might be limited.
"},{"location":"merlin7/02-How-To-Use-Merlin/transfer-data/#scp","title":"SCP","text":"SCP works similarly to rsync but does not support resuming interrupted transfers. It may be used for quick one-off transfers. Example:
scp ~/localfile.txt $USER@login001.merlin7.psi.ch:/data/project/general/myproject/\n"},{"location":"merlin7/02-How-To-Use-Merlin/transfer-data/#secure-ftp","title":"Secure FTP","text":"A vsftpd service is available on the login nodes, providing high-speed transfers. Choose the server based on your speed vs. encryption needs:
login001.merlin7.psi.ch: Encrypted control & data channels. Use if your data is sensitive. Slower, but secure.service03.merlin7.psi.ch: Encrypted control channel only. Use if your data can be transferred unencrypted. Fastest method.Tip
The control channel is always encrypted, therefore, authentication is encrypted and secured.
"},{"location":"merlin7/02-How-To-Use-Merlin/transfer-data/#ui-based-clients-for-data-transfer","title":"UI-based Clients for Data Transfer","text":""},{"location":"merlin7/02-How-To-Use-Merlin/transfer-data/#winscp-windows","title":"WinSCP (Windows)","text":"Available in the Software Kiosk on PSI Windows machines.
login001.merlin7.psi.ch or login002.merlin7.psi.ch.ftp-encrypted.merlin7.psi.ch: Fast transfer rates. Both control and data channels encrypted.service03.merlin7.psi.ch: Fastest transfer rates, but data channel not encrypted.Drag and drop files between your PC and Merlin.
FTP (port 21)
Download from FileZilla Project, or install from your Linux software repositories if available.
login001.merlin7.psi.ch or login002.merlin7.psi.ch.ftp-encrypted.merlin7.psi.ch: Fast transfer rates. Both control and data channels encrypted.service03.merlin7.psi.ch: Fastest transfer rates, but data channel not encrypted.SWITCHfilesender is a Swiss-hosted installation of the FileSender project \u2014 a web-based application that allows authenticated users to securely and easily send arbitrarily large files to other users. Features:
About the authentication:
The service is designed to send large files for temporary availability, not as a permanent publishing platform. Typical use case:
Warning
SWITCHfilesender is not a long-term storage or archiving solution.
"},{"location":"merlin7/02-How-To-Use-Merlin/transfer-data/#psi-data-transfer","title":"PSI Data Transfer","text":"From August 2024, Merlin is connected to the PSI Data Transfer service, datatransfer.psi.ch. This is a central service managed by the Linux team. However, any problems or questions related to it can be directly reported to the Merlin administrators, which will forward the request if necessary.
The PSI Data Transfer servers supports the following protocols:
Notice that datatransfer.psi.ch does not allow SSH login, only rsync, scp and Globus access is allowed.
Access to the PSI Data Transfer uses Multi factor authentication (MFA). Therefore, having the Microsoft Authenticator App is required as explained here.
Tip
Please follow the Official PSI Data Transfer documentation for further instructions.
"},{"location":"merlin7/02-How-To-Use-Merlin/transfer-data/#connecting-to-merlin7-from-outside-psi","title":"Connecting to Merlin7 from outside PSI","text":"Merlin7 is fully accessible from within the PSI network. To connect from outside you can use:
merlin_rmount command","text":"Merlin provides a command for mounting remote file systems, called merlin_rmount. This provides a helpful wrapper over the Gnome storage utilities, and provides support for a wide range of remote file formats, including
More instruction on using merlin_rmount
On the merlin7 cluster, it is recommended to always run interactive jobs on the interactive partition. This partition allows CPU oversubscription (up to four users may share the same CPU) and has the highest scheduling priority. Access to this partition is typically quick, making it a convenient extension of the login nodes for interactive workloads.
On the gmerlin7 cluster, additional interactive partitions are available, but these are primarily intended for CPU-only workloads (such like compiling GPU-based software, or creating an allocation for submitting jobs to Grace-Hopper nodes).
Warning
Because GPU resources are scarce and expensive, interactive allocations on GPU nodes that use GPUs should only be submitted when strictly necessary and well justified.
"},{"location":"merlin7/03-Slurm-General-Documentation/interactive-jobs/#running-interactive-jobs_1","title":"Running interactive jobs","text":"There are two different ways for running interactive jobs in Slurm. This is possible by using the salloc and srun commands:
salloc: to obtain a Slurm job allocation (a set of nodes), execute command(s), and then release the allocation when the command is finished.srun: is used for running parallel tasks.Is run is used to run parallel jobs in the batch system. It can be used within a batch script (which can be run with sbatch), or within a job allocation (which can be run with salloc). Also, it can be used as a direct command (in example, from the login nodes).
When used inside a batch script or during a job allocation, srun is constricted to the amount of resources allocated by the sbatch/salloc commands. In sbatch, usually these resources are defined inside the batch script with the format #SBATCH <option>=<value>. In other words, if you define in your batch script or allocation 88 tasks (and 1 thread / core) and 2 nodes, srun is constricted to these amount of resources (you can use less, but never exceed those limits).
When used from the login node, usually is used to run a specific command or software in an interactive way. srun is a blocking process (it will block bash prompt until the srun command finishes, unless you run it in background with &). This can be very useful to run interactive software which pops up a Window and then submits jobs or run sub-tasks in the background (in example, Relion, cisTEM, etc.)
Refer to man srun for exploring all possible options for that command.
caubet_m@login001:~> srun --clusters=merlin7 --partition=interactive --ntasks=6 --ntasks-per-node=2 --nodes=3 hostname\ncn001.merlin7.psi.ch\ncn001.merlin7.psi.ch\ncn002.merlin7.psi.ch\ncn002.merlin7.psi.ch\ncn003.merlin7.psi.ch\ncn003.merlin7.psi.ch\n"},{"location":"merlin7/03-Slurm-General-Documentation/interactive-jobs/#salloc","title":"salloc","text":"
salloc is used to obtain a Slurm job allocation (a set of nodes). Once job is allocated, users are able to execute interactive command(s). Once finished (exit or Ctrl+D), the allocation is released. salloc is a blocking command, it is, command will be blocked until the requested resources are allocated.
When running salloc, once the resources are allocated, by default the user will get a new shell on one of the allocated resources (if a user has requested few nodes, it will prompt a new shell on the first allocated node). However, this behaviour can be changed by adding a shell ($SHELL) at the end of the salloc command. In example:
# Typical 'salloc' call\nsalloc --clusters=merlin7 --partition=interactive -N 2 -n 2\n\n# Custom 'salloc' call\n# - $SHELL will open a local shell on the login node from where ``salloc`` is running\nsalloc --clusters=merlin7 --partition=interactive -N 2 -n 2 $SHELL\n [Show 'salloc' example]: Allocating 2 cores (1 task/core) in 2 nodes (1 core/node) - Default caubet_m@login001:~> salloc --clusters=merlin7 --partition=interactive -N 2 -n 2\nsalloc: Granted job allocation 161\nsalloc: Nodes cn[001-002] are ready for job\n\ncaubet_m@login001:~> srun hostname\ncn002.merlin7.psi.ch\ncn001.merlin7.psi.ch\n\ncaubet_m@login001:~> exit\nexit\nsalloc: Relinquishing job allocation 161\n[Show 'salloc' example]: Allocating 2 cores (1 task/core) in 2 nodes (1 core/node) - $SHELL
caubet_m@login001:~> salloc --clusters=merlin7 --partition=interactive --ntasks=2 --nodes=2 $SHELL\nsalloc: Granted job allocation 165\nsalloc: Nodes cn[001-002] are ready for job\ncaubet_m@login001:~> srun hostname\ncn001.merlin7.psi.ch\ncn002.merlin7.psi.ch\ncaubet_m@login001:~> exit\nexit\nsalloc: Relinquishing job allocation 165\n"},{"location":"merlin7/03-Slurm-General-Documentation/interactive-jobs/#running-interactive-jobs-with-x11-support","title":"Running interactive jobs with X11 support","text":""},{"location":"merlin7/03-Slurm-General-Documentation/interactive-jobs/#requirements","title":"Requirements","text":""},{"location":"merlin7/03-Slurm-General-Documentation/interactive-jobs/#graphical-access","title":"Graphical access","text":"
NoMachine is the official supported service for graphical access in the Merlin cluster. This service is running on the login nodes. Check the document {Accessing Merlin -> NoMachine} for details about how to connect to the NoMachine service in the Merlin cluster.
For other non officially supported graphical access (X11 forwarding):
For Linux clients, please follow {How To Use Merlin -> Accessing from Linux Clients}
For Windows clients, please follow {How To Use Merlin -> Accessing from Windows Clients}
Merlin6 and merlin7 clusters allow running any windows based applications. For that, you need to add the option --x11 to the srun command. In example:
srun --clusters=merlin7 --partition=interactive --x11 sview\n will popup a X11 based slurm view of the cluster.
In the same manner, you can create a bash shell with x11 support. For doing that, you need to add the option --pty to the srun --x11 command. Once resource is allocated, from there you can interactively run X11 and non-X11 based commands.
srun --clusters=merlin7 --partition=interactive --x11 --pty bash\n [Show 'srun' with X11 support examples] caubet_m@login001:~> srun --clusters=merlin7 --partition=interactive --x11 sview\n\ncaubet_m@login001:~>\n\ncaubet_m@login001:~> srun --clusters=merlin7 --partition=interactive --x11 --pty bash\n\ncaubet_m@cn003:~> sview\n\ncaubet_m@cn003:~> echo \"This was an example\"\nThis was an example\n\ncaubet_m@cn003:~> exit\nexit\n"},{"location":"merlin7/03-Slurm-General-Documentation/interactive-jobs/#salloc-with-x11-support","title":"'salloc' with x11 support","text":"
Merlin6 and merlin7 clusters allow running any windows based applications. For that, you need to add the option --x11 to the salloc command. In example:
salloc --clusters=merlin7 --partition=interactive --x11 sview\n will popup a X11 based slurm view of the cluster.
In the same manner, you can create a bash shell with x11 support. For doing that, you need to add to run just salloc --clusters=merlin7 --partition=interactive --x11. Once resource is allocated, from there you can interactively run X11 and non-X11 based commands.
salloc --clusters=merlin7 --partition=interactive --x11\n [Show 'salloc' with X11 support examples] caubet_m@login001:~> salloc --clusters=merlin7 --partition=interactive --x11 sview\nsalloc: Granted job allocation 174\nsalloc: Nodes cn001 are ready for job\nsalloc: Relinquishing job allocation 174\n\ncaubet_m@login001:~> salloc --clusters=merlin7 --partition=interactive --x11\nsalloc: Granted job allocation 175\nsalloc: Nodes cn001 are ready for job\ncaubet_m@cn001:~>\n\ncaubet_m@cn001:~> sview\n\ncaubet_m@cn001:~> echo \"This was an example\"\nThis was an example\n\ncaubet_m@cn001:~> exit\nexit\nsalloc: Relinquishing job allocation 175\n"},{"location":"merlin7/03-Slurm-General-Documentation/merlin7-configuration/","title":"Slurm cluster 'merlin7'","text":""},{"location":"merlin7/03-Slurm-General-Documentation/merlin7-configuration/#slurm-cluster-merlin7","title":"Slurm cluster 'merlin7'","text":"
This documentation shows basic Slurm configuration and options needed to run jobs in the Merlin7 cluster.
"},{"location":"merlin7/03-Slurm-General-Documentation/merlin7-configuration/#infrastructure","title":"Infrastructure","text":""},{"location":"merlin7/03-Slurm-General-Documentation/merlin7-configuration/#hardware","title":"Hardware","text":"Text Only* 2 CPU-only login nodes\n* 77 CPU-only compute nodes\n* 5 GPU A100 nodes\n* 8 GPU Grace Hopper nodes\n The specification of the node types is:
Node #Nodes CPU RAM GRES Login Nodes 2 2x AMD EPYC 7742 (x86_64 Rome, 64 Cores, 2.25GHz) 512GB DDR4 3200Mhz CPU Nodes 77 2x AMD EPYC 7742 (x86_64 Rome, 64 Cores, 2.25GHz) 512GB DDR4 3200Mhz A100 GPU Nodes 5 2x AMD EPYC 7713 (x86_64 Milan, 64 Cores, 3.2GHz) 512GB DDR4 3200Mhz 4 x NV_A100 (80GB) GH GPU Nodes 3 2x NVidia Grace Neoverse-V2 (SBSA ARM 64bit, 144 Cores, 3.1GHz) 2x 480GB DDR5X (CPU+GPU) 4 x NV_GH200 (120GB)"},{"location":"merlin7/03-Slurm-General-Documentation/merlin7-configuration/#network","title":"Network","text":"The Merlin7 cluster builds on top of HPE/Cray technologies, including a high-performance network fabric called Slingshot. This network fabric is able to provide up to 200 Gbit/s throughput between nodes. Further information on Slignshot can be found on at HPE and at https://www.glennklockwood.com/garden/slingshot.
Through software interfaces like libFabric (which available on Merlin7), application can leverage the network seamlessly.
"},{"location":"merlin7/03-Slurm-General-Documentation/merlin7-configuration/#storage","title":"Storage","text":"Unlike previous iteration of the Merlin HPC clusters, Merlin7 does not have any local storage. Instead storage for the entire cluster is provided through a dedicated storage appliance from HPE/Cray called ClusterStor.
The appliance is built of several storage servers:
With effective storage capacity of:
The storage is directly connected to the cluster (and each individual node) through the Slingshot NIC.
"},{"location":"merlin7/03-Slurm-General-Documentation/slurm-configuration/","title":"Slurm merlin7 Configuration","text":""},{"location":"merlin7/03-Slurm-General-Documentation/slurm-configuration/#slurm-merlin7-configuration","title":"Slurm merlin7 Configuration","text":"This documentation shows basic Slurm configuration and options needed to run jobs in the Merlin7 cluster.
"},{"location":"merlin7/03-Slurm-General-Documentation/slurm-configuration/#public-partitions-configuration-summary","title":"Public partitions configuration summary","text":""},{"location":"merlin7/03-Slurm-General-Documentation/slurm-configuration/#cpu-public-partitions","title":"CPU public partitions","text":"PartitionName DefaultTime MaxTime Priority Account Per Job Limits Per User Limits general 1-00:00:00 7-00:00:00 Low merlin cpu=1024,mem=1920G cpu=1024,mem=1920G daily 0-01:00:00 1-00:00:00 Medium merlin cpu=1024,mem=1920G cpu=2048,mem=3840G hourly 0-00:30:00 0-01:00:00 High merlin cpu=2048,mem=3840G cpu=8192,mem=15T interactive 0-04:00:00 0-12:00:00 Highest merlin cpu=16,mem=30G,node=1 cpu=32,mem=60G,node=1"},{"location":"merlin7/03-Slurm-General-Documentation/slurm-configuration/#gpu-public-partitions","title":"GPU public partitions","text":""},{"location":"merlin7/03-Slurm-General-Documentation/slurm-configuration/#a100-nodes","title":"A100 nodes","text":"PartitionName DefaultTime MaxTime Priority Account Per Job Limits Per User Limits a100-general 1-00:00:00 7-00:00:00 Low merlin gres/gpu=4 gres/gpu=8 a100-daily 0-01:00:00 1-00:00:00 Medium merlin gres/gpu=8 gres/gpu=8 a100-hourly 0-00:30:00 0-01:00:00 High merlin gres/gpu=8 gres/gpu=8 a100-interactive 0-01:00:00 0-12:00:00 Very High merlin cpu=16,gres/gpu=1,mem=60G,node=1 cpu=16,gres/gpu=1,mem=60G,node=1"},{"location":"merlin7/03-Slurm-General-Documentation/slurm-configuration/#grace-hopper-nodes","title":"Grace-Hopper nodes","text":"PartitionName DefaultTime MaxTime Priority Account Per Job Limits Per User Limits gh-general 1-00:00:00 7-00:00:00 Low merlin gres/gpu=4 gres/gpu=8 gh-daily 0-01:00:00 1-00:00:00 Medium merlin gres/gpu=8 gres/gpu=8 gh-hourly 0-00:30:00 0-01:00:00 High merlin gres/gpu=8 gres/gpu=8 gh-interactive 0-01:00:00 0-12:00:00 Very High merlin cpu=16,gres/gpu=1,mem=46G,node=1 cpu=16,gres/gpu=1,mem=46G,node=1"},{"location":"merlin7/03-Slurm-General-Documentation/slurm-configuration/#cpu-cluster-merlin7","title":"CPU cluster: merlin7","text":"By default, jobs will be submitted to merlin7, as it is the primary cluster configured on the login nodes. Specifying the cluster name is typically unnecessary unless you have defined environment variables that could override the default cluster name. However, when necessary, one can specify the cluster as follows:
#SBATCH --cluster=merlin7\n"},{"location":"merlin7/03-Slurm-General-Documentation/slurm-configuration/#cpu-general-configuration","title":"CPU general configuration","text":"The Merlin7 CPU cluster is configured with the CR_CORE_MEMORY and CR_ONE_TASK_PER_CORE options.
By default, Slurm will allocate one task per core, which means: * Each task will consume 2 CPUs, regardless of whether both threads are actively used by the job.
This behavior ensures consistent resource allocation but may result in underutilization of hyper-threading in some cases.
"},{"location":"merlin7/03-Slurm-General-Documentation/slurm-configuration/#cpu-nodes-definition","title":"CPU nodes definition","text":"The table below provides an overview of the Slurm configuration for the different node types in the Merlin7 cluster. This information is essential for understanding how resources are allocated, enabling users to tailor their submission scripts accordingly.
Nodes Sockets CoresPerSocket Cores ThreadsPerCore CPUs MaxMemPerNode DefMemPerCPU Features login[001-002] 2 64 128 2 256 480G 1920M AMD_EPYC_7713 cn[001-077] 2 64 128 2 256 480G 1920M AMD_EPYC_7713Notes on memory configuration: * Memory allocation options: To request additional memory, use the following options in your submission script: * --mem=<mem_in_MB>: Allocates memory per node. * --mem-per-cpu=<mem_in_MB>: Allocates memory per CPU (equivalent to a core thread).
The total memory requested cannot exceed the MaxMemPerNode value. * Impact of disabling Hyper-Threading: Using the --hint=nomultithread option disables one thread per core, effectively halving the number of available CPUs. Consequently, memory allocation will also be halved unless explicitly adjusted.
For MPI-based jobs, where performance generally improves with single-threaded CPUs, this option is recommended. In such cases, you should double the --mem-per-cpu value to account for the reduced number of threads.
Tip
Always verify the Slurm /var/spool/slurmd/conf-cache/slurm.conf configuration file for potential changes.
In the merlin7 CPU cluster, we enforce certain limits on jobs and users to ensure fair resource usage and prevent overuse by a single user or job. These limits aim to balance resource availability while maintaining overall cluster efficiency. However, applying limits can occasionally impact the cluster\u2019s utilization. For example, user-specific limits may result in pending jobs even when many nodes are idle due to low activity.
On the other hand, these limits also enhance cluster efficiency by preventing scenarios such as a single job monopolizing all available resources, which could block other jobs from running. Without job size limits, for instance, a large job might drain the entire cluster to satisfy its resource request, a situation that is generally undesirable.
Thus, setting appropriate limits is essential to maintain fair resource usage while optimizing cluster efficiency. These limits should allow for a mix of jobs of varying sizes and types, including single-core and parallel jobs, to coexist effectively.
To implement these limits, we utilize Quality of Service (QoS). Different QoS policies are defined and applied to specific partitions in line with the established resource allocation policies. The table below outlines the various QoS definitions applicable to the merlin7 CPU-based cluster. Here: * MaxTRES specifies resource limits per job. * MaxTRESPU specifies resource limits per user.
Where: * normal QoS: This QoS has no limits and is typically applied to partitions that do not require user or job restrictions. * cpu_general QoS: This is the default QoS for merlin7 users. It limits the total resources available to each user. Additionally, this QoS is applied to the general partition, enforcing restrictions at the partition level and overriding user-level QoS. * cpu_daily QoS: Guarantees increased resources for the daily partition, accommodating shorter-duration jobs with higher resource needs. * cpu_hourly QoS: Offers the least constraints, allowing more resources to be used for the hourly partition, which caters to very short-duration jobs. * cpu_interactive QoS: Is restricted to one node and a few CPUs only, and is intended to be used when interactive allocations are necessary (salloc, srun).
For additional details, refer to the CPU partitions section.
Tip
Always verify QoS definitions for potential changes using the sacctmgr show qos format=\"Name%22,MaxTRESPU%35,MaxTRES%35\" command.
This section provides a summary of the partitions available in the merlin7 CPU cluster.
Key concepts: * PriorityJobFactor: This value is added to a job\u2019s priority (visible in the PARTITION column of the sprio -l command). Jobs submitted to partitions with higher PriorityJobFactor values generally run sooner. However, other factors like job age and especially fair share can also influence scheduling. * PriorityTier: Jobs submitted to partitions with higher PriorityTier values take precedence over pending jobs in partitions with lower PriorityTier values. Additionally, jobs from higher PriorityTier partitions can preempt running jobs in lower-tier partitions, where applicable. * QoS: Specifies the quality of service associated with a partition. It is used to control and restrict resource availability for specific partitions, ensuring that resource allocation aligns with intended usage policies. Detailed explanations of the various QoS settings can be found in the User and job limits with QoS section.
Tip
Always verify partition configurations for potential changes using the scontrol show partition command.
All Merlin users are part of the merlin account, which is used as the default account when submitting jobs. Similarly, if no partition is specified, jobs are automatically submitted to the general partition by default.
Tip
For jobs running less than one day, submit them to the daily partition. For jobs running less than one hour, use the hourly partition. These partitions provide higher priority and ensure quicker scheduling compared to general, which has limited node availability.
The hourly partition may include private nodes as an additional buffer. However, the current Slurm partition configuration, governed by PriorityTier, ensures that jobs submitted to private partitions are prioritized and processed first. As a result, access to the hourly partition might experience delays in such scenarios.
The interactive partition is designed specifically for real-time, interactive work. Here are the key characteristics:
FORCE:4), meaning that up to four interactive jobs may share the same physical CPU core. This can impact performance, but enables fast access for short-term tasks.Warning
Because of CPU sharing, the performance on the interactive partition may not be optimal for compute-intensive tasks. For long-running or production workloads, use a dedicated batch partition instead.
"},{"location":"merlin7/03-Slurm-General-Documentation/slurm-configuration/#cpu-private-partitions","title":"CPU private partitions","text":""},{"location":"merlin7/03-Slurm-General-Documentation/slurm-configuration/#cas-asa","title":"CAS / ASA","text":"PartitionName DefaultTime MaxTime TotalNodes PriorityJobFactor PriorityTier QoS AllowAccounts asa 0-01:00:00 14-00:00:00 10 1 2 normal asa"},{"location":"merlin7/03-Slurm-General-Documentation/slurm-configuration/#cnm-mu3e","title":"CNM / Mu3e","text":"PartitionName DefaultTime MaxTime TotalNodes PriorityJobFactor PriorityTier QoS AllowAccounts mu3e 1-00:00:00 7-00:00:00 4 1 2 normal mu3e, meg"},{"location":"merlin7/03-Slurm-General-Documentation/slurm-configuration/#cnm-meg","title":"CNM / MeG","text":"PartitionName DefaultTime MaxTime TotalNodes PriorityJobFactor PriorityTier QoS AllowAccounts meg-short 0-01:00:00 0-01:00:00 unlimited 1000 2 normal meg meg-long 1-00:00:00 5-00:00:00 unlimited 1 2 normal meg meg-prod 1-00:00:00 5-00:00:00 unlimited 1000 4 normal meg"},{"location":"merlin7/03-Slurm-General-Documentation/slurm-configuration/#gpu-cluster-gmerlin7","title":"GPU cluster: gmerlin7","text":"As mentioned in previous sections, by default, jobs will be submitted to merlin7, as it is the primary cluster configured on the login nodes. For submittng jobs to the GPU cluster, the cluster name gmerlin7 must be specified, as follows:
#SBATCH --cluster=gmerlin7\n"},{"location":"merlin7/03-Slurm-General-Documentation/slurm-configuration/#gpu-general-configuration","title":"GPU general configuration","text":"The Merlin7 GPU cluster is configured with the CR_CORE_MEMORY, CR_ONE_TASK_PER_CORE, and ENFORCE_BINDING_GRES options.
By default, Slurm will allocate one task per core, which means:
This behavior ensures consistent resource allocation but may result in underutilization of hyper-threading in some cases.
"},{"location":"merlin7/03-Slurm-General-Documentation/slurm-configuration/#gpu-nodes-definition","title":"GPU nodes definition","text":"The table below provides an overview of the Slurm configuration for the different node types in the Merlin7 cluster. This information is essential for understanding how resources are allocated, enabling users to tailor their submission scripts accordingly.
Nodes Sockets CoresPerSocket Cores ThreadsPerCore CPUs MaxMemPerNode DefMemPerCPU Gres Features gpu[001-007] 4 72 288 1 288 828G 2944M gpu:gh200:4 AMD_EPYC_7713, NV_A100 gpu[101-105] 1 64 64 2 128 480G 3840M gpu:nvidia_a100-sxm4-80gb:4 GH200, NV_H100Notes on memory configuration: * Memory allocation options: To request additional memory, use the following options in your submission script: * --mem=<mem_in_MB>: Allocates memory per node. * --mem-per-cpu=<mem_in_MB>: Allocates memory per CPU (equivalent to a core thread).
The total memory requested cannot exceed the MaxMemPerNode value.
--hint=nomultithread option disables one thread per core, effectively halving the number of available CPUs. Consequently, memory allocation will also be halved unless explicitly adjusted.For MPI-based jobs, where performance generally improves with single-threaded CPUs, this option is recommended. In such cases, you should double the --mem-per-cpu value to account for the reduced number of threads.
Tip
Always verify the Slurm /var/spool/slurmd/conf-cache/slurm.conf configuration file for potential changes.
In the gmerlin7 CPU cluster, we enforce certain limits on jobs and users to ensure fair resource usage and prevent overuse by a single user or job. These limits aim to balance resource availability while maintaining overall cluster efficiency. However, applying limits can occasionally impact the cluster\u2019s utilization. For example, user-specific limits may result in pending jobs even when many nodes are idle due to low activity.
On the other hand, these limits also enhance cluster efficiency by preventing scenarios such as a single job monopolizing all available resources, which could block other jobs from running. Without job size limits, for instance, a large job might drain the entire cluster to satisfy its resource request, a situation that is generally undesirable.
Thus, setting appropriate limits is essential to maintain fair resource usage while optimizing cluster efficiency. These limits should allow for a mix of jobs of varying sizes and types, including single-core and parallel jobs, to coexist effectively.
To implement these limits, we utilize Quality of Service (QoS). Different QoS policies are defined and applied to specific partitions in line with the established resource allocation policies. The table below outlines the
various QoS definitions applicable to the merlin7 CPU-based cluster. Here:
MaxTRES specifies resource limits per job.MaxTRESPU specifies resource limits per user.Where: * normal QoS: This QoS has no limits and is typically applied to partitions that do not require user or job restrictions. * gpu_general QoS: This is the default QoS for gmerlin7 users. It limits the total resources available to each user. Additionally, this QoS is applied to the [a100|gh]-general partitions, enforcing restrictions at the partition level and overriding user-level QoS. * gpu_daily QoS: Guarantees increased resources for the [a100|gh]-daily partitions, accommodating shorter-duration jobs with higher resource needs. * gpu_hourly QoS: Offers the least constraints, allowing more resources to be used for the [a100|gh]-hourly partitions, which caters to very short-duration jobs. * gpu_a100_interactive & gpu_gh_interactive QoS: Guarantee interactive access to GPU nodes for software compilation and small testing.
For additional details, refer to the GPU partitions section.
Tip
Always verify QoS definitions for potential changes using the sacctmgr show qos format=\"Name%22,MaxTRESPU%35,MaxTRES%35\" command.
This section provides a summary of the partitions available in the gmerlin7 GPU cluster.
Key concepts: * PriorityJobFactor: This value is added to a job\u2019s priority (visible in the PARTITION column of the sprio -l command). Jobs submitted to partitions with higher PriorityJobFactor values generally run sooner. However, other factors like job age and especially fair share can also influence scheduling. * PriorityTier: Jobs submitted to partitions with higher PriorityTier values take precedence over pending jobs in partitions with lower PriorityTier values. Additionally, jobs from higher PriorityTier partitions can preempt running jobs in lower-tier partitions, where applicable. * QoS: Specifies the quality of service associated with a partition. It is used to control and restrict resource availability for specific partitions, ensuring that resource allocation aligns with intended usage policies. Detailed explanations of the various QoS settings can be found in the User and job limits with QoS section.
Tip
Always verify partition configurations for potential changes using the scontrol show partition command.
All Merlin users are part of the merlin account, which is used as the default account when submitting jobs. Similarly, if no partition is specified, jobs are automatically submitted to the general partition by default.
Tip
For jobs running less than one day, submit them to the a100-daily partition. For jobs running less than one hour, use the a100-hourly partition. These partitions provide higher priority and ensure quicker scheduling compared to a100-general, which has limited node availability.
"},{"location":"merlin7/03-Slurm-General-Documentation/slurm-configuration/#gh-based-partitions","title":"GH-based partitions","text":"PartitionName DefaultTime MaxTime TotalNodes PriorityJobFactor PriorityTier QoS AllowAccounts gh-general 1-00:00:00 7-00:00:00 5 1 1 gpu_general merlin gh-daily 0-01:00:00 1-00:00:00 6 500 1 gpu_daily merlin gh-hourly 0-00:30:00 0-01:00:00 7 1000 1 gpu_hourly merlin gh-interactive 0-01:00:00 0-12:00:00 7 1 2 gpu_gh_interactive merlinAll Merlin users are part of the merlin account, which is used as the default account when submitting jobs. Similarly, if no partition is specified, jobs are automatically submitted to the general partition by default.
Tip
For jobs running less than one day, submit them to the gh-daily partition. For jobs running less than one hour, use the gh-hourly partition. These partitions provide higher priority and ensure quicker scheduling compared to gh-general, which has limited node availability.
"},{"location":"merlin7/03-Slurm-General-Documentation/slurm-examples/","title":"Slurm Examples","text":""},{"location":"merlin7/03-Slurm-General-Documentation/slurm-examples/#slurm-examples","title":"Slurm Examples","text":""},{"location":"merlin7/03-Slurm-General-Documentation/slurm-examples/#single-core-based-job-examples","title":"Single core based job examples","text":"Bash#!/bin/bash\n#SBATCH --partition=hourly # Using 'hourly' will grant higher priority\n#SBATCH --ntasks-per-core=2 # Request the max ntasks be invoked on each core\n#SBATCH --hint=multithread # Use extra threads with in-core multi-threading\n#SBATCH --time=00:30:00 # Define max time job will run\n#SBATCH --output=myscript.out # Define your output file\n#SBATCH --error=myscript.err # Define your error file\n\nmodule purge\nmodule load $MODULE_NAME # where $MODULE_NAME is a software in PModules\nsrun $MYEXEC # where $MYEXEC is a path to your binary file\n"},{"location":"merlin7/03-Slurm-General-Documentation/slurm-examples/#multi-core-based-jobs-example","title":"Multi-core based jobs example","text":""},{"location":"merlin7/03-Slurm-General-Documentation/slurm-examples/#pure-mpi","title":"Pure MPI","text":"Bash#!/bin/bash\n#SBATCH --job-name=purempi\n#SBATCH --partition=daily # Using 'daily' will grant higher priority\n#SBATCH --time=24:00:00 # Define max time job will run\n#SBATCH --output=%x-%j.out # Define your output file\n#SBATCH --error=%x-%j.err # Define your error file\n#SBATCH --exclusive\n#SBATCH --nodes=1\n#SBATCH --ntasks=128\n#SBATCH --hint=nomultithread\n##SBATCH --cpus-per-task=1\n\nmodule purge\nmodule load $MODULE_NAME # where $MODULE_NAME is a software in PModules\nsrun $MYEXEC # where $MYEXEC is a path to your binary file\n"},{"location":"merlin7/03-Slurm-General-Documentation/slurm-examples/#hybrid","title":"Hybrid","text":"Bash#!/bin/bash\n#SBATCH --job-name=hybrid\n#SBATCH --partition=daily # Using 'daily' will grant higher priority\n#SBATCH --time=24:00:00 # Define max time job will run\n#SBATCH --output=%x-%j.out # Define your output file\n#SBATCH --error=%x-%j.err # Define your error file\n#SBATCH --exclusive\n#SBATCH --nodes=1\n#SBATCH --ntasks=128\n#SBATCH --hint=multithread\n#SBATCH --cpus-per-task=2\n\nmodule purge\nmodule load $MODULE_NAME # where $MODULE_NAME is a software in PModules\nsrun $MYEXEC # where $MYEXEC is a path to your binary file\n"},{"location":"merlin7/04-Jupyterhub/jupyterhub/","title":"Jupyterhub on Merlin7","text":""},{"location":"merlin7/04-Jupyterhub/jupyterhub/#jupyterhub-on-merlin7","title":"Jupyterhub on Merlin7","text":"Jupyterhub provides jupyter notebooks that are launched on cluster nodes of merlin and can be accessed through a web portal.
"},{"location":"merlin7/04-Jupyterhub/jupyterhub/#accessing-jupyterhub-and-launching-a-session","title":"Accessing Jupyterhub and launching a session","text":"The service is available inside of PSI (or through a VPN connection) at
https://merlin7-jupyter01.psi.ch:8000/hub/
Spawn button, your job will be sent to the Slurm batch system. If the cluster is not currently overloaded and the resources you requested are available, your job will usually start within 30 seconds.Running on the merlin7 cluster and using the interactive partition would in general guarantee fast access to resources. Keep in mind, that this partition has a limit of 12 hours.
The Spawner Options page covers the most common options. These are used to create a submission script for the jupyterhub job and submit it to the slurm queue. Additional customization can be implemented using the 'Optional user defined line to be added to the batch launcher script' option. This line is added to the submission script at the end of other #SBATCH lines. Parameters can be passed to SLURM by starting the line with #SBATCH, like in Running Slurm Scripts. Some ideas:
Request additional memory
Text Only#SBATCH --mem=100G\n Request multiple GPUs (gpu partition only)
Text Only#SBATCH --gpus=2\n Log additional information
Text Onlyhostname; date; echo $USER\n Output is found in ~/jupyterhub_batchspawner_<jobid>.log.
In case of problems or requests, please either submit a PSI Service Now incident containing \"Merlin Jupyterhub\" as part of the subject, or contact us by mail through merlin-admins@lists.psi.ch.
"},{"location":"merlin7/05-Software-Support/ansys-rsm/","title":"ANSYS RSM (Remote Resolve Manager)","text":""},{"location":"merlin7/05-Software-Support/ansys-rsm/#ansys-rsm-remote-resolve-manager","title":"ANSYS RSM (Remote Resolve Manager)","text":""},{"location":"merlin7/05-Software-Support/ansys-rsm/#ansys-remote-resolve-manager","title":"ANSYS Remote Resolve Manager","text":"ANSYS Remote Solve Manager (RSM) is used by ANSYS Workbench to submit computational jobs to HPC clusters directly from Workbench on your desktop.
Warning
Merlin7 is running behind a firewall, however, there are firewall policies in place to access the Merlin7 ANSYS RSM service from the main PSI networks. If you can not connect to it, please contact us, and please provide the IP address for the corresponding workstation: we will check the PSI firewall rules in place and request for an update if necessary.
"},{"location":"merlin7/05-Software-Support/ansys-rsm/#the-merlin7-rsm-service","title":"The Merlin7 RSM service","text":"A RSM service is running on a dedicated Virtual Machine server. This service will listen a specific port and will process any request using RSM (in example, from ANSYS users workstations). The following nodes are configured with such services: * service03.merlin7.psi.ch
The earliest version supported in the Merlin7 cluster is ANSYS/2022R2. Older versions are not supported due to existing bugs or missing functionalities. In case you strongly need to run an older version, please do not hesitate to contact the Merlin admins.
"},{"location":"merlin7/05-Software-Support/ansys-rsm/#configuring-rsm-client-on-windows-workstations","title":"Configuring RSM client on Windows workstations","text":"Users can setup ANSYS RSM in their workstations to connect to the Merlin7 cluster. The different steps and settings required to make it work are that following:
\"Name\": Add here the preffered name for the cluster. For example: Merlin7 cluster
\"HPC Type\": Select SLURM
service03.merlin7.psi.ch--hint=nomultithread must be present.--exclusive must also be present for now, due to a bug in the Slingshot interconnect which does not allow running shared nodes./data/scratch/shared as the \"Staging directory path on Cluster\"/scratch as the HPC scratch directory.PSICH\\ prefix must not be added. hourly, daily and general only.Tip
In the future, we might provide this service also from the login nodes for better transfer performance.
"},{"location":"merlin7/05-Software-Support/ansys-rsm/#using-rsm-in-ansys","title":"Using RSM in ANSYS","text":"Using the RSM service in ANSYS is slightly different depending on the ANSYS software being used. Please follow the official ANSYS documentation for details about how to use it for that specific software.
Alternativaly, please refer to some the examples showed in the following chapters (ANSYS specific software).
"},{"location":"merlin7/05-Software-Support/ansys-rsm/#using-rsm-in-ansys-fluent","title":"Using RSM in ANSYS Fluent","text":"For further information for using RSM with Fluent, please visit the ANSYS RSM section.
"},{"location":"merlin7/05-Software-Support/ansys-rsm/#using-rsm-in-ansys-cfx","title":"Using RSM in ANSYS CFX","text":"For further information for using RSM with CFX, please visit the ANSYS RSM section.
"},{"location":"merlin7/05-Software-Support/ansys-rsm/#using-rsm-in-ansys-mapdl","title":"Using RSM in ANSYS MAPDL","text":"For further information for using RSM with MAPDL, please visit the ANSYS RSM section.
"},{"location":"merlin7/05-Software-Support/ansys/","title":"ANSYS","text":""},{"location":"merlin7/05-Software-Support/ansys/#ansys","title":"ANSYS","text":"This document describes generic information of how to load and run ANSYS software in the Merlin cluster
"},{"location":"merlin7/05-Software-Support/ansys/#ansys-software-in-pmodules","title":"ANSYS software in Pmodules","text":"The ANSYS software can be loaded through PModules.
The default ANSYS versions are loaded from the central PModules repository.
However, we provide local installations on Merlin7 which are needed mainly for some ANSYS packages, like Ansys RSM. Due to this, and also to improve the interactive experience of the user, ANSYS has been also installed in the Merlin high performance storage and we have made it available from Pmodules.
"},{"location":"merlin7/05-Software-Support/ansys/#loading-merlin7-ansys","title":"Loading Merlin7 ANSYS","text":"Bashmodule purge\nmodule use unstable # Optional\nmodule search ANSYS\n\n# Load the proper ANSYS version, in example for 2025R2\nmodule load ANSYS/2025R2\n [Example] Loading ANSYS from the Merlin7 PModules repository \ud83d\udd25 [caubet_m@login001:~]# module purge\n\ud83d\udd25 [caubet_m@login001:~]# module use unstable\n\ud83d\udd25 [caubet_m@login001:~]# module use deprecated\n\n\ud83d\udd25 [caubet_m@login001:~]# module search ANSYS\n(Re-)building the Pmodules cache. Please be patient ...\nDone ...\n\nModule Rel.stage Group Overlay Requires\n--------------------------------------------------------------------------------\nANSYS/2022R2 deprecated Tools merlin\nANSYS/2023R2 deprecated Tools merlin\nANSYS/2024R2 stable Tools merlin\nANSYS/2025R2 stable Tools merlin\n
Tip
Older ANSYS releases, 2022R2 and 2023R2 are deprecated. Please always run ANSYS/2024R2 or superior.
ANSYS Remote Solve Manager (RSM) is used by ANSYS Workbench to submit computational jobs to HPC clusters directly from Workbench on your desktop. Therefore, PSI workstations with direct access to Merlin can submit jobs by using RSM.
For further information, please visit the ANSYS RSM section.
"},{"location":"merlin7/05-Software-Support/ansys/#ansys-fluent","title":"ANSYS Fluent","text":"ANSYS Fluent is not currently documented for Merlin7. Please refer to the Merlin6 documentation for information about ANSYS Fluent on Merlin6.
"},{"location":"merlin7/05-Software-Support/ansys/#ansys-cfx","title":"ANSYS CFX","text":"ANSYS CFX is not currently documented for Merlin7. Please refer to the Merlin6 documentation for information about ANSYS CFX on Merlin6.
"},{"location":"merlin7/05-Software-Support/ansys/#ansys-mapdl","title":"ANSYS MAPDL","text":"ANSYS MAPDL is not currently documented for Merlin7. Please refer to the Merlin6 documentation for information about ANSYS MAPDL on Merlin6.
"},{"location":"merlin7/05-Software-Support/cp2k/","title":"CP2k","text":""},{"location":"merlin7/05-Software-Support/cp2k/#cp2k","title":"CP2k","text":""},{"location":"merlin7/05-Software-Support/cp2k/#cp2k_1","title":"CP2k","text":"CP2K is a quantum chemistry and solid state physics software package that can perform atomistic simulations of solid state, liquid, molecular, periodic, material, crystal, and biological systems.
CP2K provides a general framework for different modeling methods such as DFT using the mixed Gaussian and plane waves approaches GPW and GAPW. Supported theory levels include DFTB, LDA, GGA, MP2, RPA, semi-empirical methods (AM1, PM3, PM6, RM1, MNDO, \u2026), and classical force fields (AMBER, CHARMM, \u2026). CP2K can do simulations of molecular dynamics, metadynamics, Monte Carlo, Ehrenfest dynamics, vibrational analysis, core level spectroscopy, energy minimization, and transition state optimization using NEB or dimer method
"},{"location":"merlin7/05-Software-Support/cp2k/#licensing-terms-and-conditions","title":"Licensing Terms and Conditions","text":"CP2k is a joint effort, with contributions from developers around the world: users agree to acknowledge use of CP2k in any reports or publications of results obtained with the Software (see CP2k Homepage for details).
"},{"location":"merlin7/05-Software-Support/cp2k/#how-to-run-on-merlin7","title":"How to run on Merlin7","text":""},{"location":"merlin7/05-Software-Support/cp2k/#cpu-nodes","title":"CPU nodes","text":"Bashmodule use unstable Spack\nmodule load gcc/12.3 openmpi/5.0.8-hgej cp2k/2025.2-yb6g-omp\n"},{"location":"merlin7/05-Software-Support/cp2k/#a100-nodes","title":"A100 nodes","text":"Bashmodule use unstable Spack\nmodule load gcc/12.3 openmpi/5.0.8-r5lz-A100-gpu cp2k/2025.2-hkub-A100-gpu-omp\n"},{"location":"merlin7/05-Software-Support/cp2k/#gh-nodes","title":"GH nodes","text":"Bashmodule use unstable Spack\nmodule load gcc/12.3 openmpi/5.0.8-tx2w-GH200-gpu cp2k/2025.2-xk4q-GH200-gpu-omp\n"},{"location":"merlin7/05-Software-Support/cp2k/#sbatch-cpu-4-mpi-ranks-16-omp-threads","title":"SBATCH CPU, 4 MPI ranks, 16 OMP threads","text":"Bash#!/bin/bash\n#SBATCH --time=00:10:00 # maximum execution time of 10 minutes\n#SBATCH --nodes=1 # requesting 1 compute node\n#SBATCH --ntasks=4 # use 4 MPI rank (task)\n#SBATCH --partition=hourly\n#SBATCH --cpus-per-task=16 # modify this number of CPU cores per MPI task\n#SBATCH --output=_scheduler-stdout.txt\n#SBATCH --error=_scheduler-stderr.txt\n\nunset PMODULES_ENV\nmodule purge\nmodule use unstable Spack\nmodule load gcc/12.3 openmpi/5.0.8-hgej cp2k/2025.2-yb6g-omp\n\nexport FI_CXI_RX_MATCH_MODE=software\nexport OMP_NUM_THREADS=$((SLURM_CPUS_PER_TASK - 1))\n\nsrun cp2k.psmp -i <CP2K_INPUT> -o <CP2K_OUTPUT>\n"},{"location":"merlin7/05-Software-Support/cp2k/#sbatch-a100-4-gpu-16-omp-threads-4-mpi-ranks","title":"SBATCH A100, 4 GPU, 16 OMP threads, 4 MPI ranks","text":"Bash#!/bin/bash\n#SBATCH --time=00:10:00 # maximum execution time of 10 minutes\n#SBATCH --output=_scheduler-stdout.txt\n#SBATCH --error=_scheduler-stderr.txt\n#SBATCH --nodes=1 # number of A100 nodes\n#SBATCH --ntasks-per-node=4 # 4 MPI ranks per node\n#SBATCH --cpus-per-task=16 # 16 OMP threads per MPI rank\n#SBATCH --cluster=gmerlin7\n#SBATCH --hint=nomultithread\n#SBATCH --partition=a100-hourly\n#SBATCH --gpus=4\n\nunset PMODULES_ENV\nmodule purge\nmodule use unstable Spack\nmodule load gcc/12.3 openmpi/5.0.8-r5lz-A100-gpu cp2k/2025.2-hkub-A100-gpu-omp\n\nexport FI_CXI_RX_MATCH_MODE=software\nexport OMP_NUM_THREADS=$((SLURM_CPUS_PER_TASK - 1))\n\nsrun cp2k.psmp -i <CP2K_INPUT> -o <CP2K_OUTPUT>\n"},{"location":"merlin7/05-Software-Support/cp2k/#sbatch-gh-2-gpu-18-omp-threads-2-mpi-ranks","title":"SBATCH GH, 2 GPU, 18 OMP threads, 2 MPI ranks","text":"Bash#!/bin/bash\n#SBATCH --time=00:10:00 # maximum execution time of 10 minutes\n#SBATCH --output=_scheduler-stdout.txt\n#SBATCH --error=_scheduler-stderr.txt\n#SBATCH --nodes=1 # number of GH200 nodes with each node having 4 CPU+GPU\n#SBATCH --ntasks-per-node=2 # 2 MPI ranks per node\n#SBATCH --cpus-per-task=18 # 18 OMP threads per MPI rank\n#SBATCH --cluster=gmerlin7\n#SBATCH --hint=nomultithread\n#SBATCH --partition=gh-hourly\n#SBATCH --gpus=2\n\nunset PMODULES_ENV\nmodule purge\nmodule use unstable Spack\nmodule load gcc/12.3 openmpi/5.0.8-tx2w-GH200-gpu cp2k/2025.2-xk4q-GH200-gpu-omp\n\nexport FI_CXI_RX_MATCH_MODE=software\nexport OMP_NUM_THREADS=$((SLURM_CPUS_PER_TASK - 1))\n\nsrun cp2k.psmp -i <CP2K_INPUT> -o <CP2K_OUTPUT>\n"},{"location":"merlin7/05-Software-Support/cp2k/#developing-your-own-cpu-code","title":"Developing your own CPU code","text":"Bashmodule purge\nmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.8-hgej dbcsr/2.8.0-4yld-omp openblas/0.3.30-gye6-omp netlib-scalapack/2.2.2-2trj libxsmm/1.17-hwwi libxc/7.0.0-mibp libint/2.11.1-nxhl hdf5/1.14.6-tgzo fftw/3.3.10-t7bo-omp py-fypp/3.1-bteo sirius/7.8.0-uh3i-omp cmake/3.31.8-j47l ninja/1.12.1-afxy\n\ngit clone https://github.com/cp2k/cp2k.git\ncd cp2k\n\nmkdir build && cd build\nCC=mpicc CXX=mpic++ FC=mpifort cmake -GNinja -DCMAKE_CUDA_HOST_COMPILER=mpicc -DCP2K_USE_LIBXC=ON -DCP2K_USE_LIBINT2=ON -DCP2K_USE_SIRIUS=ON -DCP2K_USE_SPLA=ON -DCP2K_USE_SPGLIB=ON -DCP2K_USE_HDF5=ON -DCP2K_USE_FFTW3=ON ..\nninja -j 16\n"},{"location":"merlin7/05-Software-Support/cp2k/#developing-your-own-gpu-code","title":"Developing your own GPU code","text":""},{"location":"merlin7/05-Software-Support/cp2k/#a100","title":"A100","text":"Bashmodule purge\nmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.8-r5lz-A100-gpu dbcsr/2.8.0-3r22-A100-gpu-omp cosma/2.7.0-y2tr-gpu cuda/12.6.0-3y6a dftd4/3.7.0-4k4c-omp elpa/2025.01.002-bovg-A100-gpu-omp fftw/3.3.10-syba-omp hdf5/1.14.6-pcsd libint/2.11.1-3lxv libxc/7.0.0-u556 libxsmm/1.17-2azz netlib-scalapack/2.2.2-rmcf openblas/0.3.30-ynou-omp plumed/2.9.2-47hk py-fypp/3.1-z25p py-numpy/2.3.2-45ay python/3.13.5-qivs sirius/develop-qz4c-A100-gpu-omp spglib/2.5.0-jl5l-omp spla/1.6.1-hrgf-gpu cmake/3.31.8-j47l ninja/1.12.1-afxy\n\ngit clone <https://github.com/cp2k/cp2k.git>\ncd cp2k\n\nmkdir build && cd build\nCC=mpicc CXX=mpic++ FC=mpifort cmake -GNinja -DCMAKE_CUDA_HOST_COMPILER=mpicc -DCP2K_USE_LIBXC=ON -DCP2K_USE_LIBINT2=ON -DCP2K_USE_SPGLIB=ON -DCP2K_USE_ELPA=ON -DCP2K_USE_SPLA=ON -DCP2K_USE_SIRIUS=ON -DCP2K_USE_PLUMED=ON -DCP2K_USE_DFTD4=ON -DCP2K_USE_COSMA=ON -DCP2K_USE_ACCEL=CUDA -DCMAKE_CUDA_ARCHITECTURES=80 -DCP2K_USE_FFTW3=ON ..\nninja -j 16\n"},{"location":"merlin7/05-Software-Support/cp2k/#gh200","title":"GH200","text":"Bashsalloc --partition=gh-daily --clusters=gmerlin7 --time=08:00:00 --ntasks=4 --nodes=1 --gpus=1 --mem=40000 $SHELL\nssh <allocated_gpu>\nmodule purge\nmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.8-tx2w-GH200-gpu dbcsr/2.8.0-h3bo-GH200-gpu-omp cosma/2.7.0-dc23-gpu cuda/12.6.0-wak5 dbcsr/2.8.0-h3bo-GH200-gpu-omp dftd4/3.7.0-aa6l-omp elpa/2025.01.002-nybd-GH200-gpu-omp fftw/3.3.10-alp3-omp hdf5/1.14.6-qjob libint/2.11.1-dpqq libxc/7.0.0-ojgl netlib-scalapack/2.2.2-cj5m openblas/0.3.30-rv46-omp plumed/2.9.2-nbay py-fypp/3.1-j4yw py-numpy/2.3.2-yoqr python/3.13.5-xbg5 sirius/develop-v5tb-GH200-gpu-omp spglib/2.5.0-da2i-omp spla/1.6.1-uepy-gpu cmake/3.31.8-2jne ninja/1.13.0-xn4a\n\ngit clone https://github.com/cp2k/cp2k.git\ncd cp2k\n\nmkdir build && cd build\nCC=mpicc CXX=mpic++ FC=mpifort cmake -GNinja -DCMAKE_CUDA_HOST_COMPILER=mpicc -DCP2K_USE_LIBXC=ON -DCP2K_USE_LIBINT2=ON -DCP2K_USE_SPGLIB=ON -DCP2K_USE_ELPA=ON -DCP2K_USE_SPLA=ON -DCP2K_USE_SIRIUS=ON -DCP2K_USE_PLUMED=ON -DCP2K_USE_DFTD4=ON -DCP2K_USE_COSMA=ON -DCP2K_USE_ACCEL=CUDA -DCMAKE_CUDA_ARCHITECTURES=90 -DCP2K_USE_FFTW3=ON -DCP2K_USE_HDF5=ON ..\nninja -j 16\n"},{"location":"merlin7/05-Software-Support/cray-module.env/","title":"Cray Programming Environment","text":""},{"location":"merlin7/05-Software-Support/cray-module.env/#cray-programming-environment","title":"Cray Programming Environment","text":""},{"location":"merlin7/05-Software-Support/cray-module.env/#loading-the-cray-module","title":"Loading the Cray module","text":"The Cray Programming Environment, with Cray's compilers and MPI, is not loaded by default.
To load it, one has to run the following command:
Bashmodule load cray\n The Cray Programming Environment will load all the necessary dependencies. In example:
Bash\ud83d\udd25 [caubet_m@login001:~]# module list\nCurrently Loaded Modules:\n 1) craype-x86-rome 2) libfabric/1.15.2.0\n 3) craype-network-ofi\n 4) xpmem/2.9.6-1.1_20240510205610__g087dc11fc19d 5) PrgEnv-cray/8.5.0\n 6) cce/17.0.0 7) cray-libsci/23.12.5\n 8) cray-mpich/8.1.28 9) craype/2.7.30\n10) perftools-base/23.12.0 11) cpe/23.12\n12) cray/23.12\n You will notice an unfamiliar PrgEnv-cray/8.5.0 that was loaded. This is a meta-module that Cray provides to simplify the switch of compilers and their associated dependencies and libraries, as a whole called Programming Environment. In the Cray Programming Environment, there are 4 key modules.
cray-libsci is a collection of numerical routines tuned for performance on Cray systems.libfabric is an important low-level library that allows you to take advantage of the high performance Slingshot network.cray-mpich is a CUDA-aware MPI implementation, optimized for Cray systems.cce is the compiler from Cray. C/C++ compilers are based on Clang/LLVM while Fortran supports Fortran 2018 standard. More info: https://user.cscs.ch/computing/compilation/cray/You can switch between different programming environments. You can check the available module with the module avail command, as follows:
\ud83d\udd25 [caubet_m@login001:~]# module avail PrgEnv\n--------------------- /opt/cray/pe/lmod/modulefiles/core ---------------------\n\nPrgEnv-cray/8.5.0 PrgEnv-gnu/8.5.0\nPrgEnv-nvhpc/8.5.0 PrgEnv-nvidia/8.5.0\n"},{"location":"merlin7/05-Software-Support/cray-module.env/#switching-compiler-suites","title":"Switching compiler suites","text":"Compiler suites can be exchanged with PrgEnv (Programming Environments) provided by HPE-Cray. The wrappers call the correct compiler with appropriate options to build and link applications with relevant libraries, as required by the loaded modules (only dynamic linking is supported) and therefore should replace direct calls to compiler drivers in Makefiles and build scripts.
To swap the the compiler suite from the default Cray to GNU compiler, one can run the following.
Bash\ud83d\udd25 [caubet_m@login001:~]# module swap PrgEnv-cray/8.5.0 PrgEnv-gnu/8.5.0\n\nLmod is automatically replacing \"cce/17.0.0\" with \"gcc-native/12.3\".\n"},{"location":"merlin7/05-Software-Support/gromacs/","title":"GROMACS","text":""},{"location":"merlin7/05-Software-Support/gromacs/#gromacs","title":"GROMACS","text":""},{"location":"merlin7/05-Software-Support/gromacs/#gromacs_1","title":"GROMACS","text":"GROMACS (GROningen Machine for Chemical Simulations) is a versatile and widely-used open source package to perform molecular dynamics, i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles.
It is primarily designed for biochemical molecules like proteins, lipids and nucleic acids that have a lot of complicated bonded interactions, but since GROMACS is extremely fast at calculating the nonbonded interactions (that usually dominate simulations) many groups are also using it for research on non-biological systems, e.g. polymers.)
"},{"location":"merlin7/05-Software-Support/gromacs/#licensing-terms-and-conditions","title":"Licensing Terms and Conditions","text":"GROMACS is a joint effort, with contributions from developers around the world: users agree to acknowledge use of GROMACS in any reports or publications of results obtained with the Software (see GROMACS Homepage for details).
"},{"location":"merlin7/05-Software-Support/gromacs/#how-to-run-on-merlin7","title":"How to run on Merlin7","text":""},{"location":"merlin7/05-Software-Support/gromacs/#20252","title":"2025.2","text":""},{"location":"merlin7/05-Software-Support/gromacs/#cpu-nodes","title":"CPU nodes","text":"Bashmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.7-ax23-A100-gpu gromacs/2025.2-whcq-omp\n"},{"location":"merlin7/05-Software-Support/gromacs/#a100-nodes","title":"A100 nodes","text":"Bashmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.7-3vzj-A100-gpu gromacs/2025.2-vbj4-A100-gpu-omp\n"},{"location":"merlin7/05-Software-Support/gromacs/#gh-nodes","title":"GH nodes","text":"Bashmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.7-blxc-GH200-gpu gromacs/2025.2-cjnq-GH200-gpu-omp\n"},{"location":"merlin7/05-Software-Support/gromacs/#20253","title":"2025.3","text":""},{"location":"merlin7/05-Software-Support/gromacs/#cpu-nodes_1","title":"CPU nodes","text":"Bashmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.9-n4yf-A100-gpu gromacs/2025.3-6ken-omp\n"},{"location":"merlin7/05-Software-Support/gromacs/#a100-nodes_1","title":"A100 nodes","text":"Bashmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.9-xqhy-A100-gpu gromacs/2025.3-ohlj-A100-gpu-omp\n"},{"location":"merlin7/05-Software-Support/gromacs/#gh-nodes_1","title":"GH nodes","text":"Bashmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.9-inxi-GH200-gpu gromacs/2025.3-yqlu-GH200-gpu-omp\n"},{"location":"merlin7/05-Software-Support/gromacs/#sbatch-cpu-4-mpi-ranks-16-omp-threads","title":"SBATCH CPU, 4 MPI ranks, 16 OMP threads","text":"Bash#!/bin/bash\n#SBATCH --time=00:10:00 # maximum execution time of 10 minutes\n#SBATCH --nodes=1 # requesting 1 compute node\n#SBATCH --ntasks=4 # use 4 MPI rank (task)\n#SBATCH --partition=hourly\n#SBATCH --cpus-per-task=16 # modify this number of CPU cores per MPI task\n#SBATCH --output=_scheduler-stdout.txt\n#SBATCH --error=_scheduler-stderr.txt\n\nunset PMODULES_ENV\nmodule purge\nmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.7-ax23-A100-gpu gromacs/2025.2-whcq-omp\n\nexport FI_CXI_RX_MATCH_MODE=software\n\n# Add your input (tpr) file in the command below\nsrun gmx_mpi grompp -f step6.0_minimization.mdp -o step6.0_minimization.tpr -c step5_input.gro -r step5_input.gro -p topol.top -n index.ndx\nsrun gmx_mpi mdrun -s step6.0_minimization.tpr -pin on -ntomp ${SLURM_CPUS_PER_TASK}\n"},{"location":"merlin7/05-Software-Support/gromacs/#sbatch-a100-4-gpu-16-omp-threads-4-mpi-ranks","title":"SBATCH A100, 4 GPU, 16 OMP threads, 4 MPI ranks","text":"Bash#!/bin/bash\n#SBATCH --time=00:10:00 # maximum execution time of 10 minutes\n#SBATCH --output=_scheduler-stdout.txt\n#SBATCH --error=_scheduler-stderr.txt\n#SBATCH --nodes=1 # number of GH200 nodes with each node having 4 CPU+GPU\n#SBATCH --ntasks-per-node=4 # 4 MPI ranks per node\n#SBATCH --cpus-per-task=16 # 16 OMP threads per MPI rank\n#SBATCH --cluster=gmerlin7\n#SBATCH --hint=nomultithread\n#SBATCH --partition=a100-hourly\n#SBATCH --gpus=4\n\nunset PMODULES_ENV\nmodule purge\nmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.7-3vzj-A100-gpu gromacs/2025.2-vbj4-A100-gpu-omp\n\nexport FI_CXI_RX_MATCH_MODE=software\n\nexport GMX_GPU_DD_COMMS=true\nexport GMX_GPU_PME_PP_COMMS=true\nexport GMX_FORCE_UPDATE_DEFAULT_GPU=true\nexport GMX_ENABLE_DIRECT_GPU_COMM=1\nexport GMX_FORCE_GPU_AWARE_MPI=1\n\n# Add your input (tpr) file in the command below\nsrun gmx_mpi grompp -f step6.0_minimization.mdp -o step6.0_minimization.tpr -c step5_input.gro -r step5_input.gro -p topol.top -n index.ndx\nsrun gmx_mpi mdrun -s step6.0_minimization.tpr -ntomp ${SLURM_CPUS_PER_TASK}\n"},{"location":"merlin7/05-Software-Support/gromacs/#sbatch-gh-2-gpu-18-omp-threads-2-mpi-ranks","title":"SBATCH GH, 2 GPU, 18 OMP threads, 2 MPI ranks","text":"Bash#!/bin/bash\n#SBATCH --time=00:10:00 # maximum execution time of 10 minutes\n#SBATCH --output=_scheduler-stdout.txt\n#SBATCH --error=_scheduler-stderr.txt\n#SBATCH --nodes=1 # number of GH200 nodes with each node having 4 CPU+GPU\n#SBATCH --ntasks-per-node=2 # 2 MPI ranks per node\n#SBATCH --cpus-per-task=18 # 18 OMP threads per MPI rank\n#SBATCH --cluster=gmerlin7\n#SBATCH --hint=nomultithread\n#SBATCH --partition=gh-hourly\n#SBATCH --gpus=2\n\nunset PMODULES_ENV\nmodule purge\nmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.7-blxc-GH200-gpu gromacs/2025.2-cjnq-GH200-gpu-omp\n\nexport FI_CXI_RX_MATCH_MODE=software\n\nexport GMX_GPU_DD_COMMS=true\nexport GMX_GPU_PME_PP_COMMS=true\nexport GMX_FORCE_UPDATE_DEFAULT_GPU=true\nexport GMX_ENABLE_DIRECT_GPU_COMM=1\nexport GMX_FORCE_GPU_AWARE_MPI=1\n\n# Add your input (tpr) file in the command below\nsrun gmx_mpi grompp -f step6.0_minimization.mdp -o step6.0_minimization.tpr -c step5_input.gro -r step5_input.gro -p topol.top -n index.ndx\nsrun gmx_mpi mdrun -s step6.0_minimization.tpr -ntomp ${SLURM_CPUS_PER_TASK}\n"},{"location":"merlin7/05-Software-Support/gromacs/#developing-your-own-gpu-code","title":"Developing your own GPU code","text":""},{"location":"merlin7/05-Software-Support/gromacs/#a100","title":"A100","text":"Bashmodule purge\nmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.7-3vzj-A100-gpu gromacs/2025.2-vbj4-A100-gpu-omp cmake/3.31.6-o3lb python/3.13.1-cyro\n\ngit clone https://github.com/gromacs/gromacs.git\ncd gromacs\n\nmkdir build && cd build\ncmake -DCMAKE_C_COMPILER=gcc-12 \\\n -DCMAKE_CXX_COMPILER=g++-12 \\\n -DGMX_MPI=on \\\n -DGMX_GPU=CUDA \\\n -GMX_CUDA_TARGET_SM=\"80\" \\ # 90 for the Hopper GPUs\n -DGMX_DOUBLE=off \\ # turn on double precision only if useful\n ..\n\nmake\n"},{"location":"merlin7/05-Software-Support/ippl/","title":"IPPL","text":""},{"location":"merlin7/05-Software-Support/ippl/#ippl","title":"IPPL","text":""},{"location":"merlin7/05-Software-Support/ippl/#ippl_1","title":"IPPL","text":"Independent Parallel Particle Layer (IPPL) is a performance portable C++ library for Particle-Mesh methods. IPPL makes use of Kokkos (https://github.com/kokkos/kokkos), HeFFTe (https://github.com/icl-utk-edu/heffte), and MPI (Message Passing Interface) to deliver a portable, massively parallel toolkit for particle-mesh methods. IPPL supports simulations in one to six dimensions, mixed precision, and asynchronous execution in different execution spaces (e.g. CPUs and GPUs).
"},{"location":"merlin7/05-Software-Support/ippl/#licensing-terms-and-conditions","title":"Licensing Terms and Conditions","text":"GNU GPLv3
"},{"location":"merlin7/05-Software-Support/ippl/#how-to-run-on-merlin7","title":"How to run on Merlin7","text":""},{"location":"merlin7/05-Software-Support/ippl/#a100-nodes","title":"A100 nodes","text":"Bashmodule use Spack unstable\nmodule load gcc/13.2.0 openmpi/5.0.7-dnpr-A100-gpu boost/1.82.0-lgrt fftw/3.3.10.6-zv2b-omp googletest/1.14.0-msmu h5hut/2.0.0rc7-zy7s openblas/0.3.29-zkwb cmake/3.31.6-ufy7\n\ncd <path to IPPL source directory>\nmkdir build_gpu\ncd build_gpu\n\ncmake -DCMAKE_BUILD_TYPE=Release -DKokkos_ARCH_AMPERE80=ON -DCMAKE_CXX_STANDARD=20 -DIPPL_ENABLE_FFT=ON -DIPPL_ENABLE_TESTS=ON -DUSE_ALTERNATIVE_VARIANT=ON -DIPPL_ENABLE_SOLVERS=ON -DIPPL_ENABLE_ALPINE=True -DIPPL_PLATFORMS=cuda ..\nmake [-jN]\n"},{"location":"merlin7/05-Software-Support/ippl/#gh-nodes","title":"GH nodes","text":"Bashsalloc --partition=gh-daily --clusters=gmerlin7 --time=08:00:00 --ntasks=4 --nodes=1 --gpus=1 --mem=40000 $SHELL\nssh <allocated_gpu>\n\nmodule use Spack unstable\nmodule load gcc/13.2.0 openmpi/5.0.3-3lmi-GH200-gpu\nmodule load boost/1.82.0-3ns6 fftw/3.3.10 gnutls/3.8.3 googletest/1.14.0 gsl/2.7.1 h5hut/2.0.0rc7 openblas/0.3.26 cmake/3.31.4-u2nm\n\ncd <path to IPPL source directory>\nmkdir build_gh\ncd build_gh\n\ncmake -DCMAKE_BUILD_TYPE=Release -DKokkos_ARCH_HOPPER90=ON -DCMAKE_CXX_STANDARD=20 -DIPPL_ENABLE_FFT=ON -DIPPL_ENABLE_TESTS=ON -DUSE_ALTERNATIVE_VARIANT=ON -DIPPL_ENABLE_SOLVERS=ON -DIPPL_ENABLE_ALPINE=True -DIPPL_PLATFORMS=cuda ..\nmake [-jN]\n"},{"location":"merlin7/05-Software-Support/lammps/","title":"LAMMPS","text":""},{"location":"merlin7/05-Software-Support/lammps/#lammps","title":"LAMMPS","text":""},{"location":"merlin7/05-Software-Support/lammps/#lammps_1","title":"LAMMPS","text":"LAMMPS is a classical molecular dynamics code that models an ensemble of particles in a liquid, solid, or gaseous state. It can model atomic, polymeric, biological, metallic, granular, and coarse-grained systems using a variety of force fields and boundary conditions. The current version of LAMMPS is written in C++.
"},{"location":"merlin7/05-Software-Support/lammps/#licensing-terms-and-conditions","title":"Licensing Terms and Conditions","text":"LAMMPS is an open-source code, available free-of-charge, and distributed under the terms of the GNU Public License Version 2 (GPLv2), which means you can use or modify the code however you wish for your own purposes, but have to adhere to certain rules when redistributing it - specifically in binary form - or are distributing software derived from it or that includes parts of it.
LAMMPS comes with no warranty of any kind.
As each source file states in its header, it is a copyrighted code, and thus not in the public domain. For more information about open-source software and open-source distribution, see www.gnu.org or www.opensource.org. The legal text of the GPL as it applies to LAMMPS is in the LICENSE file included in the LAMMPS distribution.
Here is a more specific summary of what the GPL means for LAMMPS users:
(1) Anyone is free to use, copy, modify, or extend LAMMPS in any way they choose, including for commercial purposes.
(2) If you distribute a modified version of LAMMPS, it must remain open-source, meaning you are required to distribute all of it under the terms of the GPLv2. You should clearly annotate such a modified code as a derivative version of LAMMPS. This is best done by changing the name (example: LIGGGHTS is such a modified and extended version of LAMMPS).
(3) If you release any code that includes or uses LAMMPS source code, then it must also be open-sourced, meaning you distribute it under the terms of the GPLv2. You may write code that interfaces LAMMPS to a differently licensed library. In that case the code that provides the interface must be licensed GPLv2, but not necessarily that library unless you are distributing binaries that require the library to run.
(4) If you give LAMMPS files to someone else, the GPLv2 LICENSE file and source file headers (including the copyright and GPLv2 notices) should remain part of the code.
"},{"location":"merlin7/05-Software-Support/lammps/#how-to-run-on-merlin7","title":"How to run on Merlin7","text":""},{"location":"merlin7/05-Software-Support/lammps/#cpu-nodes","title":"CPU nodes","text":"Bashmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.8-jsrx-A100-gpu lammps/20250722-37gs-omp\n"},{"location":"merlin7/05-Software-Support/lammps/#a100-nodes","title":"A100 nodes","text":"Bashmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.8-jsrx-A100-gpu lammps/20250722-xcaf-A100-gpu-omp\n"},{"location":"merlin7/05-Software-Support/lammps/#gh-nodes","title":"GH nodes","text":"Bashmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.8-fvlo-GH200-gpu lammps/20250722-3tfv-GH200-gpu-omp\n"},{"location":"merlin7/05-Software-Support/lammps/#sbatch-cpu-4-mpi-ranks-16-omp-threads","title":"SBATCH CPU, 4 MPI ranks, 16 OMP threads","text":"Bash#!/bin/bash\n#SBATCH --time=00:10:00 # maximum execution time of 10 minutes\n#SBATCH --nodes=1 # requesting 1 compute node\n#SBATCH --ntasks=4 # use 4 MPI rank (task)\n#SBATCH --partition=hourly\n#SBATCH --cpus-per-task=16 # modify this number of CPU cores per MPI task\n#SBATCH --output=_scheduler-stdout.txt\n#SBATCH --error=_scheduler-stderr.txt\n\nunset PMODULES_ENV\nmodule purge\nmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.8-jsrx-A100-gpu lammps/20250722-37gs-omp\n\nexport FI_CXI_RX_MATCH_MODE=software\nexport OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK\nexport OMP_PROC_BIND=spread\nexport OMP_PLACES=threads\n\nsrun --cpu-bind=cores lmp -k on t $OMP_NUM_THREADS -sf kk -in lj_kokkos.in\n"},{"location":"merlin7/05-Software-Support/lammps/#sbatch-a100-4-gpu-16-omp-threads-4-mpi-ranks","title":"SBATCH A100, 4 GPU, 16 OMP threads, 4 MPI ranks","text":"Bash#!/bin/bash\n#SBATCH --time=00:10:00 # maximum execution time of 10 minutes\n#SBATCH --output=_scheduler-stdout.txt\n#SBATCH --error=_scheduler-stderr.txt\n#SBATCH --nodes=1 # number of GH200 nodes with each node having 4 CPU+GPU\n#SBATCH --ntasks-per-node=4 # 4 MPI ranks per node\n#SBATCH --cluster=gmerlin7\n#SBATCH --hint=nomultithread\n#SBATCH --partition=a100-hourly\n#SBATCH --gpus-per-task=1\n\nunset PMODULES_ENV\nmodule purge\nmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.8-jsrx-A100-gpu lammps/20250722-xcaf-A100-gpu-omp\n\nexport FI_CXI_RX_MATCH_MODE=software\n\nsrun lmp -in lj_kokkos.in -k on g ${SLURM_GPUS_PER_TASK} -sf kk -pk kokkos gpu/aware on\n"},{"location":"merlin7/05-Software-Support/lammps/#sbatch-gh-2-gpu-18-omp-threads-2-mpi-ranks","title":"SBATCH GH, 2 GPU, 18 OMP threads, 2 MPI ranks","text":"Bash#!/bin/bash\n#SBATCH --time=00:10:00 # maximum execution time of 10 minutes\n#SBATCH --output=_scheduler-stdout.txt\n#SBATCH --error=_scheduler-stderr.txt\n#SBATCH --nodes=1 # number of GH200 nodes with each node having 4 CPU+GPU\n#SBATCH --ntasks-per-node=2 # 2 MPI ranks per node\n#SBATCH --cluster=gmerlin7\n#SBATCH --hint=nomultithread\n#SBATCH --partition=gh-hourly\n#SBATCH --gpus-per-task=1\n\nunset PMODULES_ENV\nmodule purge\nmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.8-fvlo-GH200-gpu lammps/20250722-3tfv-GH200-gpu-omp\n\nexport FI_CXI_RX_MATCH_MODE=software\n\nsrun lmp -in lj_kokkos.in -k on g ${SLURM_GPUS_PER_TASK} -sf kk -pk kokkos gpu/aware on\n"},{"location":"merlin7/05-Software-Support/opal-x/","title":"OPAL-X","text":""},{"location":"merlin7/05-Software-Support/opal-x/#opal-x","title":"OPAL-X","text":""},{"location":"merlin7/05-Software-Support/opal-x/#opal","title":"OPAL","text":"OPAL (Object Oriented Particle Accelerator Library) is an open source C++ framework for general particle accelerator simulations including 3D space charge, short range wake fields and particle matter interaction.
"},{"location":"merlin7/05-Software-Support/opal-x/#licensing-terms-and-conditions","title":"Licensing Terms and Conditions","text":"GNU GPLv3
"},{"location":"merlin7/05-Software-Support/opal-x/#how-to-run-on-merlin7","title":"How to run on Merlin7","text":""},{"location":"merlin7/05-Software-Support/opal-x/#a100-nodes","title":"A100 nodes","text":"Bashmodule purge\nmodule use Spack unstable\nmodule load gcc/13.2.0 openmpi/5.0.7-dnpr-A100-gpu opal-x/master-cbgs-A100-gpu\n"},{"location":"merlin7/05-Software-Support/opal-x/#gh-nodes","title":"GH nodes","text":"Bashmodule purge\nmodule use Spack unstable\nmodule load gcc/13.2.0 openmpi/5.0.7-z3y6-GH200-gpu opal-x/master-v6v2-GH200-gpu\n"},{"location":"merlin7/05-Software-Support/opal-x/#developing-your-own-code","title":"Developing your own code","text":""},{"location":"merlin7/05-Software-Support/opal-x/#a100-nodes_1","title":"A100 nodes","text":"Bashmodule purge\nmodule use Spack unstable\nmodule load gcc/13.2.0 openmpi/5.0.7-dnpr-A100-gpu\nmodule load boost/1.82.0-lgrt fftw/3.3.10.6-zv2b-omp gnutls/3.8.9-mcdr googletest/1.14.0-msmu gsl/2.7.1-hxwy h5hut/2.0.0rc7-zy7s openblas/0.3.29-zkwb cmake/3.31.6-oe7u\ngit clone https://github.com/OPALX-project/OPALX.git opal-x\ncd opal-x\n./gen_OPALrevision\n\nmkdir build_gpu\ncd build_gpu\n\ncmake -DCMAKE_BUILD_TYPE=Release -DKokkos_ARCH_AMPERE80=ON -DCMAKE_CXX_STANDARD=20 -DIPPL_ENABLE_FFT=ON -DIPPL_ENABLE_TESTS=OFF -DIPPL_ENABLE_SOLVERS=ON -DIPPL_ENABLE_ALPINE=True -DIPPL_PLATFORMS=cuda ..\nmake [-jN]\n"},{"location":"merlin7/05-Software-Support/opal-x/#gh-nodes_1","title":"GH nodes","text":"Bashsalloc --partition=gh-daily --clusters=gmerlin7 --time=08:00:00 --ntasks=4 --nodes=1 --gpus=1 --mem=40000 $SHELL\nssh <allocated_gpu>\n\nmodule purge\nmodule use Spack unstable\nmodule load gcc/13.2.0 openmpi/5.0.7-z3y6-GH200-gpu\nmodule load boost/1.82.0-znbt fftw/3.3.10-jctz gnutls/3.8.9-rtrg googletest/1.15.2-odox gsl/2.7.1-j2dk h5hut/2.0.0rc7-k63k openblas/0.3.29-d3m2 cmake/3.31.4-u2nm\n\ngit clone https://github.com/OPALX-project/OPALX.git opal-x\ncd opal-x\n./gen_OPALrevision\nmkdir build_gh\ncd build_gh\n\ncmake -DCMAKE_BUILD_TYPE=Release -DKokkos_ARCH_HOPPER90=ON -DCMAKE_CXX_STANDARD=20 -DIPPL_ENABLE_FFT=ON -DIPPL_ENABLE_TESTS=OFF -DIPPL_ENABLE_SOLVERS=ON -DIPPL_ENABLE_ALPINE=OFF -DIPPL_PLATFORMS=cuda ..\nmake [-jN]\n"},{"location":"merlin7/05-Software-Support/openmpi/","title":"OpenMPI Support","text":""},{"location":"merlin7/05-Software-Support/openmpi/#openmpi-support","title":"OpenMPI Support","text":""},{"location":"merlin7/05-Software-Support/openmpi/#introduction","title":"Introduction","text":"This document outlines the supported OpenMPI versions in the Merlin7 cluster.
"},{"location":"merlin7/05-Software-Support/openmpi/#openmpi-supported-versionso","title":"OpenMPI supported versionso","text":"The Merlin cluster supports OpenMPI versions across three distinct stages: stable, unstable, and deprecated. Below is an overview of each stage:
"},{"location":"merlin7/05-Software-Support/openmpi/#stable","title":"Stable","text":"Versions in the stable stage are fully functional, thoroughly tested, and officially supported by the Merlin administrators. These versions are available via PModules and Spack, ensuring compatibility and reliability for production use.
Versions in the unstable stage are available for testing and early access to new OpenMPI features. While these versions can be used, their compilation and configuration are subject to change before they are promoted to the stable stage. Administrators recommend caution when relying on unstable versions for critical workloads.
Versions in the deprecated stage are no longer supported by the Merlin administrators. Typically, these include versions no longer supported by the official OpenMPI project. While deprecated versions may still be available for use, their functionality cannot be guaranteed, and they will not receive updates or bug fixes.
In OpenMPI versions prior to 5.0.x, using srun for direct task launches was faster than mpirun. Although this is no longer the case, srun remains the recommended method due to its simplicity and ease of use.
Key benefits of srun: * Automatically handles task binding to cores. * In general, requires less configuration compared to mpirun. * Best suited for most users, while mpirun is recommended only for advanced MPI configurations.
Guidelines: * Always adapt your scripts to use srun before seeking support. * For any module-related issues, please contact the Merlin7 administrators.
Example Usage:
Bashsrun ./app\n Tip
Always run OpenMPI applications with srun for a seamless experience.
Merlin7's SLURM installation includes support for multiple PMI types, including pmix. To view the available options, use the following command:
Bash\ud83d\udd25 [caubet_m@login001:~]# srun --mpi=list\nMPI plugin types are...\n none\n pmix\n pmi2\n cray_shasta\nspecific pmix plugin versions available: pmix_v5,pmix_v4,pmix_v3,pmix_v2\n Important Notes: * For OpenMPI, always use pmix by specifying the appropriate version (pmix_$version). When loading an OpenMPI module (via PModules or Spack), the corresponding PMIx version will be automatically loaded. * Users do not need to manually manage PMIx compatibility.
Warning
PMI-2 is not supported in OpenMPI 5.0.0 or later releases. Despite this, pmi2 remains the default SLURM PMI type in Merlin7 as it is the officially supported type and maintains compatibility with other MPI implementations.
"},{"location":"merlin7/05-Software-Support/pmodules/","title":"PSI Modules","text":""},{"location":"merlin7/05-Software-Support/pmodules/#psi-modules","title":"PSI Modules","text":""},{"location":"merlin7/05-Software-Support/pmodules/#psi-environment-modules","title":"PSI Environment Modules","text":"On top of the operating system stack we provide different software using the PSI developed PModule system.
PModules is the official supported way and each package is deployed by a specific expert. Usually, in PModules software which is used by many people will be found.
If you miss any package/versions or a software with a specific missing feature, contact us. We will study if is feasible or not to install it.
"},{"location":"merlin7/05-Software-Support/pmodules/#module-release-stages","title":"Module Release Stages","text":"To ensure proper software lifecycle management, PModules uses three release stages: unstable, stable, and deprecated.
Unstable Release Stage:
Not visible to users by default. Use explicitly:
Bashmodule use unstable\n Software is promoted to stable after validation.
Stable Release Stage:
Deprecated Release Stage:
These versions are hidden by default but can be explicitly accessed:
Bashmodule use deprecated\n Deprecated software can still be loaded directly without additional configuration to ensure user transparency.
Below is listed a summary of common module commands:
module use # show all available PModule Software Groups as well as Release Stages\nmodule avail # to see the list of available software packages provided via pmodules\nmodule use unstable # to get access to a set of packages not fully tested by the community\nmodule load <package>/<version> # to load specific software package with a specific version\nmodule search <string> # to search for a specific software package and its dependencies.\nmodule list # to list which software is loaded in your environment\nmodule purge # unload all loaded packages and cleanup the environment\n Please refer to the external PSI Modules document for detailed information about the module command.
Without any parameter, use lists all available PModule Software Groups and Release Stages.
module use\n When followed by a parameter, use/unuse invokes/uninvokes a PModule Software Group or Release Stage.
module use EM # Invokes the 'EM' software group\nmodule unuse EM # Uninvokes the 'EM' software group\nmodule use unstable # Invokes the 'unstable' Release stable\nmodule unuse unstable # Uninvokes the 'unstable' Release stable\n"},{"location":"merlin7/05-Software-Support/pmodules/#module-avail","title":"module avail","text":"This option lists all available PModule Software Groups and their packages.
Please run module avail --help for further listing options.
This is used to search for software packages. By default, if no Release Stage or Software Group is specified in the options of the module search command, it will search from the already invoked Software Groups and Release Stages. Direct package dependencies will be also showed.
\ud83d\udd25 [caubet_m@login001:~]# module search openmpi\n\nModule Rel.stage Group Overlay Requires\n--------------------------------------------------------------------------------\nopenmpi/4.1.6 stable Compiler Alps gcc/12.3.0\nopenmpi/4.1.6 stable Compiler Alps gcc/13.3.0\nopenmpi/4.1.6 stable Compiler Alps gcc/14.2.0\nopenmpi/4.1.6 stable Compiler Alps intelcc/22.2\nopenmpi/5.0.5 stable Compiler Alps gcc/8.5.0\nopenmpi/5.0.5 stable Compiler Alps gcc/12.3.0\nopenmpi/5.0.5 stable Compiler Alps gcc/14.2.0\nopenmpi/5.0.5 stable Compiler Alps intelcc/22.2\n Please run module search --help for further search options.
This loads/unloads specific software packages. Packages might have direct dependencies that need to be loaded first. Other dependencies will be automatically loaded.
In the example below, the openmpi/5.0.5 package will be loaded, however gcc/14.2.0 must be loaded as well as this is a strict dependency. Direct dependencies must be loaded in advance. Users can load multiple packages one by one or at once. This can be useful for instance when loading a package with direct dependencies.
# Single line\nmodule load gcc/14.2.0 openmpi/5.0.5\n\n# Multiple line\nmodule load gcc/14.2.0\nmodule load openmpi/5.0.5\n"},{"location":"merlin7/05-Software-Support/pmodules/#module-purge","title":"module purge","text":"This command is an alternative to module unload, which can be used to unload all loaded module files.
module purge\n"},{"location":"merlin7/05-Software-Support/pmodules/#requesting-new-pmodules-packages","title":"Requesting New PModules Packages","text":"The PModules system is designed to accommodate the diverse software needs of Merlin7 users. Below are guidelines for requesting new software or versions to be added to PModules.
"},{"location":"merlin7/05-Software-Support/pmodules/#requesting-missing-software","title":"Requesting Missing Software","text":"If a specific software package is not available in PModules and there is interest from multiple users:
If the currently available versions of a package do not meet your requirements:
Quantum ESPRESSO is an integrated suite of Open-Source computer codes for electronic-structure calculations and materials modeling at the nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials:
Text OnlyPWscf (Plane-Wave Self-Consistent Field)\nFPMD (First Principles Molecular Dynamics)\nCP (Car-Parrinello)\n"},{"location":"merlin7/05-Software-Support/quantum-espresso/#licensing-terms-and-conditions","title":"Licensing Terms and Conditions","text":"Quantum ESPRESSO is an open initiative, in collaboration with many groups world-wide, coordinated by the Quantum ESPRESSO Foundation. Scientific work done using Quantum ESPRESSO should contain an explicit acknowledgment and reference to the main papers (see Quantum Espresso Homepage for the details).
"},{"location":"merlin7/05-Software-Support/quantum-espresso/#how-to-run-on-merlin7","title":"How to run on Merlin7","text":""},{"location":"merlin7/05-Software-Support/quantum-espresso/#75","title":"7.5","text":""},{"location":"merlin7/05-Software-Support/quantum-espresso/#cpu-nodes","title":"CPU nodes","text":"Bashmodule purge\nmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.9-xqhy-A100-gpu quantum-espresso/7.5-zfwh-omp\n"},{"location":"merlin7/05-Software-Support/quantum-espresso/#gh-nodes","title":"GH nodes","text":"Bashmodule purge\nmodule use Spack unstable\nmodule load nvhpc/25.7 openmpi/4.1.8-l3jj-GH200-gpu quantum-espresso/7.5-2ysd-gpu-omp\n"},{"location":"merlin7/05-Software-Support/quantum-espresso/#741","title":"7.4.1","text":""},{"location":"merlin7/05-Software-Support/quantum-espresso/#a100-nodes","title":"A100 nodes","text":"Bashmodule purge\nmodule use Spack unstable\nmodule load nvhpc/25.3 openmpi/main-6bnq-A100-gpu quantum-espresso/7.4.1-nxsw-gpu-omp\n"},{"location":"merlin7/05-Software-Support/quantum-espresso/#gh-nodes_1","title":"GH nodes","text":"Bashmodule purge\nmodule use Spack unstable\nmodule load nvhpc/25.3 openmpi/5.0.7-e3bf-GH200-gpu quantum-espresso/7.4.1-gxvj-gpu-omp\n"},{"location":"merlin7/05-Software-Support/quantum-espresso/#sbatch-a100-1-gpu-64-openmp-threads-one-mpi-rank-example","title":"SBATCH A100, 1 GPU, 64 OpenMP threads, one MPI rank example","text":"Bash#!/bin/bash\n#SBATCH --no-requeue\n#SBATCH --job-name=\"si64\"\n#SBATCH --get-user-env\n#SBATCH --output=_scheduler-stdout.txt\n#SBATCH --error=_scheduler-stderr.txt\n#SBATCH --partition=a100-daily\n#SBATCH --nodes=1\n#SBATCH --ntasks-per-node=1\n#SBATCH --time=06:00:00\n#SBATCH --cpus-per-task=64\n#SBATCH --cluster=gmerlin7\n#SBATCH --gpus=1\n#SBATCH --hint=nomultithread\n\nexport OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK\nexport OMP_PROC_BIND=spread\nexport OMP_PLACES=threads\n\n# Load necessary modules\nmodule purge\nmodule use Spack unstable\nmodule load nvhpc/25.3 openmpi/main-6bnq-A100-gpu quantum-espresso/7.4.1-nxsw-gpu-omp\n\n\"srun\" '$(which pw.x)' '-npool' '1' '-in' 'aiida.in' > \"aiida.out\"\n"},{"location":"merlin7/05-Software-Support/quantum-espresso/#developing-your-own-gpu-code","title":"Developing your own GPU code","text":""},{"location":"merlin7/05-Software-Support/quantum-espresso/#spack","title":"Spack","text":"spack config editspack:\n concretizer:\n unify: false\n targets:\n granularity: microarchitectures\nspack add quantum-espresso@develop +cuda +mpi +mpigpu hdf5=parallel %nvhpc arch=linux-sles15-zen3 # GPUspack add quantum-espresso@develop +mpi hdf5=parallel %gcc # CPUspack develop quantum-espresso@develop # clone the code under /afs/psi.ch/sys/spack/user/$USER/spack-environment/quantum-espressospack install [-jN] -v --until=build quantum-espresso@developmodule purge\nmodule use Spack unstable\nmodule load gcc/12.3 openmpi/main-syah fftw/3.3.10.6-qbxu-omp hdf5/1.14.5-t46c openblas/0.3.29-omp cmake/3.31.6-oe7u\n\ncd <path to QE source directory>\nmkdir build\ncd build\n\ncmake -DQE_ENABLE_MPI:BOOL=ON -DQE_ENABLE_OPENMP:BOOL=ON -DCMAKE_C_COMPILER:STRING=mpicc -DCMAKE_Fortran_COMPILER:STRING=mpif90 -DQE_ENABLE_HDF5:BOOL=ON ..\nmake [-jN]\n"},{"location":"merlin7/05-Software-Support/quantum-espresso/#a100","title":"A100","text":"Bashmodule purge\nmodule use Spack unstable\nmodule load nvhpc/25.3 openmpi/main-6bnq-A100-gpu fftw/3.3.10.6-qbxu-omp hdf5/develop-2.0-rjgu netlib-scalapack/2.2.2-3hgw cmake/3.31.6-oe7u\n\ncd <path to QE source directory>\nmkdir build\ncd build\n\ncmake -DQE_ENABLE_MPI:BOOL=ON -DQE_ENABLE_OPENMP:BOOL=ON -DQE_ENABLE_SCALAPACK:BOOL=ON -DQE_ENABLE_CUDA:BOOL=ON -DQE_ENABLE_MPI_GPU_AWARE:BOOL=ON -DQE_ENABLE_OPENACC:BOOL=ON -DCMAKE_C_COMPILER:STRING=mpicc -DCMAKE_Fortran_COMPILER:STRING=mpif90 -DQE_ENABLE_HDF5:BOOL=ON ..\nmake [-jN]\n"},{"location":"merlin7/05-Software-Support/quantum-espresso/#gh200","title":"GH200","text":"Bashsalloc --partition=gh-daily --clusters=gmerlin7 --time=08:00:00 --ntasks=4 --nodes=1 --gpus=1 --mem=40000 $SHELL\nssh <allocated_gpu>\nmodule purge\nmodule use Spack unstable\nmodule load nvhpc/25.3 openmpi/5.0.7-e3bf-GH200-gpu fftw/3.3.10-sfpw-omp hdf5/develop-2.0-ztvo nvpl-blas/0.4.0.1-3zpg nvpl-lapack/0.3.0-ymy5 netlib-scalapack/2.2.2-qrhq cmake/3.31.6-5dl7\n\ncd <path to QE source directory>\nmkdir build\ncd build\n\ncmake -DQE_ENABLE_MPI:BOOL=ON -DQE_ENABLE_OPENMP:BOOL=ON -DQE_ENABLE_SCALAPACK:BOOL=ON -DQE_ENABLE_CUDA:BOOL=ON -DQE_ENABLE_MPI_GPU_AWARE:BOOL=ON -DQE_ENABLE_OPENACC:BOOL=ON -DCMAKE_C_COMPILER:STRING=mpicc -DCMAKE_Fortran_COMPILER:STRING=mpif90 -DQE_ENABLE_HDF5:BOOL=ON ..\nmake [-jN]\n"},{"location":"merlin7/05-Software-Support/quantum-espresso/#q-e-sirius","title":"Q-E-SIRIUS","text":"SIRIUS enabled fork of QuantumESPRESSO
"},{"location":"merlin7/05-Software-Support/quantum-espresso/#cpu_1","title":"CPU","text":"Bashmodule purge\nmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.8-mx6f q-e-sirius/1.0.1-dtn4-omp\n"},{"location":"merlin7/05-Software-Support/quantum-espresso/#a100-nodes_1","title":"A100 nodes","text":"Bashmodule purge\nmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.8-lsff-A100-gpu q-e-sirius/1.0.1-7snv-omp\n"},{"location":"merlin7/05-Software-Support/quantum-espresso/#gh-nodes_2","title":"GH nodes","text":"Bashmodule purge\nmodule use Spack unstable\nmodule load gcc/12.3 openmpi/5.0.8-tx2w-GH200-gpu q-e-sirius/1.0.1-3dwi-omp\n"},{"location":"merlin7/05-Software-Support/spack/","title":"Spack","text":""},{"location":"merlin7/05-Software-Support/spack/#spack","title":"Spack","text":"For Merlin7 the package manager for supercomputing Spack is available. It is meant to compliment the existing PModules solution, giving users the opertunity to manage their own software environments.
Documentation for how to use Spack on Merlin7 is provided here.
"},{"location":"merlin7/05-Software-Support/spack/#the-spack-psi-packages","title":"The Spack PSI packages","text":"An initial collection of packages (and Spack reciepes) are located at Spack PSI, users can directly use these through calls like spack add ....
Welcome to the official documentation for migrating your data from Merlin6 to Merlin7. Please follow the instructions carefully to ensure a smooth and secure transition.
"},{"location":"merlin7/99-support/migration-from-merlin6/#migration-schedule","title":"\ud83d\udcc5 Migration Schedule","text":""},{"location":"merlin7/99-support/migration-from-merlin6/#phase-1-users-without-projects-deadline-july-11","title":"Phase 1: Users without Projects \u2014 Deadline: July 11","text":"If you do not belong to any Merlin project, i.e for
/data/projects/general)You must complete your migration before July 11. You just need to migrate your personal /data/user/$USER and /home/psi/$USER directories.
Users are responsible for initiating and completing the migration process as lined out below. Contact the Merlin support team merlin-admins@lists.psi.ch if you need help.
\u26a0\ufe0f In this phase, it's important that you don't belong to any project. Once the migration is finished, access to Merlin6 will be no longer possible.
Please refer to the Phase 1: Step-by-Step Migration Instructions section for detailed information about user data migration.
"},{"location":"merlin7/99-support/migration-from-merlin6/#phase-2-project-members-and-owners-start-before-august-1","title":"Phase 2: Project Members and Owners \u2014 Start Before August 1","text":"For users in active projects:
\u26a0\ufe0f In this phase, data and home directories of group owners and members will be also requested to be migrated in parallel.
Please refer to the Phase 2: Migration Instructions section for further information.
"},{"location":"merlin7/99-support/migration-from-merlin6/#directory-structure-changes","title":"Directory Structure Changes","text":""},{"location":"merlin7/99-support/migration-from-merlin6/#merlin6-vs-merlin7","title":"Merlin6 vs Merlin7","text":"Cluster Home Directory User Data Directory Projects Experiments merlin6 /psi/home/$USER /data/user/$USER /data/project/ /data/experiments merlin7 /data/user/$USER /data/user/$USER /data/project/ /data/project/ /data/user/$USER.The experiments directory has been integrated into /data/project/:
/data/project/general contains general Merlin7 projects.Before starting the migration, make sure you:
are registered on Merlin7.
have cleaned up your data to reduce migration time and space usage.
For the user data migration, ensure your total usage on Merlin6 (/psi/home+/data/user) is well below the 1\u202fTB quota (use the merlin_quotas command). Remember:
No activity should be running / performed on Merlin6 when the transfer process is ongoing.
Delete or clean up unused conda or virtualenv Python environments:
conda env export -n myenv > $HOME/myenv.yml\n * Then recreate them later on Merlin7 from these files. \ud83e\uddf9 For the user data, you can always remove more old data after migration \u2014 it will be copied into ~/merlin6data and ~/merlin6home on Merlin7.
merlin7_migration.setup","text":"Log into any Merlin6 login node (merlin-l-001.psi.ch, merlin-l-002.psi.ch, merlin-l-01.psi.ch) and run:
merlin7_migration.setup\n This script will:
Create two directories:
~/merlin6data \u2192 copy of your old /data/user~/merlin6home \u2192 copy of your old home\u26a0\ufe0f Important: If ~/merlin6home or ~/merlin6data already exist on Merlin7, the script will exit.
Please remove them or contact support.
If there are issues, the script will:
If you are stuck, email: merlin-admins@lists.psi.ch
"},{"location":"merlin7/99-support/migration-from-merlin6/#step-2-run-merlin7_migrationstart","title":"Step 2: Runmerlin7_migration.start","text":"After setup completes, start the migration by running:
Bashmerlin7_migration.start\n This script will:
xfer partitionQueue two jobs:
migrate_merlin6data.batch (data dir)
migrate_merlin6home.batch (home dir)migrate_merlin6data.batch has successfully finished.\u26a0\ufe0f Once both transfers succeed, your access to Merlin6 will be revoked. Do not attempt to reconnect to Merlin6 after this.
"},{"location":"merlin7/99-support/migration-from-merlin6/#if-something-goes-wrong","title":"\u2757 If Something Goes Wrong","text":"If a problem occurs during the migration process:
\ud83d\udee0\ufe0f Fix the root cause on the source system. Common issues include:
\u2139\ufe0f Important: If migrate_merlin6data.batch fails, the migration process will automatically cancel migrate_merlin6home.batch to avoid ending in an inconsistent state.
Once the problem is resolved, simply re-run the merlin7_migration.start script to resume the migration.
To monitor your transfer jobs, run:
Bashsqueue -M merlin6 -u $USER -p xfer\n Check the output to ensure your jobs are:
R) or completed (CG or removed from queue)F, TO, or stuck)You can also check logs (as printed by the script) to verify job completion.
\u2705 When /data/user/$USER and /psi/home/$USER on Merlin6 are no longer accessible, migration is complete.
merlin7_migration.setup\n Expected output:
Bash\u2705 login002.merlin7.psi.ch\n\u2705 `$USER` is a member of svc-cluster_merlin7\n\u2705 Skipping key generation\n\u2705 SSH key already added to agent.\n\u2705 SSH ID successfully copied to login00[1|2].merlin7.psi.ch.\n\u2705 Test successful.\n\u2705 /data/software/xfer_logs/caubet_m created.\n\u2705 ~/merlin6data directory created.\n\u2705 ~/merlin6home directory created.\n"},{"location":"merlin7/99-support/migration-from-merlin6/#start-the-migration","title":"Start the Migration","text":"Bashmerlin7_migration.start\n Expected output:
Bash(base) \u2744 [caubet_m@merlin-l-001:/data/software/admin/scripts/merlin-user-tools/alps(master)]# ./merlin7_migration.start\n\u2705 Quota check passed.\nUsed: 512 GB, 234001 files\n\n###################################################\nSubmitting transfer jobs to Slurm\n\n Job logs can be found here:\n\u27a1\ufe0f Directory '/data/user/caubet_m' does NOT have 000 permissions. Transfer pending, continuing...\n\u2705 Submitted DATA_MIGRATION job: 24688554. Sleeping 3 seconds...\n - /data/user transfer logs:\n - /data/software/xfer_logs/caubet_m/data-24688554.out\n - /data/software/xfer_logs/caubet_m/data-24688554.err\n\u27a1\ufe0f Directory '/psi/home/caubet_m' does NOT have 000 permissions. Transfer pending, continuing...\n\u2705 Submitted HOME_MIGRATION job with dependency on 24688554: 24688555. Sleeping 3 seconds...\n - /psi/home transfer logs:\n - /data/software/xfer_logs/caubet_m/home-24688555.out\n - /data/software/xfer_logs/caubet_m/home-24688555.err\n\n\u2705 You can start manually a monitoring window with:\n tmux new-session -d -s \"xfersession\" \"watch 'squeue -M merlin6 -u caubet_m -p xfer'\"\n tmux attach -t \"xfersession\"\n\n\u2705 FINISHED - PLEASE CHECK JOB TRANSFER PROGRESS\n"},{"location":"merlin7/99-support/migration-from-merlin6/#monitor-progress","title":"Monitor Progress","text":"Bashsqueue -M merlin6 -u $USER -p xfer\n Output:
Bash$ squeue -M merlin6 -u $USER -p xfer\nCLUSTER: merlin6\n JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON)\n 24688581 xfer HOME_MIG caubet_m PD 0:00 1 (Dependency)\n 24688580 xfer DATA_MIG caubet_m R 0:22 1 merlin-c-017\n"},{"location":"merlin7/99-support/migration-from-merlin6/#phase-2-migration-instructions","title":"Phase 2: Migration Instructions","text":"Please refer to the Prerequisites and Preparation section for initial setup steps. Further instructions will be sent via email once the owning team is contacted by the Merlin administrators.
"},{"location":"merlin7/99-support/migration-from-merlin6/#common-rsyncfpsync-migration-issues","title":"\u26a0\ufe0f Commonrsync/fpsync Migration Issues","text":""},{"location":"merlin7/99-support/migration-from-merlin6/#file-permission-denied","title":"File Permission Denied","text":"chmod -R u+rX /path/to/file_or_dir\n"},{"location":"merlin7/99-support/migration-from-merlin6/#ownership-mismatches","title":"Ownership Mismatches","text":"Solution:
chown -R $USER /path/to/file\n rsync tries to copy UNIX sockets, device files, or FIFOs..tar.gz before transferring:tar -czf myenv.tar.gz myenv/\n"},{"location":"merlin7/99-support/migration-from-merlin6/#need-help","title":"Need Help?","text":"If something doesn't work:
less, cat, or tail -f to view your job logs.We are here to help you migrate safely and efficiently.
"},{"location":"news/","title":"News","text":""},{"location":"news/#news","title":"News","text":""},{"location":"news/2019/06/12/merlin-6-documentation-available/","title":"Merlin 6 documentation available","text":"","tags":["getting_started"]},{"location":"news/2019/06/12/merlin-6-documentation-available/#merlin-6-documentation-available","title":"Merlin 6 documentation available","text":"Merlin 6 docs are now available at Merlin6 docs!
More complete documentation will be coming shortly.
","tags":["getting_started"]},{"location":"news/2024/08/07/merlin7-in-preproduction/","title":"Merlin7 in preproduction","text":"","tags":["getting_started"]},{"location":"news/2024/08/07/merlin7-in-preproduction/#merlin7-in-preproduction","title":"Merlin7 in preproduction","text":"The Merlin7 cluster is officially in preproduction. This phase will be tested by a few users and slowly we will contact other users to be part of it. Keep in mind that access is restricted.
Merlin7 documentation is now available at Slurm configuration.
More complete documentation will be coming shortly.
","tags":["getting_started"]},{"location":"news/2026/01/12/new-user-documentation-site/","title":"New User Documentation Site","text":"","tags":["getting_started"]},{"location":"news/2026/01/12/new-user-documentation-site/#new-user-documentation-site","title":"New User Documentation Site","text":"Starting in 2026, we are changing the design of the user documentation website. Previously we had used the theme Documentation for Jekyll together with the Jykell SSG, but have now switch to the more modern Material for MkDocs theme and SSG engine. This comes with a few improvements:
With the latter new feature, we encourage our users to point out any issues they find with the documentation. Contributation are very welcome and will help in ensuring that the documentation is kept up-to-date.
Notice also that we now have a dedicated Support page, making it easier to find and use our different contact options.
","tags":["getting_started"]},{"location":"support/faq/","title":"FAQ","text":""},{"location":"support/faq/#frequently-asked-questions","title":"Frequently Asked Questions","text":""},{"location":"support/faq/#how-do-i-register-for-merlin","title":"How do I register for Merlin?","text":"See Requesting Merlin Access.
"},{"location":"support/faq/#how-do-i-get-information-about-downtimes-and-updates","title":"How do I get information about downtimes and updates?","text":"See Get updated through the Merlin User list!
"},{"location":"support/faq/#how-can-i-request-access-to-a-merlin-project-directory","title":"How can I request access to a Merlin project directory?","text":"Merlin projects are placed in the /data/project directory. Access to each project is controlled by Unix group membership. If you require access to an existing project, please request group membership as described in Requesting Unix Group Membership.
Your project leader or project colleagues will know what Unix group you should belong to. Otherwise, you can check what Unix group is allowed to access that project directory (simply run ls -ltrhd for the project directory).
Most software can be installed in user directories without any special permissions. We recommend using /data/user/$USER/bin for software since home directories are fairly small. For software that will be used by multiple groups/users you can also request the admins install it as a module.
How to install depends a bit on the software itself. There are three common installation procedures:
/data/user/$USER/bin) and add that to your PATH.--prefix=/data/user/$USER directory for where to install it. Then they place files under <prefix>/bin, <prefix>/lib, etc. The exact syntax should be documented in the installation instructions.Note
The following is based on merlin6, but should still be valid for merlin7.
conda environment. This is now becoming standard for python-based software, including lots of the AI tools. First follow the initial setup instructions to configure conda to use /data/user instead of your home directory. Then you can create environments like:
Bashmodule load anaconda/2019.07\n# if they provide environment.yml\nconda env create -f environment.yml\n\n# or to create manually\nconda create --name myenv python==3.9 ...\n\nconda activate myenv\n Check the list of known problems to see if a solution is known. If not, please contact the admins.
"},{"location":"support/introduction/","title":"Getting Support","text":""},{"location":"support/introduction/#getting-support","title":"Getting Support","text":"Tip
It is strongly recommended that users subscribe to the user mailing list, that way you will receive the newest announcements concerning the status of the clusters, information regarding maintenance actions, and other tasks that might affect your work.
There are several channels you can use to get support:
Basic contact information is also displayed on every shell login to the system using the Message of the Day mechanism.
"},{"location":"support/introduction/#psi-service-now","title":"PSI Service Now","text":"PSI Service Now is the official tool for opening tickets and requests.
I know which service is affected and providing the service name Local HPC Resources (e.g. Merlin) [CF] (just type in Local and you should get the valid completions).This mailing list is the official channel used by Merlin administrators to inform users about downtimes, interventions or problems. Users can be subscribed in two ways:
This is the official way to contact Merlin Administrators for discussions which do not fit well into the incident category. Do not hesitate to contact us for such cases.
E-Mail: merlin-admins@lists.psi.ch
"},{"location":"support/introduction/#who-are-we","title":"Who are we?","text":"The PSI Merlin clusters are managed by the High Performance Computing and Emerging technologies Group, which is part of the Science IT Infrastructure, and Services department (AWI) in PSI's Center for Scientific Computing, Theory and Data (SCD).
"},{"location":"support/known-problems/","title":"Known Problems","text":""},{"location":"support/known-problems/#known-problems","title":"Known Problems","text":""},{"location":"support/known-problems/#common-errors","title":"Common errors","text":""},{"location":"support/known-problems/#illegal-instruction-error","title":"Illegal instruction error","text":"It may happened that your code, compiled on one machine will not be executed on another throwing exception like \"(Illegal instruction)\". This is usually because the software was compiled with a set of instructions newer than the ones available in the node where the software runs, and it mostly depends on the processor generation.
In example, merlin-l-001 and merlin-l-002 contain a newer generation of processors than the old GPUs nodes, or than the Merlin5 cluster. Hence, unless one compiles the software with compatibility with set of instructions from older processors, it will not run on old nodes. Sometimes, this is properly set by default at the compilation time, but sometimes is not.
For GCC, please refer to GCC x86 Options for compiling options. In case of doubts, contact us.
"},{"location":"support/known-problems/#slurm","title":"Slurm","text":""},{"location":"support/known-problems/#sbatch-using-one-core-despite-setting-c-cpus-per-task","title":"sbatch using one core despite setting -c/--cpus-per-task","text":"From Slurm v22.05.6, the behavior of srun has changed. Merlin has been updated to this version since Tuesday 13.12.2022.
srun will no longer read in SLURM_CPUS_PER_TASK, which is typically set when defining -c/--cpus-per-task in the sbatch command. This means you will implicitly have to specify -c\\--cpus-per-task also on your srun calls, or set the new SRUN_CPUS_PER_TASK environment variable to accomplish the same thing. Therefore, unless this is implicitly specified, srun will use only one Core per task (resulting in 2 CPUs per task when multithreading is enabled)
An example for setting up srun with -c\\--cpus-per-task:
(base) \u2744 [caubet_m@merlin-l-001:/data/user/caubet_m]# cat mysbatch_method1\n#!/bin/bash\n#SBATCH -n 1\n#SBATCH --cpus-per-task=8\n\necho 'From Slurm v22.05.8 srun does not inherit $SLURM_CPUS_PER_TASK'\nsrun python -c \"import os; print(os.sched_getaffinity(0))\"\n\necho 'One has to implicitly specify $SLURM_CPUS_PER_TASK'\necho 'In this example, by setting -c/--cpus-per-task in srun'\nsrun --cpus-per-task=$SLURM_CPUS_PER_TASK python -c \"import os; print(os.sched_getaffinity(0))\"\n\n(base) \u2744 [caubet_m@merlin-l-001:/data/user/caubet_m]# sbatch mysbatch_method1\nSubmitted batch job 8000813\n\n(base) \u2744 [caubet_m@merlin-l-001:/data/user/caubet_m]# cat slurm-8000813.out\nFrom Slurm v22.05.8 srun does not inherit $SLURM_CPUS_PER_TASK\n{1, 45}\nOne has to implicitly specify $SLURM_CPUS_PER_TASK\nIn this example, by setting -c/--cpus-per-task in srun\n{1, 2, 3, 4, 45, 46, 47, 48}\n An example to accomplish the same thing with the SRUN_CPUS_PER_TASK environment variable:
(base) \u2744 [caubet_m@merlin-l-001:/data/user/caubet_m]# cat mysbatch_method2\n#!/bin/bash\n#SBATCH -n 1\n#SBATCH --cpus-per-task=8\n\necho 'From Slurm v22.05.8 srun does not inherit $SLURM_CPUS_PER_TASK'\nsrun python -c \"import os; print(os.sched_getaffinity(0))\"\n\necho 'One has to implicitly specify $SLURM_CPUS_PER_TASK'\necho 'In this example, by setting an environment variable SRUN_CPUS_PER_TASK'\nexport SRUN_CPUS_PER_TASK=$SLURM_CPUS_PER_TASK\nsrun python -c \"import os; print(os.sched_getaffinity(0))\"\n\n(base) \u2744 [caubet_m@merlin-l-001:/data/user/caubet_m]# sbatch mysbatch_method2\nSubmitted batch job 8000815\n\n(base) \u2744 [caubet_m@merlin-l-001:/data/user/caubet_m]# cat slurm-8000815.out\nFrom Slurm v22.05.8 srun does not inherit $SLURM_CPUS_PER_TASK\n{1, 45}\nOne has to implicitly specify $SLURM_CPUS_PER_TASK\nIn this example, by setting an environment variable SRUN_CPUS_PER_TASK\n{1, 2, 3, 4, 45, 46, 47, 48}\n"},{"location":"support/known-problems/#general-topics","title":"General topics","text":""},{"location":"support/known-problems/#default-shell","title":"Default SHELL","text":"In general, /bin/bash is the recommended default user's SHELL when working in Merlin.
Some users might notice that BASH is not the default SHELL when logging in to Merlin systems, or they might need to run a different SHELL. This is probably because when the PSI account was requested, no SHELL description was specified or a different one was requested explicitly by the requestor. Users can check which is the default SHELL specified in the PSI account with the following command:
Bashgetent passwd $USER | awk -F: '{print $NF}'\n If SHELL does not correspond to the one you need to use, you should request a central change for it. This is because Merlin accounts are central PSI accounts. Hence, change must be requested via PSI Service Now.
Alternatively, if you work on other PSI Linux systems but for Merlin you need a different SHELL type, a temporary change can be performed during login startup. You can update one of the following files:
~/.login~/.profilerc or profile file in your home directory (i.e. .cshrc, .bashrc, .bash_profile, etc.)with the following lines:
Bash# Replace MY_SHELL with the bash type you need\nMY_SHELL=/bin/bash\nexec $MY_SHELL -l\n Notice that available shells can be found in the following file:
Bashcat /etc/shells\n"},{"location":"support/known-problems/#3d-acceleration-opengl-vs-mesa","title":"3D acceleration: OpenGL vs Mesa","text":"Some applications can run with OpenGL support. This is only possible when the node contains a GPU card.
In general, X11 with Mesa Driver is the recommended method as it will work in all cases (no need of GPUs). In example, for ParaView:
Bashmodule load paraview\nparaview-mesa paraview # 'paraview --mesa' for old releases\n However, if one needs to run with OpenGL support, this is still possible by running vglrun. In example, for running Paraview:
module load paraview\nvglrun paraview\n Officially, the supported method for running vglrun is by using the NoMachine remote desktop. Running vglrun it's also possible using SSH with X11 Forwarding. However, it's very slow and it's only recommended when running in Slurm (from NoMachine). Please, avoid running vglrun over SSH from a desktop or laptop.
Sometimes, running ANSYS/Fluent requires X11 support. For that, one should run fluent as follows.
Bashmodule load ANSYS\nfluent -driver x11\n"},{"location":"support/known-problems/#paraview","title":"Paraview","text":"For running Paraview, one can run it with Mesa support or OpenGL support. Please refer to OpenGL vs Mesa for further information about how to run it.
"},{"location":"support/known-problems/#module-command-not-found","title":"Module command not found","text":"In some circumstances the module command may not be initialized properly. For instance, you may see the following error upon logon:
Text Onlybash: module: command not found\n The most common cause for this is a custom .bashrc file which fails to source the global /etc/bashrc responsible for setting up PModules in some OS versions. To fix this, add the following to $HOME/.bashrc:
if [ -f /etc/bashrc ]; then\n . /etc/bashrc\nfi\n It can also be fixed temporarily in an existing terminal by running . /etc/bashrc manually.
For troubleshooting, please contact us through the official channels. See here for more information.
"},{"location":"support/troubleshooting/#known-problems","title":"Known Problems","text":"Before contacting us for support, please check the Known Problems page to see if there is an existing workaround for your specific problem.
"},{"location":"support/troubleshooting/#troubleshooting-slurm-jobs","title":"Troubleshooting Slurm Jobs","text":"If you want to report a problem or request for help when running jobs, please always provide the following information:
Add always the following commands to your batch script
Bashecho \"User information:\"; who am i\necho \"Running hostname:\"; hostname\necho \"Current location:\"; pwd\necho \"User environment:\"; env\necho \"List of PModules:\"; module list\n Whenever possible, provide the Slurm JobID.
Providing this information is extremely important in order to ease debugging, otherwise only with the description of the issue or just the error message is completely insufficient in most cases.
"},{"location":"support/troubleshooting/#troubleshooting-ssh","title":"Troubleshooting SSH","text":"Use the ssh command with the \"-vvv\" option and copy and paste the text (please don't send us screenshots) the output to your request in Service-Now. Example:
Bashssh -Y -vvv $username@<hostname>\n"},{"location":"news/archive/2026/","title":"2026","text":""},{"location":"news/archive/2026/#2026","title":"2026","text":""},{"location":"news/archive/2024/","title":"2024","text":""},{"location":"news/archive/2024/#2024","title":"2024","text":""},{"location":"news/archive/2019/","title":"2019","text":""},{"location":"news/archive/2019/#2019","title":"2019","text":""}]}