submit.sh 1.5 KB
Newer Older
T
tangwei 已提交
1 2 3 4 5 6 7
#!/bin/bash

###################################################
# Usage: submit.sh
# Description: run mpi submit clinet implement
###################################################

T
bug fix  
tangwei12 已提交
8
g_package_files=""
T
tangwei 已提交
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

#-----------------------------------------------------------------------------------------------------------------
#fun : before hook submit to cluster
#param : N/A
#return : 0 -- success; not 0 -- failure
#-----------------------------------------------------------------------------------------------------------------
function before_submit_hook() {
  echo "before_submit"
}

#-----------------------------------------------------------------------------------------------------------------
#fun : after hook submit to cluster
#param : N/A
#return : 0 -- success; not 0 -- failure
#-----------------------------------------------------------------------------------------------------------------
function after_submit_hook() {
  echo "after_submit"
}

#-----------------------------------------------------------------------------------------------------------------
#fun : package to cluster
#param : N/A
#return : 0 -- success; not 0 -- failure
#-----------------------------------------------------------------------------------------------------------------
function package() {
T
bug fix  
tangwei12 已提交
34 35 36
  echo "package"
  temp=${engine_temp_path}

T
tangwei 已提交
37
  cp ${engine_workspace}/job.sh ${temp}
T
bug fix  
tangwei12 已提交
38
  cp ${engine_workspace}/before_hook.sh ${temp}
T
tangwei 已提交
39
  cp ${engine_run_config} ${temp}/config.yaml
T
bug fix  
tangwei12 已提交
40

T
tangwei 已提交
41
  g_submitfiles="job.sh before_hook.sh config.yaml"
T
tangwei 已提交
42
  g_run_cmd="sh job.sh"
T
tangwei 已提交
43
}