Class: ServerScripts::Computer::TSUBAME

Inherits:
Base
  • Object
show all
Defined in:
lib/server_scripts/computer/tsubame.rb

Constant Summary collapse

HEADER =
%q{#!/bin/bash

#$ -cwd
#$ -l %{node_type}=%{nodes}
#$ -l h_rt=%{wall_time}
#$ -N %{job_name}
#$ -o %{out_file}
#$ -e %{err_file}

. /etc/profile.d/modules.sh
}
FULL_NODE =
"f_node"
MODULES =
{
  "gcc" => "gcc/8.3.0",
  "intel-mpi" => "intel-mpi",
  "openmpi" => "cuda/8.0.61 openmpi",
  "itac" => "intel-itac intel-vtune"
}

Instance Method Summary collapse

Methods inherited from Base

#initialize, #node_type

Constructor Details

This class inherits a constructor from ServerScripts::Computer::Base

Instance Method Details

#env_setterObject



30
31
32
33
34
35
36
37
# File 'lib/server_scripts/computer/tsubame.rb', line 30

def env_setter
  str = "\n"
  @env.each do |var, value|
    str += "export #{var}=#{value}\n"
  end

  str
end

#headerObject



25
26
27
28
# File 'lib/server_scripts/computer/tsubame.rb', line 25

def header
  HEADER % {node_type: node_type, nodes: @nodes, wall_time: @wall_time,
    job_name: @job_name, out_file: @out_file, err_file: @err_file}
end

#job_submit_cmd(batch_script:, res_id: nil) ⇒ Object



39
40
41
42
# File 'lib/server_scripts/computer/tsubame.rb', line 39

def job_submit_cmd batch_script:, res_id: nil
  res = res_id ? " -ar #{res_id} " : ""
  "qsub -g #{ServerScripts.group_name} #{res} #{batch_script}"
end

#module_load_cmdObject



44
45
46
# File 'lib/server_scripts/computer/tsubame.rb', line 44

def module_load_cmd
  "module load #{@modules.map { |m| MODULES[m] }.join(' ')}"
end