【问题标题】:HTCondor with OpenFOAMHTCondor 与 OpenFOAM
【发布时间】:2017-05-22 15:15:40
【问题描述】:

我正在尝试从 HTCondor 在 OpenFOAM 中启动一些计算。 到目前为止,我们只准备了一台多核服务器 OpenFOAM。 OpenFOAM 是按照以下说明从源代码安装的(不使用 docker):https://openfoam.org/download/4-1-source/

问题:当我在 HTCondor 中提交作业时,它会正确启动(我看到生成了结果文件)但输出文件没有复制回提交的机器(在 Windows 上)。

这是我的工作文件:

Universe = vanilla
Executable = openfoamtest.sh

process_name = openfoamtest
input = /dev/null
requirements = ( (OpSys == "LINUX") && (Machine == "master") )

output = $(process_name).job.$(Process).out 
error = $(process_name).job.$(Process).err 
log = $(process_name).job.log

should_transfer_files = YES
when_to_transfer_output = ON_EXIT_OR_EVICT
transfer_executable = true

Queue 1

openfoamtest.sh:

#!/bin/bash
# Import the OpenFOAM environment
source /etc/bashrc
export PATH=$PATH:/usr/lib64/openmpi/bin/
source /opt/OpenFOAM/OpenFOAM-4.1/etc/bashrc

cd /tmp/openfoam/pitzDaily
blockMesh
simpleFoam
zip pitzDaily.zip *

请注意,我使用 condorworker 用户而不是用户 nobody 来启动进程。提交是从 Windows 计算机进行的。 谢谢。

【问题讨论】:

    标签: linux condor openfoam


    【解决方案1】:

    解决了。问题是我脚本中的“cd”。这将当前工作目录移动到 HTCondor 不知道的另一个文件夹。解决方案是添加, 开头:

    # This is the folder where Condor starts
    CURRENT_FOLDER=$PWD
    

    最后:

    # Copy back the generated file to Condor's execute folder.
    cp pitzDaily.zip $CURRENT_FOLDER
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-05-07
      • 2023-03-12
      • 1970-01-01
      • 2021-08-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多