/usr/bin/skel is in libadios-bin 1.9.0-7build2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | #! /usr/bin/python
import sys
import os.path
# Make sure that the skel modules are available...
# ...for the installed skel
sys.path.insert (0, os.path.dirname(sys.argv[0]) + '/../lib/python')
# ...for the skel in the utils dir of the adios source
sys.path.insert (0, os.path.dirname(sys.argv[0]) + '/../lib')
import argparse
import adios
import skelconf
import skel_settings
import skel_install
import skel_makefile
import skel_params
import skel_replay
import skel_source
import skel_submit
import skel_suite
import skel_template
import skel_xml
def get_parser():
parser = argparse.ArgumentParser (
formatter_class=argparse.RawDescriptionHelpFormatter,
prog='skel',
add_help=False,
description='''\
Skel: Create, run and analyze skeletal I/O applications
-------------------------------------------------------
Available subcommands include:
skel help
skel makefile
skel params
skel replay
skel source
skel submit
skel xml
Use skel help <subcommand> to see detailed options for each subcommand.''')
parser.add_argument ('subcommand', metavar='subcommand', help='Skel command to execute')
#parser.add_argument ('project', metavar='project', help='Name of the skel project')
#parser.add_argument ('-g', '--group', help='adios group (only valid for skel params)')
return parser
def main(argv=None):
skel_settings.create_settings_dir_if_needed()
parser = get_parser()
# Look for skel help (or no args), and print the list of subcommands...
if (len(sys.argv) == 1) or (sys.argv[1] == 'help' and len(sys.argv) == 2):
print parser.description
return 0
# install does not require a project, so let's just check for it directly
if sys.argv[1] == 'install':
return 0
if sys.argv[1] == 'help':
if sys.argv[2] == 'makefile':
sys.argv = ["skel", "makefile", "junk", "-h"]
skel_makefile.generate_makefiles_with_args (parser)
elif sys.argv[2] == 'params':
sys.argv = ["skel", "params", "junk", "-h"]
skel_params.generate_param_file_with_args (parser)
elif sys.argv[2] == 'replay':
sys.argv = ["skel", "replay", "junk", "-h"]
elif sys.argv[2] == 'source':
sys.argv = ["skel", "source", "junk", "-h"]
skel_source.create_sources_with_args (parser)
elif sys.argv[2] == 'submit':
sys.argv = ["skel", "submit", "junk", "-h"]
skel_submit.generate_submit_scripts_with_args (parser)
elif sys.argv[2] == 'xml':
sys.argv = ["skel", "xml", "junk", "-h"]
else:
print "Unknown help topic"
print parser.description
exit(1)
#args = parse_command_line()
args, unknown = parser.parse_known_args()
# ignore .xml suffix if used (tab completion)
#if args.project and args.project.endswith (".xml"):
# args.project = args.project[:-4]
if args.subcommand == 'install':
return 0
if args.subcommand == 'template':
skel_template.fill_template (parser)
return 0
if args.subcommand == 'xml':
skel_xml.create_skel_xml (parser)
return 0
if args.subcommand == 'replay':
skel_replay.do_replay_with_args (parser)
return 0
if args.subcommand == 'suite':
skel_suite.gen_suite_with_args (parser)
return 0
# Decided to push this further down rather than deal with increasingly
# complicated landscape of which subcommands do or don't require
# a project or an xml file.
#try:
# config = adios.adiosConfig (args.project + '_skel.xml')
#except (IOError):
# print "XXError reading " + args.project + "_skel.xml. Try running skel xml " + args.project + " first."
# return 1
if args.subcommand == 'params':
#outfilename = args.project + '_params.xml'
# Only proceed if outfilename does not already exist.
#if os.path.exists (outfilename):
#print "%s exists, aborting. Delete the file or use -f to overwrite." % outfilename
#return 999
#skel_params.generate_param_file (args.project, outfilename, config, args.group)
skel_params.generate_param_file_with_args (parser)
return 0
if args.subcommand == 'source':
#skel_source.create_sources (params, config, args.project)
skel_source.create_sources_with_args (parser)
return 0
if args.subcommand == 'makefile':
#skel_makefile.generate_makefiles (params, config)
skel_makefile.generate_makefiles_with_args (parser)
return 0
if args.subcommand == 'submit':
#skel_submit.generate_submit_scripts (params)
skel_submit.generate_submit_scripts_with_args (parser)
return 0
# Unrecognized subcommand, print the help message
print parser.description
return 0
if __name__ == "__main__":
main()
|