Skip to content

2. Quick Start

User Account

Users need a computing environment account before they can use computing resources.

Account Application

Note

The cluster password is the same as the unified authentication password. No separate password setup is required. If the unified authentication password is changed, the cluster password will be synchronized.

Command-Line Login

Linux, macOS, and Windows can all be used to log in to the cluster. Linux or macOS is recommended.

For Windows 10 and later, Windows Terminal is recommended. For other Windows versions, install third-party SSH client software. For more details, refer toAccount Management.

ssh-l[username]@lxlogin.ihep.ac.cn
# Enter the following command in an SSH clientssh-l[username]@lxlogin.ihep.ac.cn

File Management

File Directories

After login, users enter their home directory by default, such as/afs/ihep.ac.cn/users/xxx/xxx.

The home directory contains a.bashrcfile, which is executed automatically when the user logs in.

Recommended personal file storage locations:

Directory Stored content Per-user quota
/afs/ihep.ac.cn/users/xxxx/[username] Login configuration files 500 MB
/scratchfs/xxxx Temporary user files 500 GB
/workfs/xxxx Personal user files 50 GB

Experiment data should be stored in the corresponding experiment directories. SeeFile Systemsfor detailed storage information and quotas.

File Upload and Download

# Upload fileslftpftp://lxlogin.ihep.ac.cn/afs-u[username][password]# Download fileslftp>mget[filename]
# Upload filessftp-oPort=20lxlogin.ihep.ac.cn# Download filessftp>get[filename]

Job Submission

HTCondor Jobs

HTCondor is an open-source batch system widely used in high-energy physics computing. It supports large-scale computing clusters and is flexible, making it especially suitable for high-throughput job scheduling at IHEP. Based on the cluster environment, the Computing Center has optimized HTCondor functionality and performance, developed centralized management and monitoring tools, and deployed a high-throughput scheduling system based on HTCondor. The HTCondor system currently supports most IHEP experiments, including BES, JUNO, DYW, LHAASO, and HXMT.

$exportPATH=/afs/ihep.ac.cn/soft/common/sysgroup/hep_job/bin/:$PATH
$setenvPATH/afs/ihep.ac.cn/soft/common/sysgroup/hep_job/bin/:$PATH
  1. Prepare a job script.

    Upload the job script to the corresponding directory, such as/workfs/xxx/test.sh, or enter the directory and create the script withvi test.sh.

    A simple shell script:

    #!/bin/shecho"Hello, World!"
  2. Set executable permission for the script.

    # Check script permissions$ls-ltest.sh-rw-r--r--1xxxxxx2308-2716:54test.sh# Modify script permissions$chmod+xtest.sh# Check permissions again$ls-ltest.sh-rwxr--r--1xxxxxx2308-2716:54test.sh
  3. Submit the job.

    $hep_subtest.sh-g[group_name]# group_name is the resource group to use
  4. Check job status.

    $hep_q-u[username]# username is the user whose jobs you want to query

    Example output:

    JOBIDOWNERSUBMITTIMERUN_TIMESTPRISIZECMD5519.0xxx2019-08-2716:540+00:00:0000.0test.sh

    JOBIDis the job ID,OWNERis the job owner,SUBMITTIMEis the submission time,RUN_TIMEis the running time,STis the status,PRIis the priority,SIZEis the virtual memory usage, andCMDis the job program name.

  5. Cancel jobs.

    Delete jobs by job ID. Multiple jobs can be deleted at the same time. For example, to delete jobs 5519 and 5520:

    $hep_rm5519.05520.0

    Delete all jobs of the current user:

    $hep_rm-a

Slurm Jobs

Slurm is an open-source cluster manager and job scheduling system. It supports multiple types of compute nodes, including GPU and CPU nodes.

Slurm job submission workflow:

  1. Prepare a job script.

    Use an editor such as vim or emacs to edit the job script. Sample job scripts are available under/cvmfs/common.ihep.ac.cn/software/slurm_sample_script.

    $ssh@lxlogin.ihep.ac.cn$cd/cvmfs/common.ihep.ac.cn/software/slurm_sample_script$ls-lht

    Figure 1-4 Slurm template directory

    The simplest sample script can be viewed with:

    $catslurm_sample_script_2.sh

    Figure 1-5 Slurm job script template

    In the script:

    1. Define the required variables, such asVAR1andVAR2.
    2. If you need to run your own script, usesrunand replace/path/to/your/scriptwith the actual script file name.
    3. If you need to run a parallel program, usesrunfirst to trigger resource allocation, then usempiexecto run the parallel program. Replace/path/to/your/mpi_programwith the actual path of your parallel program.
  2. Submit the job.

    After editing the script, submit it with:

    $hep_sub-slurm-part-g-npslurm_sample_script_2.sh

    Where:

    1. is the queue name. Available queues can be queried with:

      $hep_clus-slurm

      Example output:

      Figure 1-6 Example output of hep_clus

      Available queue names are shown in the first column. If you are not sure which queue to use, submit to thecompqueue, which is the default cluster queue.

    2. is the group to which the job belongs. For example, if the job belongs to theofflinegroup of the BES experiment, use-g offline.

    3. is the number of CPU cores required by the job. For example, if 30 CPU cores are required, use-np 30.

    To submitslurm_sample_script_2.shto thecompqueue, for theofflinegroup, requesting 30 CPU cores:

    $hep_sub-slurm-partcomp-goffline-np30slurm_sample_script_2.sh

    Note: the queue name and job group name must be provided, otherwise job submission will fail.

  3. Check job status.

    After submission,hep_subreturns a job ID. Use this ID to query the job:

    $hep_q-slurm-i

    is the ID returned byhep_sub.

  4. Get job results.

    After the job finishes, if no output directory is specified, the default job result is saved in the submission directory. The output file format is.out. For example, if the job ID is1234, the output file is1234.out.

Software Usage

The platform uses themodulecommand to load software environments. For detailed usage, refer toEnvironment Configuration.

The following example uses Python.

  1. Load the Python environment:
$moduleloadpython/3.7
  1. Verify the Python environment:
$pythonPython3.7.0(default,Aug272019,16:54:48)[GCC4.8.520150623(RedHat4.8.5-39)]onlinuxType"help","copyright","credits"or"license"formoreinformation.>>>
  1. Exit Python:
>>>exit()$

FAQ

SeeFAQ.

AI 助手
快速提问 ×

有问题?输入后跳转到对话页继续交流

Baidu
map