From: caremoli Date: Tue, 24 Nov 2009 09:01:01 +0000 (+0000) Subject: CCAR: update standalone ASTER component example with changes in version 5.1.3 X-Git-Tag: V5_1_3~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=af89b2d488fe6186cf494db367b481d17339e0c1;p=tools%2Fyacsgen.git CCAR: update standalone ASTER component example with changes in version 5.1.3 --- diff --git a/Examples/ast2/README.txt b/Examples/ast2/README.txt index d117e11..ae40095 100644 --- a/Examples/ast2/README.txt +++ b/Examples/ast2/README.txt @@ -17,7 +17,7 @@ process components.py :: 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 astmod_SRC. Build the fcompo library :: @@ -35,5 +35,5 @@ To run a coupling: 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 + 5. shutdown SALOME : shutdownSalome.py 6. exit session : CTRL-D (or exit) diff --git a/Examples/ast2/components.py b/Examples/ast2/components.py index 5f26dc7..d9f8970 100644 --- a/Examples/ast2/components.py +++ b/Examples/ast2/components.py @@ -4,22 +4,24 @@ import os from module_generator import Generator,Module,ASTERComponent,Service,F77Component -context={'update':1,"prerequisites":"/local/cchris/.packages.d/envSalome50", - "kernel":"/local/chris/SALOME2/RELEASES/Install/KERNEL_V5"} -aster_home="/local/chris/ASTER/instals" -aster_root=os.path.join(aster_home,"NEW9") -asrun=os.path.join(aster_home,"ASTK/ASTK_SERV/bin/as_run") +context={'update':1, + "prerequisites":"/local/cchris/.packages.d/envSalome5", + "kernel":"/local/cchris/Salome/Install/KERNEL_V5" + } + +aster_home="/local/cchris/Aster/V10/Install" +aster_version="STA10.0" + +aster_root=os.path.join(aster_home,aster_version) fcompodir=os.path.join(os.getcwd(),"fcompo") myasterdir=os.path.join(os.getcwd(),"myaster","bibpyt") + install_prefix="./install" appli_dir="appli" -export="""F exec %s D 0 -R cmde %s D 0 -""" % (os.path.join(os.getcwd(),"myaster","aster.exe"),os.path.join(os.getcwd(),"myaster","commande")) c1=ASTERComponent("caster",services=[ - Service("s1",inport=[("argv","string"),("a","double"),("b","long"),("c","string")], + Service("s1",inport=[("jdc","file"),("a","double"),("b","long"),("c","string")], outport=[("d","double")], instream=[("aa","CALCIUM_double","T"),("ab","CALCIUM_double","I"), ("ac","CALCIUM_integer","I"),("ad","CALCIUM_real","I"), @@ -30,12 +32,10 @@ c1=ASTERComponent("caster",services=[ ), ], aster_dir=aster_root, - exe_path=os.path.join(os.getcwd(),"exeaster"), - asrun=asrun, kind="exe", - export_extras=export, + exe_path=os.path.join(os.getcwd(),"exeaster"), ) - + c2=F77Component("cfort",services=[ Service("s1",inport=[("a","double"),("b","long"),("c","string")], outport=[("d","double"),("e","long"),("f","string")], diff --git a/Examples/ast2/coupling.xml b/Examples/ast2/coupling.xml index 95d944c..3625fc7 100644 --- a/Examples/ast2/coupling.xml +++ b/Examples/ast2/coupling.xml @@ -16,8 +16,7 @@ caster s1 - - + @@ -62,16 +61,6 @@ - - - - - - @@ -126,10 +115,6 @@ datainf1 node2 a - - ljdcjdc - node1 jdc - node1 a @@ -154,13 +139,8 @@ - ljdc comm - f.comm - - - - node1 argv - -memjeveux 4 + node1 jdc + f.comm diff --git a/Examples/ast2/exeaster b/Examples/ast2/exeaster new file mode 100755 index 0000000..1d35279 --- /dev/null +++ b/Examples/ast2/exeaster @@ -0,0 +1,32 @@ + +cat > temp.comm << END +END + +cat > temp.export << END +P actions make_etude +P version STA10.0 +P nomjob salome +P ncpus 1 +A memjeveux 4.000000 +P mem_aster 100 +A tpmax 60 +P memjob 32768 +P mpi_nbcpu 1 +P mpi_nbnoeud 1 +P tpsjob 1 + +P mode batch + +P soumbtc oui +P consbtc oui +F conf /local/cchris/Salome/YACSGEN/V5/YACSGEN/Examples/ast2/install/share/salome/resources/astmod/caster_config.txt D 0 +F comm $PWD/temp.comm D 1 +F exec /local/cchris/Salome/YACSGEN/V5/YACSGEN/Examples/ast2/myaster/aster.exe D 0 +R cmde /local/cchris/Salome/YACSGEN/V5/YACSGEN/Examples/ast2/myaster/commande D 0 +F mess $PWD/messages R 6 +F resu $PWD/resu R 8 +F erre $PWD/erre R 9 +END + +/local/cchris/Aster/V10/Install/ASTK/ASTK_SERV/bin/as_run temp.export + diff --git a/Examples/ast2/f.comm b/Examples/ast2/f.comm index 0a8524d..f8a7a55 100644 --- a/Examples/ast2/f.comm +++ b/Examples/ast2/f.comm @@ -1,3 +1,4 @@ +DEBUT(PAR_LOT="NON") print a,b,c YACS_INIT(COMPO=component) @@ -6,3 +7,4 @@ LECTURE_FORCE() d=36.5 +FIN() diff --git a/Examples/ast2/fcompo/Makefile b/Examples/ast2/fcompo/Makefile index fb7aa91..bcf2bba 100644 --- a/Examples/ast2/fcompo/Makefile +++ b/Examples/ast2/fcompo/Makefile @@ -1,7 +1,7 @@ -FC=g77 +FC=gfortran -KERNEL_ROOT_DIR=/local/chris/SALOME2/RELEASES/Install/KERNEL_V5 +KERNEL_ROOT_DIR=/local/cchris/Salome/Install/KERNEL_V5 all:prog prog:compo.o diff --git a/Examples/ast2/myaster/Makefile b/Examples/ast2/myaster/Makefile index 7a7ea2c..e693a08 100644 --- a/Examples/ast2/myaster/Makefile +++ b/Examples/ast2/myaster/Makefile @@ -1,7 +1,7 @@ #ASTER -ASTER_ROOT=/local/chris/ASTER/instals +ASTER_ROOT=/local/cchris/Aster/V10/Install aster.exe: - ./make_exec $(ASTER_ROOT)/ASTK/ASTK_SERV/bin/as_run + ./make_exec diff --git a/Examples/ast2/myaster/config.txt b/Examples/ast2/myaster/config.txt index b7cbc4f..d172477 100644 --- a/Examples/ast2/myaster/config.txt +++ b/Examples/ast2/myaster/config.txt @@ -12,6 +12,8 @@ # LINK : linker command # OPTL : linker options # CC : C compiler command +# DEFS : pre-processor #define commands separated by space or comma +# they will be added to all compilation options OPTx_x # OPTC_D : C compiler options using DEBUG mode # OPTC_O : C compiler options using NODEBUG mode # INCL : C include flags @@ -31,51 +33,55 @@ # REPOUT : tools directory # MAKE_SURCH_OFFI/MAKE_CAPY_OFFI : Python modules to compiling elements catalogs # CRP / CRS : tools to check source files and programming rules +# ID_PERF : a label to identify a group of machines (use by TEST_TEMPS command) # -ENV_SH | env | - | /local/chris/ASTER/instals/NEW9/profile.sh +ID_PERF | id | - | claui2c6 +# +ENV_SH | env | - | /local/cchris/Aster/V10/Install/STA10.0/profile.sh # LIB | ar | ? | /usr/bin/ar -rv # -#BIBL | python | 2.4 | -L/usr/lib/python2.4/config -lpython2.4 -BIBL | python | 2.4 | -lpython2.4 -BIBL | med | 2.3.5 | -Wl,-R -Wl,/local/chris/pkg/med235/install/lib -L/local/chris/pkg/med235/install/lib -lmed +BIBL | python | 2.4 | -lpython2.5 +BIBL | med | 2.3.5 | -Wl,-R -Wl,/local/cchris/pkg/med235/install/lib -L/local/cchris/pkg/med235/install/lib -lmed BIBL | hdf5 | 1.6.5 | -lhdf5 -BIBL | sys | ? | -Wl,--allow-multiple-definition -Wl,--export-dynamic -lieee -ldl -lpthread -lutil -lm /usr/lib/libz.a -BIBL | mpi | 2 | -lmpi -BIBL | zmat | 8.3 | -BIBL | mumps | 4.3.2 | -BIBL | scotch | 4.0 | -L/local/chris/ASTER/instals/public/scotch_4.0/bin -lscotch -lcommon -lscotcherr -lscotcherrcom -BIBL | math | ? | /usr/lib/liblapack.a /usr/lib/libblas.a /usr/lib/libg2c.a -BIBL | salome | ? | -L/local/chris/SALOME2/RELEASES/Install/KERNEL_V5/lib/salome -lCalciumC -lSalomeDSCSuperv -lSalomeDSCContainer -lSalomeDatastream -lSalomeDSCSupervBasic -Wl,--rpath -Wl,/local/chris/SALOME2/RELEASES/Install/KERNEL_V5/lib/salome +BIBL | zmat | 8.4 | +BIBL | mumps | ? | /local/cchris/Aster/V10/Install/public/mumps-4.7.3/lib/libdmumps.a /local/cchris/Aster/V10/Install/public/mumps-4.7.3/lib/libzmumps.a /local/cchris/Aster/V10/Install/public/mumps-4.7.3/lib/libpord.a /local/cchris/Aster/V10/Install/public/mumps-4.7.3/libseq/libmpiseq.a +BIBL | scotch | 4.0 | +BIBL | math | ? | /usr/lib/liblapack.a /usr/lib/libblas.a /usr/lib/gcc/x86_64-linux-gnu/4.3/libgfortran.a /usr/lib/gcc/x86_64-linux-gnu/4.3/libgfortran.a +BIBL | mpi | 2 | +BIBL | c++ | ? | -L/usr/lib/gcc/x86_64-linux-gnu/4.3 -lstdc++ -lsupc++ +BIBL | sys | ? | -Wl,--allow-multiple-definition -Wl,--export-dynamic -lieee -ldl -lpthread -lutil -lm -lz +BIBL | salome | ? | -L/local/cchris/Salome/Install/KERNEL_V5/lib/salome -lCalciumC -lSalomeDSCSuperv -lSalomeDSCContainer -lSalomeDatastream -lSalomeDSCSupervBasic -Wl,--rpath -Wl,/local/cchris/Salome/Install/KERNEL_V5/lib/salome +# +DEFS | defined | ? | LINUX64 _HAVE_MUMPS # -NOBUILD | option | ? | bibfor/from_c +NOBUILD | option | ? | bibfor/from_c bibc/scotch # PYTHON | python | 2.4 | /usr/bin/python # -LINK | link | ? | /usr/bin/g77 -OPTL | link | ? | -v +LINK | link | ? | /usr/bin/gfortran +OPTL | link | ? | -fopenmp # CC | cc | ? | /usr/bin/gcc -#OPTC_D | cc | ? | -c -g -DP_LINUX -D_USE_MPI -OPTC_D | cc | ? | -c -g -DP_LINUX -#OPTC_O | cc | ? | -c -O2 -DP_LINUX -D_USE_MPI -OPTC_O | cc | ? | -c -O2 -DP_LINUX -INCL | include | ? | -I/local/chris/ASTER/instals/NEW9/bibc/include -I/usr/include/python2.4 -I/usr/include -I/usr/include/lam -I/local/chris/ASTER/instals/public/scotch_4.0/bin -# -F77 | f77 | ? | /usr/bin/g77 -OPTF_D | f77 | ? | -c -g -OPTF_O | f77 | ? | -c -O2 -I/usr/include/lam -INCLF | include | ? | -I/local/chris/SALOME2/RELEASES/Install/KERNEL_V5/include/salome -# -F90 | f90 | ? | -OPTF90_D | f90 | ? | -c -g -OPTF90_O | f90 | ? | -c -O2 -INCLF90 | include | ? | +OPTC_D | cc | ? | -c -g -fno-stack-protector +OPTC_O | cc | ? | -c -O2 -fno-stack-protector +INCL | include | ? | -I/local/cchris/Aster/V10/Install/STA10.0/bibc/include -I/usr/include/python2.5 -I/local/cchris/Aster/V10/Install/public/hdf5-1.6.5/include +# +F77 | f77 | ? | /usr/bin/gfortran +OPTF_D | f77 | ? | -c -g -fopenmp -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8 +OPTF_O | f77 | ? | -c -O2 -fopenmp -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8 +INCLF | include | ? | -I/local/cchris/Salome/Install/KERNEL_V5/include/salome +# +F90 | f90 | ? | /usr/bin/gfortran +OPTF90_D | f90 | ? | -c -g -ffixed-line-length-0 -x f77-cpp-input -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8 +OPTF90_O | f90 | ? | -c -O2 -ffixed-line-length-0 -x f77-cpp-input -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8 +INCLF90 | include | ? | -I/local/cchris/Aster/V10/Install/STA10.0/bibf90/include_mumps-4.7.3 # G77_AGLA | g77 | ? | unused # SRCFOR | src | 11-04 | bibfor -#SRCF90 | src | 11-04 | bibf90 +#Comment following line if you have no f90 compiler +SRCF90 | src | 11-04 | bibf90 SRCFERM | src | 11-04 | fermetur SRCC | src | 11-04 | bibc SRCPY | src | 11-04 | bibpyt @@ -107,22 +113,26 @@ ARGEXE | exec | 03-02 | -eficas_path ./Python MAKE_SURCH_OFFI | build | 11-04 | Lecture_Cata_Ele/make_surch_offi.py MAKE_CAPY_OFFI | build | 11-04 | Lecture_Cata_Ele/make_capy_offi.py # -REPOUT | exec | 11-04 | /local/chris/ASTER/instals/outils -REPMAT | exec | 02-05 | /local/chris/ASTER/instals/NEW9/materiau -REPDEX | exec | 02-05 | /local/chris/ASTER/instals/NEW9/datg +REPOUT | exec | 11-04 | /local/cchris/Aster/V10/Install/outils +REPMAT | exec | 02-05 | /local/cchris/Aster/V10/Install/STA10.0/materiau +REPDEX | exec | 02-05 | /local/cchris/Aster/V10/Install/STA10.0/datg # SUPERV | exec | 03-02 | Accas SUPERV | exec | 03-02 | Build +SUPERV | exec | 03-02 | Comportement SUPERV | exec | 03-02 | Execution +SUPERV | exec | 03-02 | Intranet SUPERV | exec | 03-02 | Macro -SUPERV | exec | 03-02 | Messages +SUPERV | exec | 12-06 | Meidee +SUPERV | exec | 09-06 | Messages SUPERV | exec | 03-02 | Noyau -SUPERV | exec | 03-02 | Stanley +SUPERV | exec | 05-04 | Outils +SUPERV | exec | 01-07 | SD +SUPERV | exec | 01-03 | Stanley SUPERV | exec | 03-02 | Utilitai SUPERV | exec | 03-02 | Validation # GZIP | tool | ? | ?GZIP? -CRP | tool | ? | /local/chris/ASTER/instals/outils/CRPCRS/crp_aster.sh -CRS | tool | ? | /local/chris/ASTER/instals/outils/CRPCRS/crs.sh # I18N | i18n | - | + diff --git a/Examples/ast2/myaster/make_exec b/Examples/ast2/myaster/make_exec index 351c97a..ae00fde 100755 --- a/Examples/ast2/myaster/make_exec +++ b/Examples/ast2/myaster/make_exec @@ -1,8 +1,9 @@ #!/bin/sh + cat >make-exe << END P actions make_exec P actions make_cmde -P version NEW9 +P version STA10.0 P nomjob forma01a P ncpus 1 A memjeveux 4.000000 @@ -23,5 +24,4 @@ R capy ${PWD}/catalo D 0 R cmde ${PWD}/commande DR 0 END - -$1 make-exe +/local/cchris/Aster/V10/Install/ASTK/ASTK_SERV/bin/as_run make-exe