예제 #1
0
    def test_pipeline(self):
        if self.process_filename is None:
            return

        temp_dir = tempfile.gettempdir()
        process_list = ProcessList()
        process_list.populate_process_list(self.process_filename)

        first_plugin = pu.load_plugin(process_list.process_list[0]['id'])
        input_data = tu.get_appropriate_input_data(first_plugin)[0]

        try :
            process.run_process_list(input_data, process_list, temp_dir)
        except ImportError as e:
            print("Failed to run plugin test as libraries not available (%s), passing test" % (e))
            pass
예제 #2
0
    def test_pipeline(self):
        if self.process_filename is None:
            return

        temp_dir = tempfile.gettempdir()
        process_list = ProcessList()
        process_list.populate_process_list(self.process_filename)

        first_plugin = pu.load_plugin(process_list.process_list[0]['id'])
        input_data = tu.get_appropriate_input_data(first_plugin)[0]

        try:
            process.run_process_list(input_data, process_list, temp_dir)
        except ImportError as e:
            print(
                "Failed to run plugin test as libraries not available (%s), passing test"
                % (e))
            pass
예제 #3
0
class Content(object):

    def __init__(self, filename):
        self.process_list = ProcessList()
        if os.path.exists(filename):
            print "Opening file %s" % (filename)
            self.process_list.populate_process_list(filename)

    def display(self):
        print self.process_list.get_string()

    def save(self, filename):
        self.process_list.save_list_to_file(filename)

    def modify(self, element, subelement, value):
        data_elements = self.process_list.process_list[element-1]['data']
        if subelement in data_elements.keys():
            data_elements[subelement] = value
        else:
            print("Sorry, element %i does not have a %s parameter" %
                  (element, subelement))

    def insert(self, plugin, pos):
        process = {}
        process['name'] = plugin.name
        process['id'] = "savu.plugins." + plugin.__module__
        process['data'] = plugin.parameters
        self.process_list.process_list.insert(pos, process)

    def remove(self, pos):
        self.process_list.process_list.pop(pos)
예제 #4
0
    logging.debug("Rank : %i - Size : %i", RANK, SIZE)

    IP = socket.gethostbyname(socket.gethostname())

    logging.debug("ip address is : %s", IP)

    call_mpi_barrier()

    logging.debug("LD_LIBRARY_PATH is %s", os.getenv('LD_LIBRARY_PATH'))

    call_mpi_barrier()

    process_filename = args[1]

    process_list = ProcessList()
    process_list.populate_process_list(process_filename)

    input_data = pu.load_raw_data(args[0])

    process.run_process_list(input_data,
                             process_list,
                             args[2],
                             mpi=True,
                             processes=ALL_PROCESSES,
                             process=RANK)

    call_mpi_barrier()

    logging.info("Python MPI script complete")
예제 #5
0
 def __init__(self, filename):
     self.process_list = ProcessList()
     if os.path.exists(filename):
         print "Opening file %s" % (filename)
         self.process_list.populate_process_list(filename)
예제 #6
0
    MPI.COMM_WORLD.barrier()

    logging.info("Starting the test process")

    logging.debug("Rank : %i - Size : %i", RANK, SIZE)

    IP = socket.gethostbyname(socket.gethostname())

    logging.debug("ip address is : %s", IP)

    MPI.COMM_WORLD.barrier()

    import os
    logging.debug(os.getenv('LD_LIBRARY_PATH'))

    MPI.COMM_WORLD.barrier()

    process_filename = tu.get_test_data_path(options.process_filename)

    process_list = ProcessList()
    process_list.populate_process_list(process_filename)

    first_plugin = pu.load_plugin(process_list.process_list[0]['id'])
    input_data = tu.get_appropriate_input_data(first_plugin)[0]

    process.run_process_list(input_data, process_list, options.directory,
                             mpi=True, processes=ALL_PROCESSES,
                             process=RANK)

    MPI.COMM_WORLD.barrier()