简体   繁体   English

访问 SLURM 集群节点的暂存文件夹

[英]to access the scratch folder of a SLURM cluster node

I would appreciate your suggestions and advise on the following please:我会很感激你的建议和建议如下:

I am using a SLURM cluster and my colleagues have advised to run a singularity container on the cluster, and re-direct the output of the singularity container to a folder that is hosted in the /scratch folder of each computing node.我正在使用 SLURM 集群,我的同事建议在集群上运行一个奇点容器,并将奇点容器的 output 重定向到每个计算节点的 /scratch 文件夹中托管的文件夹。

for example:例如:

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

i would like to ask please: how can i access the "output" folder in the "scratch" of the computing node?请问:如何访问计算节点“scratch”中的“output”文件夹? Thanks a lot !非常感谢 !

bogdan波格丹

You can think of --bind as a bit like a symlink.你可以认为--bind有点像符号链接。 Running ls /local/scratch/bt on the host OS is equivalent to running ls /output inside the exec process.在主机操作系统上运行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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM