【问题标题】:to access the scratch folder of a SLURM cluster node访问 SLURM 集群节点的暂存文件夹
【发布时间】:2021-06-08 00:38:53
【问题描述】:

非常感谢您的建议和建议:

我正在使用 SLURM 集群,我的同事建议在集群上运行奇异容器,并将奇异容器的输出重定向到托管在每个计算节点的 /scratch 文件夹中的文件夹。

例如:

singularity exec --bind /local/scratch/bt:/output \
singularity_latest.sif run  \
-o /output

我想问一下:如何访问计算节点“scratch”中的“output”文件夹?非常感谢!

博格丹

【问题讨论】:

    标签: slurm singularity-container scratch-file


    【解决方案1】:

    您可以将--bind 视为有点像符号链接。在宿主机操作系统上运行ls /local/scratch/bt相当于在exec进程中运行ls /output

    mkdir scratch
    touch scratch/file1
    
    ls -l scratch
    # total 0
    # -rw-rw-r-- 1 tsnowlan tsnowlan 0 Jun  8 09:13 file1
    
    singularity exec -B $PWD/scratch:/output my_image.sif ls -l /output
    # total 0
    # -rw-rw-r-- 1 tsnowlan tsnowlan 0 Jun  8 09:13 file1
    
    # singularity also accepts relative paths
    singularity exec -B scratch:/output my_image.sif touch /output/file2
    
    ls -l scratch
    # total 0
    # -rw-rw-r-- 1 tsnowlan tsnowlan 0 Jun  8 09:13 file1
    # -rw-rw-r-- 1 tsnowlan tsnowlan 0 Jun  8 09:16 file2
    
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-16
      • 2020-09-15
      • 1970-01-01
      • 1970-01-01
      • 2011-11-22
      相关资源
      最近更新 更多