Exemple #1
0
    def build_worker(self):

        path = os.path.abspath(get_path_to_results())
        codefile = os.path.join(path, "code.o")
        interfacefile = os.path.join(path, "interface.o")
        self.exefile = os.path.join(path, "c_worker")

        compile_tools.cxx_compile(codefile, codestring)

        uc = create_c.GenerateACHeaderStringFromASpecificationClass()
        uc.specification_class = TestCode
        uc.make_extern_c = False
        header = uc.result

        uc = create_c.GenerateACSourcecodeStringFromASpecificationClass()
        uc.specification_class = TestCode
        uc.needs_mpi = False
        code = uc.result

        string = '\n\n'.join([header, code])

        #print string

        compile_tools.cxx_compile(interfacefile,
                                  string,
                                  extra_args=['-I', path])
        compile_tools.c_build(self.exefile, [interfacefile, codefile])
    def build_worker(self):

        path = os.path.abspath(self.get_path_to_results())
        codefile = os.path.join(path, "code.o")
        headerfile = os.path.join(path, "worker_code.h")
        interfacefile = os.path.join(path, "interface.o")
        self.exefile = os.path.join(path, "c_worker")

        compile_tools.c_compile(codefile, codestring)

        uc = create_c.GenerateACHeaderStringFromASpecificationClass()
        uc.specification_class = ForTestingInterface
        uc.needs_mpi = False
        header = uc.result

        with open(headerfile, "w") as f:
            f.write(header)

        uc = create_c.GenerateACSourcecodeStringFromASpecificationClass()
        uc.specification_class = ForTestingInterface
        uc.needs_mpi = False
        code = uc.result

        compile_tools.cxx_compile(interfacefile, code, extra_args=['-I', path])
        compile_tools.c_build(self.exefile, [interfacefile, codefile])
    def build_worker(self):
        
        path = os.path.abspath(self.get_path_to_results())
        codefile = os.path.join(path,"code.o")
        headerfile = os.path.join(path,"worker_code.h")
        interfacefile = os.path.join(path,"interface.o")
        self.exefile = os.path.join(path,"c_worker")
        
        compile_tools.c_compile(codefile, codestring)
        
        uc = create_c.GenerateACHeaderStringFromASpecificationClass()
        uc.specification_class = ForTestingInterface
        uc.needs_mpi = False
        header =  uc.result

        with open(headerfile, "w") as f:
            f.write(header)
        
        uc = create_c.GenerateACSourcecodeStringFromASpecificationClass()
        uc.specification_class = ForTestingInterface
        uc.needs_mpi = False
        code =  uc.result

        compile_tools.cxx_compile(interfacefile, code,extra_args=['-I', path])
        compile_tools.c_build(self.exefile, [interfacefile, codefile] )
    def build_worker(self):
        path = os.path.abspath(self.get_path_to_results())
        codefile = os.path.join(path, "code.o")
        interfacefile = os.path.join(path, "interface.o")
        self.exefile = os.path.join(path, "c_worker")

        compile_tools.c_compile(codefile, codestring)

        uc = create_c.GenerateACHeaderStringFromASpecificationClass()
        uc.specification_class = ForTestingInterface
        uc.needs_mpi = False
        header = uc.result

        uc = create_c.GenerateACSourcecodeStringFromASpecificationClass()
        uc.specification_class = ForTestingInterface
        uc.needs_mpi = False
        code = uc.result

        string = '\n\n'.join([header, code])

        compile_tools.cxx_compile(interfacefile, string)
        compile_tools.c_build(self.exefile, [interfacefile, codefile])