Script xalt_find_exec_aprun_in_py
[hide private]
[frames] | no frames]

Source Code for Script script-xalt_find_exec_aprun_in_py

 1  # -*- python -*- 
 2  # 
 3  # Git Version: @git@ 
 4   
 5  #----------------------------------------------------------------------- 
 6  # XALT: A tool that tracks users jobs and environments on a cluster. 
 7  # Copyright (C) 2013-2014 University of Texas at Austin 
 8  # Copyright (C) 2013-2014 University of Tennessee 
 9  #  
10  # This library is free software; you can redistribute it and/or modify 
11  # it under the terms of the GNU Lesser General Public License as 
12  # published by the Free Software Foundation; either version 2.1 of  
13  # the License, or (at your option) any later version.  
14  # 
15  # This library is distributed in the hope that it will be useful, 
16  # but WITHOUT ANY WARRANTY; without even the implied warranty of 
17  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 
18  # Lesser  General Public License for more details.  
19  # 
20  # You should have received a copy of the GNU Lesser General Public 
21  # License along with this library; if not, write to the Free 
22  # Software Foundation, Inc., 59 Temple Place, Suite 330, 
23  # Boston, MA 02111-1307 USA 
24  #----------------------------------------------------------------------- 
25   
26  from __future__             import print_function 
27  import os, re, sys 
28  dirNm, execName = os.path.split(sys.argv[0]) 
29  sys.path.insert(1,os.path.abspath(os.path.join(dirNm, "../libexec"))) 
30  from xalt_parse_mpirun_args import find_exec 
31   
32  ignoreT = { 
33    'env'              : True, 
34    'time'             : True, 
35  } 
36   
37  # option and number of arguments space delimited 
38  argT = { 
39    '-a'                        : 1, 
40    '--architecture'            : 1, 
41    '-cc'                       : 1, 
42    '--cpu-binding'             : 1, 
43    '-cp'                       : 1, 
44    '--cpu-binding-file'        : 1, 
45    '-d'                        : 1, 
46    '--cpus-per-pe'             : 1, 
47    '-D'                        : 1, 
48    '--debug'                   : 1, 
49    '-e'                        : 1, 
50    '-E'                        : 1, 
51    '--exclude-node-list'       : 1, 
52    '--exclude-node-list-file'  : 1, 
53    '-F'                        : 1, 
54    '--access-mode'             : 1, 
55    '-j'                        : 1, 
56    '--CPUs'                    : 1, 
57    '-L'                        : 1, 
58    '-l'                        : 1, 
59    '-m'                        : 1, 
60    '--memory-per-pe'           : 1, 
61    '-n'                        : 1, 
62    '--pes'                     : 1, 
63    '-N'                        : 1, 
64    '--pes-per-node'            : 1, 
65    '-p'                        : 1, 
66    '--p-governor'              : 1, 
67    '--p-state'                 : 1, 
68    '-r'                        : 1, 
69    '--specialized-cpus'        : 1, 
70    '-R'                        : 1, 
71    '--relaunch'                : 1, 
72    '-S'                        : 1, 
73    '--pes-per-numa-node'       : 1, 
74    '-sl'                       : 1, 
75    '--numa-node-list'          : 1, 
76    '-sn'                       : 1, 
77    '--numa-nodes-per-node'     : 1, 
78    '-t'                        : 1, 
79    '--cpu-time-limit'          : 1, 
80  } 
81   
82 -def main():
83 """ 84 Find name of executable when using aprun. 85 """ 86 87 print(find_exec(ignoreT, argT, None, sys.argv[1:], dot=True))
88 89 if ( __name__ == '__main__'): main() 90