代码之家  ›  专栏  ›  技术社区  ›  Chinmay Kanchi

在GridEngine群集的多个节点上运行作业

  •  3
  • Chinmay Kanchi  · 技术社区  · 15 年前

    我可以访问一个128核集群,在这个集群上运行一个并行作业。集群使用sungridengine,而我的程序是使用python2.5.8上的并行python、numpy、scipy运行的。在单个节点(4核)上运行作业比单个核提高了约3.5倍。我现在想把它带到下一个级别,并将作业拆分为~4个节点。我的 qsub 脚本如下所示:

    #!/bin/bash
    # The name of the job, can be whatever makes sense to you
    #$ -N jobname
    
    # The job should be placed into the queue 'all.q'.
    #$ -q all.q
    
    # Redirect output stream to this file.
    #$ -o jobname_output.dat
    
    # Redirect error stream to this file.
    
    #$ -e jobname_error.dat
    
    # The batchsystem should use the current directory as working directory.
    # Both files will be placed in the current
    # directory. The batchsystem assumes to find the executable in this directory.
    #$ -cwd
    
    # request Bourne shell as shell for job.
    #$ -S /bin/sh
    
    # print date and time
    date
    
    # spython is the server's version of Python 2.5. Using python instead of spython causes the program to run in python 2.3
    spython programname.py
    
    # print date and time again
    date
    

    有人知道怎么做吗?

    1 回复  |  直到 15 年前
        1
  •  2
  •   High Performance Mark    15 年前

    是的,您需要包括网格引擎选项 -np 16 在您的脚本中,如下所示:

    # Use 16 processors
    #$ -np 16
    

    或者在提交脚本时在命令行上。或者,对于更长期的安排,使用 .sge_request 文件。

    在我使用过的所有GE安装中,这将为您提供16个处理器(或处理器核心),而节点数量可以根据需要减少,因此如果您的节点有4个核心,您将获得4个节点,如果它们有8个2个等。要放置作业,假设8个节点上有2个核心(如果每个进程需要大量内存,则可能需要这样做),这会稍微复杂一些,您应该咨询您的支持团队。

    推荐文章