--- /dev/null
+
+FC=g77
+
+KERNEL_ROOT_DIR=/local/chris/SALOME2/RELEASES/Install/KERNEL_V5
+
+all:prog1 prog2
+prog1:code1.o
+ $(FC) -o prog1 code1.o -L./install/lib/salome -lfcode1Exelib
+code1.o:code1.f
+ $(FC) -c code1.f -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions
+
+prog2:code2.o
+ $(FC) -o prog2 code2.o -L./install/lib/salome -lfcode2Exelib
+code2.o:code2.f
+ $(FC) -c code2.f -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions
+
+clean:
+ rm -rf *.o prog1 prog2
--- /dev/null
+A Fortran component
+======================
+
+To build this example, modify the components.py and Makefile files
+to take into account your configuration.
+
+1- your prerequisite file
+2- your KERNEL_ROOT_DIR
+
+Then set the environment (including PYTHONPATH for YACGEN, ../.. from here)::
+
+ source <your prerequisite file>
+
+Build the code1 et code2 libraries ::
+
+ make
+
+and process components.py ::
+
+ python components.py
+
+You should get a SALOME module in source form (fcompos_SRC), its installation (Installfort) and
+a SALOME application (appli) composed of modules KERNEL, GUI, YACS and fcompos.
+
+To run a coupling:
+
+ 1. start SALOME in background : ./appli/runAppli -t
+ 2. start a SALOME session : ./appli/runSession
+ 3. start YACS coupler with coupling file : driver coupling.xml
+ 4. examine output files in /tmp
+ 5. shutdown SALOME : shutdowSalome.py
+ 6. exit session : CTRL-D (or exit)
--- /dev/null
+ PROGRAM P
+ CALL YACSINIT()
+ END
+
+ SUBROUTINE SERV1(compo,a,b,c)
+ include 'calcium.hf'
+ integer compo(2)
+ real*8 tt,a,b,c
+ write(6,*)a,b
+ tt=125.45
+ CALL cpeDB(compo,CP_ITERATION,0.,1,'PARAM',1,tt,info)
+ write(6,*)'info=',info
+ c=a+b
+ return
+ end
--- /dev/null
+ PROGRAM P
+ CALL YACSINIT()
+ END
+
+ SUBROUTINE SERV1(compo,a,b,c)
+ include 'calcium.hf'
+ integer compo(2),nval
+ real*8 tt,t0,t1,a,b,c
+ write(6,*)a,b
+ CALL cplDB(compo,CP_ITERATION,t0,t1,1,'PARAM',1,nval,tt,info)
+ write(6,*)'info=',info
+ write(6,*)'tt=',tt
+ c=a+b
+ return
+ end
--- /dev/null
+import os
+from module_generator import Generator,Module,Service,F77Component
+
+context={'update':1,
+ "prerequisites":"/local/cchris/.packages.d/envSalome50",
+ "kernel":"/local/chris/SALOME2/RELEASES/Install/KERNEL_V5",
+ }
+
+cwd=os.getcwd()
+
+c1=F77Component("fcode1", services=[Service("serv1",inport=[("a","double"),("b","double")],
+ outport=[("c","double")],
+ outstream=[("PARAM","CALCIUM_double","I")],), ],
+ kind="exe",
+ exe_path=os.path.join(cwd,"prog1"),
+ )
+c2=F77Component("fcode2", services=[Service("serv1",inport=[("a","double"),("b","double")],
+ outport=[("c","double")],
+ instream=[("PARAM","CALCIUM_double","I")],), ],
+ kind="exe",
+ exe_path=os.path.join(cwd,"prog2"),
+ )
+
+g=Generator(Module("fcompos",components=[c1,c2],prefix="./install"),context)
+g.generate()
+g.bootstrap()
+g.configure()
+g.make()
+g.install()
+g.make_appli("appli",restrict=["KERNEL","GUI","YACS"])
+
--- /dev/null
+
+<proc>
+
+<!-- types -->
+
+
+<container name="A">
+</container>
+
+<container name="B">
+</container>
+
+<service name="node1" >
+ <component>fcode1</component>
+ <method>serv1</method>
+ <load container="A"/>
+ <inport name="a" type="double"/>
+ <inport name="b" type="double"/>
+ <outport name="c" type="double"/>
+ <outstream name="PARAM" type="CALCIUM_double"/>
+</service>
+
+<service name="node2" >
+ <component>fcode2</component>
+ <method>serv1</method>
+ <load container="B"/>
+ <inport name="a" type="double"/>
+ <inport name="b" type="double"/>
+ <outport name="c" type="double"/>
+ <instream name="PARAM" type="CALCIUM_double"/>
+</service>
+
+
+<!--datalinks -->
+<stream>
+ <fromnode>node1</fromnode><fromport>PARAM</fromport>
+ <tonode>node2</tonode><toport>PARAM</toport>
+</stream>
+
+<parameter>
+ <tonode>node1</tonode> <toport>a</toport>
+ <value><double>23</double> </value>
+</parameter>
+<parameter>
+ <tonode>node1</tonode> <toport>b</toport>
+ <value><double>53</double> </value>
+</parameter>
+<parameter>
+ <tonode>node2</tonode> <toport>a</toport>
+ <value><double>63</double> </value>
+</parameter>
+<parameter>
+ <tonode>node2</tonode> <toport>b</toport>
+ <value><double>73</double> </value>
+</parameter>
+
+
+</proc>
+