1 # -*- coding: utf-8 -*-
3 from module_generator import Generator,Module,Service
4 from module_generator import MPIComponent
5 from module_generator import Library
7 SALOME_ROOT=os.getenv("SALOME_DIR")
8 prerequis_file=os.path.join(SALOME_ROOT, "salome_prerequisites.sh")
10 kernel_root_dir=os.getenv("KERNEL_ROOT_DIR")
11 gui_root_dir=os.getenv("GUI_ROOT_DIR")
12 yacs_root_dir=os.getenv("YACS_ROOT_DIR")
16 "prerequisites":prerequis_file,
17 "kernel":kernel_root_dir
22 # PUT HERE DEFINITIONS OF THE COMPONENTS AND THE SERVICES
25 res_val = myinstance.mympi_funct(in_val);
31 service_s = Service("mpifunc",
32 inport=[("in_val", "long")],
33 outport=[("res_val", "long")],
38 mpilib_root_path = os.path.join(cwd, "mpilib")
39 mpilib_include_path = os.path.join(mpilib_root_path, "include")
40 mpilib_lib_path = os.path.join(mpilib_root_path, "lib")
46 compo=MPIComponent("mycompoMpi",
49 libs=[Library(name="mylibmpi", path=mpilib_lib_path)],
50 rlibs=mpilib_lib_path,
51 includes=mpilib_include_path,
54 g=Generator(Module("mymodule",components=[compo],prefix="./install"),context)
60 restrict=["KERNEL","GUI","YACS","JOBMANAGER"],
61 sys_modules=SYS_MODULES)