コード例 #1
0
ファイル: skel_source.py プロジェクト: Dumbear/ADIOS
def create_source_from_xml (args, config):

    try:
        params = skelconf.skelConfig (args.project + '_params.xml')
    except (IOError):
        print "Error reading " + args.project + "_params.xml. Try running skel params " + args.project + " first,"
        print "then check that " + args.project + "_params.xml exists."
        return  

    # Determine the target language
    if config.host_language == "C" or config.host_language =="c":
        generate = generate_c
        filetype = ".c"
    else:
        generate = generate_fortran
        filetype = ".f90"

    # Produce all of the Fortran files
    for batch in params.get_batches():
        for test in batch.get_tests():

            # Determine outfile name
            extension = '_skel_' + test.get_group_name()
            outfilename = args.project + extension + filetype

            generate (outfilename, config, params, test)
コード例 #2
0
def create_source_from_xml(args, config):

    try:
        params = skelconf.skelConfig(args.project + '_params.xml')
    except (IOError):
        print("Error reading " + args.project +
              "_params.xml. Try running skel params " + args.project +
              " first,")
        print("then check that " + args.project + "_params.xml exists.")
        return

    # Determine the target language
    if config.host_language == "C" or config.host_language == "c":
        generate = generate_c
        filetype = ".c"
    else:
        generate = generate_fortran
        filetype = ".f90"

    # Produce all of the Fortran files
    for batch in params.get_batches():
        for test in batch.get_tests():

            # Determine outfile name
            extension = '_skel_' + test.get_group_name()
            outfilename = args.project + extension + filetype

            generate(outfilename, config, params, test)
コード例 #3
0
def main(argv=None):

    skel_settings.create_settings_dir_if_needed()

    args = parse_command_line()

    config = adios.adiosConfig(args.project + '_skel.xml')
    params = skelconf.skelConfig(args.project + '_params.xml')

    create_sources(params, config, args.project)
コード例 #4
0
ファイル: skel_source.py プロジェクト: Dumbear/ADIOS
def main(argv=None):

    skel_settings.create_settings_dir_if_needed()

    args = parse_command_line()

    config = adios.adiosConfig (args.project + '_skel.xml')
    params = skelconf.skelConfig (args.project + '_params.xml')

    create_sources (params, config, args.project)
コード例 #5
0
ファイル: skel_submit.py プロジェクト: icedwater/ADIOS
def main(argv=None):

    skel_settings.create_settings_dir_if_needed()
    
    args = parse_command_line()

    config = adios.adiosConfig (args.project + '_skel.xml')
    params = skelconf.skelConfig (args.project + '_params.xml')

    #generate_makefiles_c (params)
    generate_submit_scripts_from_xml (params)
コード例 #6
0
ファイル: skel_submit.py プロジェクト: zeneofa/ADIOS
def main(argv=None):

    skel_settings.create_settings_dir_if_needed()
    
    args = parse_command_line()

    config = adios.adiosConfig (args.project + '_skel.xml')
    params = skelconf.skelConfig (args.project + '_params.xml')

    #generate_makefiles_c (params)
    generate_submit_scripts_from_xml (params)
コード例 #7
0
ファイル: skel_makefile.py プロジェクト: icedwater/ADIOS
def generate_makefiles_with_args (config, parent_parser):
    args = pparse_command_line (parent_parser)

    if args.yamlfile:
        generate_makefile_from_yaml (args)
    else:

        try:
            params = skelconf.skelConfig (args.project + '_params.xml')
        except (IOError):
            print "Error reading " + args.project + "_params.xml. Try running skel params " + args.project + " first,"
            print "then check that " + args.project + "_params.xml exists."
            return

        generate_makefiles (params, config)
コード例 #8
0
ファイル: skel_submit.py プロジェクト: icedwater/ADIOS
def generate_submit_scripts_with_args (parent_parser):

    args = pparse_command_line (parent_parser)

    if args.yamlfile is not None:
        generate_submit_scripts_from_yaml(args)
    else:
        try:
            params = skelconf.skelConfig (args.project + '_params.xml')
        except (IOError):
            print "Error reading " + args.project + "_params.xml. Try running skel params " + args.project + " first,"
            print "then check that " + args.project + "_params.xml exists."
            return 1

        generate_submit_scripts_from_xml (params)
コード例 #9
0
ファイル: skel_makefile.py プロジェクト: icedwater/ADIOS
def main(argv=None):

    skel_settings.create_settings_dir_if_needed()

    args = parse_command_line()

    config = adios.adiosConfig (args.project + '_skel.xml')
    params = skelconf.skelConfig (args.project + '_params.xml')

    lang = config.get_host_language ()
    if 'c' == lang or 'C' == lang:
        print 'generating C flavored Makefile'
        generate_makefiles_c (params)
    else:
        print 'generating fortran flavored Makefile'
        generate_makefiles_fortran (params)
コード例 #10
0
def main(argv=None):

    skel_settings.create_settings_dir_if_needed()

    args = parse_command_line()

    config = adios.adiosConfig(args.project + '_skel.xml')
    params = skelconf.skelConfig(args.project + '_params.xml')

    lang = config.get_host_language()
    if 'c' == lang or 'C' == lang:
        print('generating C flavored Makefile')
        generate_makefiles_c(params)
    else:
        print('generating fortran flavored Makefile')
        generate_makefiles_fortran(params)
コード例 #11
0
def generate_makefiles_with_args (parent_parser):
    args = pparse_command_line (parent_parser)

    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.yamlfile:
        generate_makefile_from_yaml (args)
    else:

        try:
            params = skelconf.skelConfig (args.project + '_params.xml')
        except (IOError):
            print "Error reading " + args.project + "_params.xml. Try running skel params " + args.project + " first,"
            print "then check that " + args.project + "_params.xml exists."
            return

        generate_makefiles (params, config)
コード例 #12
0
def generate_submit_scripts_with_args(parent_parser):

    args = pparse_command_line(parent_parser)

    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.yamlfile is not None:
        generate_submit_scripts_from_yaml(args)
    else:
        try:
            params = skelconf.skelConfig(args.project + '_params.xml')
        except (IOError):
            print("Error reading " + args.project +
                  "_params.xml. Try running skel params " + args.project +
                  " first,")
            print("then check that " + args.project + "_params.xml exists.")
            return 1

        generate_submit_scripts_from_xml(params)