A Code_Aster component dynamically loadable
===============================================
-To build this example, modify the files components.py, fcompo/Makefile, myaster/Makefile
+To build this example, modify the files ../context.py, ../makefile.inc, fcompo/Makefile, myaster/Makefile
to take into account your configuration.
1- your prerequisite file
2- your KERNEL_ROOT_DIR
3- your Code_Aster installation
+4- your FORTRAN compiler
-Then set the environment (including PYTHONPATH for YACGEN, ../.. from here and execute components.py ::
+Then set the environment (including PYTHONPATH for YACSGEN, ../.. from here)::
source <your prerequisite file>
python components.py
-You should get a SALOME module in source form (pycompos_SRC), its installation (install) and
-a SALOME application (appli) composed of modules KERNEL, GUI, YACS and pycompos.
+You should get a SALOME module in source form (astmod_SRC), its installation (install) and
+a SALOME application (appli) composed of modules KERNEL, GUI, YACS and the new module astmod.
To run a coupling:
],
aster_dir=aster_root,
python_path=[myasterdir],
- argv=["-memjeveux","4",'-rep_outils','/local/chris/ASTER/instals/outils'],
+ argv=["-memjeveux","4",'-rep_outils',os.path.join(aster_home,'outils')],
)
c2=F77Component("cfort",services=[
-FC=gfortran
+include ../../makefile.inc
-KERNEL_ROOT_DIR=/local/cchris/Salome/Install/KERNEL_V5
+FC=gfortran
KERNEL_LIBS= -L$(KERNEL_ROOT_DIR)/lib/salome -lCalciumC -lSalomeDSCSuperv -lSalomeDSCContainer -lSalomeDatastream -lSalomeDSCSupervBasic
-#ASTER
-ASTER_ROOT=/local/chris/ASTER/instals
-#SALOME
-KERNEL_ROOT_DIR=/local/chris/SALOME2/RELEASES/Install/KERNEL_V5
+include ../../makefile.inc
-
-ASTER_INSTALL=$(ASTER_ROOT)/NEW9
+ASTER_INSTALL=$(ASTER_ROOT)/$(ASTER_VERSION)
ASTER_PUB=$(ASTER_ROOT)/public
ASTER_OUTILS=$(ASTER_ROOT)/outils
ASTER_LIBS = -L$(ASTER_INSTALL)/lib -laster \
-L$(ASTER_PUB)/scotch_4.0/bin -lscotch -lscotcherr \
- -L/local/chris/pkg/med23/install/lib -lmed \
+ -L/local/chris/pkg/med23/install/lib -lmed \
-lferm -llapack -lhdf5
KERNEL_INCLUDES=-I$(KERNEL_ROOT_DIR)/include/salome
KERNEL_LIBS= -L$(KERNEL_ROOT_DIR)/lib/salome -lCalciumC -lSalomeDSCSuperv -lSalomeDSCContainer \
-lSalomeDatastream -lSalomeDSCSupervBasic -Wl,--rpath -Wl,$(KERNEL_ROOT_DIR)/lib/salome
-FC=g77
-LD=g77
+FC=gfortran
+LD=gfortran
FFLAGS=
CC=gcc
SOURCES= src/op0078.f src/op0189.f src/op0181.f
cp -rf commande/cata.py* bibpyt/Cata
commande/cata.py:$(CATAPY)
- ./make_cata $(ASTER_ROOT)/ASTK/ASTK_SERV/bin/as_run
+ ./make_cata $(ASTER_ROOT)/ASTK/ASTK_SERV/bin/as_run $(ASTER_VERSION)
astermodule:astermodule.so pyth
cp -rf astermodule.so bibpyt
cat >make-cmd << END
P debug nodebug
P mode interactif
-P version NEW9
+P version $2
P ncpus 1
A args
A memjeveux 16.0
A Code_Aster standalone component (in executable form)
===========================================================
-To build this example, modify the files components.py, fcompo/Makefile, myaster/config.txt, myaster/Makefile
+To build this example, modify the files ../context.py, ../makefile.inc, fcompo/Makefile, myaster/config.txt, myaster/Makefile
to take into account your configuration.
1- your prerequisite file
2- your KERNEL_ROOT_DIR
3- your Code_Aster installation
+4- your FORTRAN compiler
-Then set the environment (including PYTHONPATH for YACGEN, ../.. from here and execute components.py ::
+Then set the environment (including PYTHONPATH for YACSGEN, ../.. from here)::
source <your prerequisite file>
python components.py
-You should get a SALOME module in source form (pycompos_SRC), its installation (install) and
-a SALOME application (appli) composed of modules KERNEL, GUI, YACS and astmod_SRC.
+You should get a SALOME module in source form (astmod_SRC), its installation (install) and
+a SALOME application (appli) composed of modules KERNEL, GUI, YACS and the new module astmod_SRC.
-Build the fcompo library ::
+Build the fcompo executable, under the SALOME application environment::
cd fcompo
- make
+ ../appli/runSession make
-Build the Code_Aster library ::
+Build the Code_Aster executable ::
cd myaster
make
+Modify the exeaster script that drives the ASTER execution (change the files path)
+
To run a coupling:
1. start SALOME in background : ./appli/runAppli -t
-FC=gfortran
+include ../../makefile.inc
-KERNEL_ROOT_DIR=/local/cchris/Salome/Install/KERNEL_V5
+FC=gfortran
all:prog
prog:compo.o
-#ASTER
-ASTER_ROOT=/local/cchris/Aster/V10/Install
+include ../../makefile.inc
aster.exe:
- ./make_exec
+ ./make_exec $(ASTER_ROOT) $(ASTER_VERSION)
clean:
rm -rf commande aster.exe make-exe
cat >make-exe << END
P actions make_exec
P actions make_cmde
-P version STA10.0
+P version $2
P nomjob forma01a
P ncpus 1
A memjeveux 4.000000
R cmde ${PWD}/commande DR 0
END
-/local/cchris/Aster/V10/Install/ASTK/ASTK_SERV/bin/as_run make-exe
+$1/ASTK/ASTK_SERV/bin/as_run make-exe
A C++ component dynamically loadable
=========================================
-To build this example, modify the components.py file
+To build this example, modify the ../context.py file
to take into account your configuration.
1- your prerequisite file
python components.py
You should get a SALOME module in source form (cppcompos_SRC), its installation (install) and
-a SALOME application (appli) composed of modules KERNEL, GUI, YACS and cppcompos.
+a SALOME application (appli) composed of modules KERNEL, GUI, YACS and the new module cppcompos.
To run a coupling:
prog:prog.cxx
g++ -o prog prog.cxx -L./install/lib/salome -lcompo1Exelib
+clean:
+ rm -rf *.o prog install appli cppcompos_SRC cppcompos_SRC.bak compo1_inst_1 traceExec_proc
A C++ standalone component (executable form)
=================================================
-To build this example, modify the components.py and Makefile files
+To build this example, modify the ../context.py file
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 and execute components.py ::
+Then set the environment (including PYTHONPATH for YACSGEN, ../.. from here and execute components.py ::
source <your prerequisite file>
python components.py
You should get a SALOME module in source form (cppcompos_SRC), its installation (install) and
-a SALOME application (appli) composed of modules KERNEL, GUI, YACS and cppcompos.
+a SALOME application (appli) composed of modules KERNEL, GUI, YACS and the new module cppcompos.
-To build the standalone component, run::
+To build the standalone component (executable named prog), execute the Makefile in the SALOME application environment::
- make
+ ./appli/runSession make
To run a coupling:
-FC=gfortran
+include ../makefile.inc
-KERNEL_ROOT_DIR=/local/cchris/Salome/Install/KERNEL_V5
+FC=gfortran
all:libcode1.so libcode2.so
libcode1.so:code1.o
$(FC) -c code2.f -fPIC -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions
clean:
- rm -rf *.o *.so
+ rm -rf *.o *.so fcompos_SRC install fcompos_SRC.bak traceExec_proc appli appli.bak
A Fortran component dynamically loadable
=============================================
-To build this example, modify the components.py and Makefile files
+To build this example, modify the ../context.py, ../makefile.inc and Makefile files
to take into account your configuration.
1- your prerequisite file
2- your KERNEL_ROOT_DIR
+3- your FORTRAN compiler
-Then set the environment (including PYTHONPATH for YACGEN, ../.. from here)::
+Then set the environment (including PYTHONPATH for YACSGEN, ../.. from here)::
source <your prerequisite file>
python components.py
You should get a SALOME module in source form (fcompos_SRC), its installation (install) and
-a SALOME application (appli) composed of modules KERNEL, GUI, YACS and fcompos.
+a SALOME application (appli) composed of modules KERNEL, GUI, YACS and the new module fcompos.
To run a coupling:
c1=F77Component("fcode1", services=[Service("serv1",inport=[("a","double"),("b","double")],
outport=[("c","double")],
outstream=[("PARAM","CALCIUM_double","I")],), ],
- libs="-L%s -lcode1" % cwd)
+ libs="-L%s -lcode1" % cwd,
+ rlibs="-Wl,--rpath -Wl,%s" % cwd,
+ )
+
c2=F77Component("fcode2", services=[Service("serv1",inport=[("a","double"),("b","double")],
outport=[("c","double")],
instream=[("PARAM","CALCIUM_double","I")],), ],
-FC=gfortran
+include ../makefile.inc
-KERNEL_ROOT_DIR=/local/cchris/Salome/Install/KERNEL_V5
+FC=gfortran
all:prog1 prog2
prog1:code1.o
$(FC) -c code2.f -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions
clean:
- rm -rf *.o prog1 prog2
+ rm -rf *.o prog1 prog2 fcode1_inst_1 fcode2_inst_1 fcompos_SRC install traceExec_proc
A Fortran standalone component
=================================
-To build this example, modify the components.py and Makefile files
+To build this example, modify the ../context.py, ../makefile.inc and Makefile files
to take into account your configuration.
1- your prerequisite file
2- your KERNEL_ROOT_DIR
+3- your FORTRAN compiler
-Then set the environment (including PYTHONPATH for YACGEN, ../.. from here)::
+Then set the environment (including PYTHONPATH for YACSGEN, ../.. from here)::
source <your prerequisite file>
python components.py
You should get a SALOME module in source form (fcompos_SRC), its installation (install) and
-a SALOME application (appli) composed of modules KERNEL, GUI, YACS and fcompos.
+a SALOME application (appli) composed of modules KERNEL, GUI, YACS and the new module fcompos.
-Build the code1 et code2 executables ::
+Build the code1 et code2 executables under the SALOME application environment::
- make
+ ./appli/runSession make
To run a coupling:
--- /dev/null
+
+KERNEL_ROOT_DIR=/local/cchris/Salome/Install/KERNEL_V5
+
+ASTER_ROOT=/local/cchris/Aster/V10/Install
+ASTER_VERSION=STA10.0
A Python component dynamically loadable
===============================================
-To build this example, modify the components.py file
+To build this example, modify the ../context.py file
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 and execute components.py ::
+Then set the environment (including PYTHONPATH for YACSGEN, ../.. from here and execute components.py ::
source <your prerequisite file>
python components.py
You should get a SALOME module in source form (pycompos_SRC), its installation (install) and
-a SALOME application (appli) composed of modules KERNEL, GUI, YACS and pycompos.
+a SALOME application (appli) composed of modules KERNEL, GUI, YACS and the new module pycompos.
To run a coupling:
A Python standalone component (in executable form)
=======================================================
-To build this example, modify the components.py file
+To build this example, modify the ../context.py file
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 and execute components.py ::
+Then set the environment (including PYTHONPATH for YACSGEN, ../.. from here and execute components.py ::
source <your prerequisite file>
python components.py
You should get a SALOME module in source form (pycompos_SRC), its installation (install) and
-a SALOME application (appli) composed of modules KERNEL, GUI, YACS and pycompos.
+a SALOME application (appli) composed of modules KERNEL, GUI, YACS and the new module pycompos.
To run a coupling: