summaryrefslogtreecommitdiffstats
path: root/scilab/modules
diff options
context:
space:
mode:
authorBernard HUGUENEY <bernard.hugueney@scilab.org>2010-05-26 10:01:04 +0200
committerAllan CORNET <allan.cornet@scilab.org>2010-05-27 11:57:14 +0200
commitdd47825c7d1ecff6a9518fc8e0e3e06aa1d8922a (patch)
treebfd7b0d40588231cf7878d0ccce54f95c067fc68 /scilab/modules
parentd102072bb419584ae6f3d03fc0da7943c174245f (diff)
downloadscilab-dd47825c7d1ecff6a9518fc8e0e3e06aa1d8922a.zip
scilab-dd47825c7d1ecff6a9518fc8e0e3e06aa1d8922a.tar.gz
module parallel gateway (dynamic load)
Change-Id: I85286ad19063c1db030ebb92b27933462976c74f
Diffstat (limited to 'scilab/modules')
-rw-r--r--scilab/modules/Makefile.am8
-rw-r--r--scilab/modules/Makefile.in10
-rw-r--r--scilab/modules/action_binding/Makefile.in1
-rw-r--r--scilab/modules/api_scilab/Makefile.in1
-rw-r--r--scilab/modules/arnoldi/Makefile.in1
-rw-r--r--scilab/modules/atoms/Makefile.in1
-rw-r--r--scilab/modules/boolean/Makefile.in1
-rw-r--r--scilab/modules/cacsd/Makefile.in1
-rw-r--r--scilab/modules/call_scilab/Makefile.in1
-rw-r--r--scilab/modules/compatibility_functions/Makefile.in1
-rw-r--r--scilab/modules/completion/Makefile.in1
-rw-r--r--scilab/modules/console/Makefile.in1
-rw-r--r--scilab/modules/core/Makefile.in1
-rw-r--r--scilab/modules/core/includes/callinterf.h2
-rw-r--r--scilab/modules/core/sci_gateway/core_gateway.xml1
-rw-r--r--scilab/modules/core/src/c/callinterf.c6
-rw-r--r--scilab/modules/core/src/c/dynamic_gateways.c19
-rw-r--r--scilab/modules/core/src/c/dynamic_gateways.h7
-rw-r--r--scilab/modules/data_structures/Makefile.in1
-rw-r--r--scilab/modules/demo_tools/Makefile.in1
-rw-r--r--scilab/modules/development_tools/Makefile.in1
-rw-r--r--scilab/modules/development_tools/src/fake/Makefile.in1
-rw-r--r--scilab/modules/differential_equations/Makefile.in1
-rw-r--r--scilab/modules/double/Makefile.in1
-rw-r--r--scilab/modules/dynamic_link/Makefile.in1
-rw-r--r--scilab/modules/elementary_functions/Makefile.in1
-rw-r--r--scilab/modules/fftw/Makefile.in1
-rw-r--r--scilab/modules/fileio/Makefile.in1
-rw-r--r--scilab/modules/functions/Makefile.in1
-rw-r--r--scilab/modules/genetic_algorithms/Makefile.in1
-rw-r--r--scilab/modules/graph/Makefile.in1
-rw-r--r--scilab/modules/graphic_export/Makefile.in1
-rw-r--r--scilab/modules/graphics/Makefile.in1
-rw-r--r--scilab/modules/gui/Makefile.in1
-rw-r--r--scilab/modules/hdf5/Makefile.in1
-rw-r--r--scilab/modules/helptools/Makefile.in1
-rw-r--r--scilab/modules/history_manager/Makefile.in1
-rw-r--r--scilab/modules/integer/Makefile.in1
-rw-r--r--scilab/modules/interpolation/Makefile.in1
-rw-r--r--scilab/modules/intersci/Makefile.in1
-rw-r--r--scilab/modules/io/Makefile.in1
-rw-r--r--scilab/modules/javasci/Makefile.in1
-rw-r--r--scilab/modules/jvm/Makefile.in1
-rw-r--r--scilab/modules/linear_algebra/Makefile.in1
-rw-r--r--scilab/modules/localization/Makefile.in1
-rw-r--r--scilab/modules/m2sci/Makefile.in1
-rw-r--r--scilab/modules/maple2scilab/Makefile.in1
-rw-r--r--scilab/modules/matio/Makefile.in1
-rw-r--r--scilab/modules/mexlib/Makefile.in1
-rw-r--r--scilab/modules/optimization/Makefile.in1
-rw-r--r--scilab/modules/output_stream/Makefile.in1
-rw-r--r--scilab/modules/overloading/Makefile.in1
-rw-r--r--scilab/modules/parallel/Makefile.am69
-rw-r--r--scilab/modules/parallel/Makefile.in1144
-rw-r--r--scilab/modules/parallel/etc/parallel.quit8
-rw-r--r--scilab/modules/parallel/etc/parallel.start8
-rw-r--r--scilab/modules/parallel/help/en_US/addchapter.sce11
-rw-r--r--scilab/modules/parallel/help/en_US/parallel_run.xml621
-rw-r--r--scilab/modules/parallel/help/fr_FR/addchapter.sce11
-rw-r--r--scilab/modules/parallel/help/pt_BR/addchapter.sce11
-rw-r--r--scilab/modules/parallel/includes/dynlib_parallel.h28
-rw-r--r--scilab/modules/parallel/includes/gw_parallel.h22
-rw-r--r--scilab/modules/parallel/license.txt9
-rw-r--r--scilab/modules/parallel/macros/buildmacros.bat11
-rw-r--r--scilab/modules/parallel/macros/buildmacros.sce17
-rw-r--r--scilab/modules/parallel/macros/cleanmacros.bat13
-rw-r--r--scilab/modules/parallel/parallel.iss43
-rw-r--r--scilab/modules/parallel/readme.txt1
-rw-r--r--scilab/modules/parallel/sci_gateway/c/gw_parallel.c38
-rw-r--r--scilab/modules/parallel/sci_gateway/cpp/sci_parallel_run.cpp871
-rw-r--r--scilab/modules/parallel/sci_gateway/parallel_gateway.xml26
-rw-r--r--scilab/modules/parallel/src/c/DllmainParallel.c33
-rw-r--r--scilab/modules/parallel/src/c/LibScilab_Import.def18
-rw-r--r--scilab/modules/parallel/src/c/parallel.rc96
-rw-r--r--scilab/modules/parallel/src/c/parallel.vcproj443
-rw-r--r--scilab/modules/parallel/src/cpp/parallel_run.hxx345
-rw-r--r--scilab/modules/parallel/tests/unit_tests/parallel_run.dia.ref201
-rw-r--r--scilab/modules/parallel/tests/unit_tests/parallel_run.tst260
-rw-r--r--scilab/modules/parallel/version.xml11
-rw-r--r--scilab/modules/parameters/Makefile.in1
-rw-r--r--scilab/modules/polynomials/Makefile.in1
-rw-r--r--scilab/modules/pvm/Makefile.in1
-rw-r--r--scilab/modules/randlib/Makefile.in1
-rw-r--r--scilab/modules/renderer/Makefile.in1
-rw-r--r--scilab/modules/scicos/Makefile.in1
-rw-r--r--scilab/modules/scicos_blocks/Makefile.in1
-rw-r--r--scilab/modules/shell/Makefile.in1
-rw-r--r--scilab/modules/signal_processing/Makefile.in1
-rw-r--r--scilab/modules/simulated_annealing/Makefile.in1
-rw-r--r--scilab/modules/sound/Makefile.in1
-rw-r--r--scilab/modules/sparse/Makefile.in1
-rw-r--r--scilab/modules/special_functions/Makefile.in1
-rw-r--r--scilab/modules/spreadsheet/Makefile.in1
-rw-r--r--scilab/modules/statistics/Makefile.in1
-rw-r--r--scilab/modules/string/Makefile.in1
-rw-r--r--scilab/modules/symbolic/Makefile.in1
-rw-r--r--scilab/modules/tclsci/Makefile.in1
-rw-r--r--scilab/modules/texmacs/Makefile.in1
-rw-r--r--scilab/modules/time/Makefile.in1
-rw-r--r--scilab/modules/types/Makefile.in1
-rw-r--r--scilab/modules/umfpack/Makefile.in1
-rw-r--r--scilab/modules/windows_tools/Makefile.in1
-rw-r--r--scilab/modules/xcos/Makefile.in1
-rw-r--r--scilab/modules/xpad/Makefile.in1
104 files changed, 4479 insertions, 13 deletions
diff --git a/scilab/modules/Makefile.am b/scilab/modules/Makefile.am
index fbcc142..51773a7 100644
--- a/scilab/modules/Makefile.am
+++ b/scilab/modules/Makefile.am
@@ -84,7 +84,8 @@ types \
84hdf5 \ 84hdf5 \
85graph\ 85graph\
86xcos \ 86xcos \
87xpad 87xpad \
88parallel
88 89
89#umfpack 90#umfpack
90 91
@@ -184,7 +185,8 @@ ENGINE_LIBS = $(top_builddir)/modules/fileio/libscifileio.la \
184 $(top_builddir)/modules/string/libscistring.la \ 185 $(top_builddir)/modules/string/libscistring.la \
185 $(top_builddir)/modules/fftw/libscifftw.la \ 186 $(top_builddir)/modules/fftw/libscifftw.la \
186 $(top_builddir)/modules/hdf5/libscihdf5.la \ 187 $(top_builddir)/modules/hdf5/libscihdf5.la \
187 $(top_builddir)/modules/functions/libscifunctions.la 188 $(top_builddir)/modules/functions/libscifunctions.la \
189 $(top_builddir)/modules/parallel/libsciparallel.la
188 190
189 191
190# These libraries are loaded dynamically from Scilab. 192# These libraries are loaded dynamically from Scilab.
@@ -203,7 +205,7 @@ ENGINE_LIBS_DYNAMIC_LOAD = \
203 $(top_builddir)/modules/spreadsheet/libscispreadsheet.la \ 205 $(top_builddir)/modules/spreadsheet/libscispreadsheet.la \
204 $(top_builddir)/modules/umfpack/libsciumfpack.la \ 206 $(top_builddir)/modules/umfpack/libsciumfpack.la \
205 $(top_builddir)/modules/matio/libscimatio.la \ 207 $(top_builddir)/modules/matio/libscimatio.la \
206 $(top_builddir)/modules/helptools/libscihelptools.la 208 $(top_builddir)/modules/helptools/libscihelptools.la
207 209
208# Core modules 210# Core modules
209libscilab_la_LIBADD = $(ENGINE_LIBS) $(OTHER_LIBS) $(EXTERNAL_LIBS) 211libscilab_la_LIBADD = $(ENGINE_LIBS) $(OTHER_LIBS) $(EXTERNAL_LIBS)
diff --git a/scilab/modules/Makefile.in b/scilab/modules/Makefile.in
index bade7d9..31fbc98 100644
--- a/scilab/modules/Makefile.in
+++ b/scilab/modules/Makefile.in
@@ -162,7 +162,7 @@ DIST_SUBDIRS = core output_stream arnoldi elementary_functions string \
162 windows_tools functions overloading maple2scilab m2sci texmacs \ 162 windows_tools functions overloading maple2scilab m2sci texmacs \
163 development_tools compatibility_functions helptools fftw \ 163 development_tools compatibility_functions helptools fftw \
164 umfpack demo_tools genetic_algorithms simulated_annealing \ 164 umfpack demo_tools genetic_algorithms simulated_annealing \
165 parameters matio atoms types hdf5 graph xcos xpad \ 165 parameters matio atoms types hdf5 graph xcos xpad parallel \
166 scicos_blocks scicos . javasci 166 scicos_blocks scicos . javasci
167DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 167DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
168am__relativize = \ 168am__relativize = \
@@ -312,6 +312,7 @@ OCAMLDEP = @OCAMLDEP@
312OCAMLLEX = @OCAMLLEX@ 312OCAMLLEX = @OCAMLLEX@
313OCAMLOPT = @OCAMLOPT@ 313OCAMLOPT = @OCAMLOPT@
314OCAMLYACC = @OCAMLYACC@ 314OCAMLYACC = @OCAMLYACC@
315OPENMP_ENABLE = @OPENMP_ENABLE@
315OTOOL = @OTOOL@ 316OTOOL = @OTOOL@
316OTOOL64 = @OTOOL64@ 317OTOOL64 = @OTOOL64@
317PACKAGE = @PACKAGE@ 318PACKAGE = @PACKAGE@
@@ -445,7 +446,7 @@ SUBDIRS = core output_stream arnoldi elementary_functions string \
445 maple2scilab m2sci texmacs development_tools \ 446 maple2scilab m2sci texmacs development_tools \
446 compatibility_functions helptools fftw umfpack demo_tools \ 447 compatibility_functions helptools fftw umfpack demo_tools \
447 genetic_algorithms simulated_annealing parameters matio atoms \ 448 genetic_algorithms simulated_annealing parameters matio atoms \
448 types hdf5 graph xcos xpad $(am__append_1) scicos . \ 449 types hdf5 graph xcos xpad parallel $(am__append_1) scicos . \
449 $(am__append_2) 450 $(am__append_2)
450 451
451#### Basic files #### 452#### Basic files ####
@@ -515,7 +516,8 @@ ENGINE_LIBS = $(top_builddir)/modules/fileio/libscifileio.la \
515 $(top_builddir)/modules/string/libscistring.la \ 516 $(top_builddir)/modules/string/libscistring.la \
516 $(top_builddir)/modules/fftw/libscifftw.la \ 517 $(top_builddir)/modules/fftw/libscifftw.la \
517 $(top_builddir)/modules/hdf5/libscihdf5.la \ 518 $(top_builddir)/modules/hdf5/libscihdf5.la \
518 $(top_builddir)/modules/functions/libscifunctions.la 519 $(top_builddir)/modules/functions/libscifunctions.la \
520 $(top_builddir)/modules/parallel/libsciparallel.la
519 521
520 522
521# These libraries are loaded dynamically from Scilab. 523# These libraries are loaded dynamically from Scilab.
@@ -534,7 +536,7 @@ ENGINE_LIBS_DYNAMIC_LOAD = \
534 $(top_builddir)/modules/spreadsheet/libscispreadsheet.la \ 536 $(top_builddir)/modules/spreadsheet/libscispreadsheet.la \
535 $(top_builddir)/modules/umfpack/libsciumfpack.la \ 537 $(top_builddir)/modules/umfpack/libsciumfpack.la \
536 $(top_builddir)/modules/matio/libscimatio.la \ 538 $(top_builddir)/modules/matio/libscimatio.la \
537 $(top_builddir)/modules/helptools/libscihelptools.la 539 $(top_builddir)/modules/helptools/libscihelptools.la
538 540
539 541
540# Core modules 542# Core modules
diff --git a/scilab/modules/action_binding/Makefile.in b/scilab/modules/action_binding/Makefile.in
index e3f6c89..32fca79 100644
--- a/scilab/modules/action_binding/Makefile.in
+++ b/scilab/modules/action_binding/Makefile.in
@@ -306,6 +306,7 @@ OCAMLDEP = @OCAMLDEP@
306OCAMLLEX = @OCAMLLEX@ 306OCAMLLEX = @OCAMLLEX@
307OCAMLOPT = @OCAMLOPT@ 307OCAMLOPT = @OCAMLOPT@
308OCAMLYACC = @OCAMLYACC@ 308OCAMLYACC = @OCAMLYACC@
309OPENMP_ENABLE = @OPENMP_ENABLE@
309OTOOL = @OTOOL@ 310OTOOL = @OTOOL@
310OTOOL64 = @OTOOL64@ 311OTOOL64 = @OTOOL64@
311PACKAGE = @PACKAGE@ 312PACKAGE = @PACKAGE@
diff --git a/scilab/modules/api_scilab/Makefile.in b/scilab/modules/api_scilab/Makefile.in
index caa17e8..fdf0c70 100644
--- a/scilab/modules/api_scilab/Makefile.in
+++ b/scilab/modules/api_scilab/Makefile.in
@@ -274,6 +274,7 @@ OCAMLDEP = @OCAMLDEP@
274OCAMLLEX = @OCAMLLEX@ 274OCAMLLEX = @OCAMLLEX@
275OCAMLOPT = @OCAMLOPT@ 275OCAMLOPT = @OCAMLOPT@
276OCAMLYACC = @OCAMLYACC@ 276OCAMLYACC = @OCAMLYACC@
277OPENMP_ENABLE = @OPENMP_ENABLE@
277OTOOL = @OTOOL@ 278OTOOL = @OTOOL@
278OTOOL64 = @OTOOL64@ 279OTOOL64 = @OTOOL64@
279PACKAGE = @PACKAGE@ 280PACKAGE = @PACKAGE@
diff --git a/scilab/modules/arnoldi/Makefile.in b/scilab/modules/arnoldi/Makefile.in
index 0eaec30..90da16a 100644
--- a/scilab/modules/arnoldi/Makefile.in
+++ b/scilab/modules/arnoldi/Makefile.in
@@ -296,6 +296,7 @@ OCAMLDEP = @OCAMLDEP@
296OCAMLLEX = @OCAMLLEX@ 296OCAMLLEX = @OCAMLLEX@
297OCAMLOPT = @OCAMLOPT@ 297OCAMLOPT = @OCAMLOPT@
298OCAMLYACC = @OCAMLYACC@ 298OCAMLYACC = @OCAMLYACC@
299OPENMP_ENABLE = @OPENMP_ENABLE@
299OTOOL = @OTOOL@ 300OTOOL = @OTOOL@
300OTOOL64 = @OTOOL64@ 301OTOOL64 = @OTOOL64@
301PACKAGE = @PACKAGE@ 302PACKAGE = @PACKAGE@
diff --git a/scilab/modules/atoms/Makefile.in b/scilab/modules/atoms/Makefile.in
index 3721c77..71b0ab9 100644
--- a/scilab/modules/atoms/Makefile.in
+++ b/scilab/modules/atoms/Makefile.in
@@ -238,6 +238,7 @@ OCAMLDEP = @OCAMLDEP@
238OCAMLLEX = @OCAMLLEX@ 238OCAMLLEX = @OCAMLLEX@
239OCAMLOPT = @OCAMLOPT@ 239OCAMLOPT = @OCAMLOPT@
240OCAMLYACC = @OCAMLYACC@ 240OCAMLYACC = @OCAMLYACC@
241OPENMP_ENABLE = @OPENMP_ENABLE@
241OTOOL = @OTOOL@ 242OTOOL = @OTOOL@
242OTOOL64 = @OTOOL64@ 243OTOOL64 = @OTOOL64@
243PACKAGE = @PACKAGE@ 244PACKAGE = @PACKAGE@
diff --git a/scilab/modules/boolean/Makefile.in b/scilab/modules/boolean/Makefile.in
index 4d0f85a..27f1ed8 100644
--- a/scilab/modules/boolean/Makefile.in
+++ b/scilab/modules/boolean/Makefile.in
@@ -275,6 +275,7 @@ OCAMLDEP = @OCAMLDEP@
275OCAMLLEX = @OCAMLLEX@ 275OCAMLLEX = @OCAMLLEX@
276OCAMLOPT = @OCAMLOPT@ 276OCAMLOPT = @OCAMLOPT@
277OCAMLYACC = @OCAMLYACC@ 277OCAMLYACC = @OCAMLYACC@
278OPENMP_ENABLE = @OPENMP_ENABLE@
278OTOOL = @OTOOL@ 279OTOOL = @OTOOL@
279OTOOL64 = @OTOOL64@ 280OTOOL64 = @OTOOL64@
280PACKAGE = @PACKAGE@ 281PACKAGE = @PACKAGE@
diff --git a/scilab/modules/cacsd/Makefile.in b/scilab/modules/cacsd/Makefile.in
index fc690662..7d5016a 100644
--- a/scilab/modules/cacsd/Makefile.in
+++ b/scilab/modules/cacsd/Makefile.in
@@ -370,6 +370,7 @@ OCAMLDEP = @OCAMLDEP@
370OCAMLLEX = @OCAMLLEX@ 370OCAMLLEX = @OCAMLLEX@
371OCAMLOPT = @OCAMLOPT@ 371OCAMLOPT = @OCAMLOPT@
372OCAMLYACC = @OCAMLYACC@ 372OCAMLYACC = @OCAMLYACC@
373OPENMP_ENABLE = @OPENMP_ENABLE@
373OTOOL = @OTOOL@ 374OTOOL = @OTOOL@
374OTOOL64 = @OTOOL64@ 375OTOOL64 = @OTOOL64@
375PACKAGE = @PACKAGE@ 376PACKAGE = @PACKAGE@
diff --git a/scilab/modules/call_scilab/Makefile.in b/scilab/modules/call_scilab/Makefile.in
index cee9a13..7011c76 100644
--- a/scilab/modules/call_scilab/Makefile.in
+++ b/scilab/modules/call_scilab/Makefile.in
@@ -271,6 +271,7 @@ OCAMLDEP = @OCAMLDEP@
271OCAMLLEX = @OCAMLLEX@ 271OCAMLLEX = @OCAMLLEX@
272OCAMLOPT = @OCAMLOPT@ 272OCAMLOPT = @OCAMLOPT@
273OCAMLYACC = @OCAMLYACC@ 273OCAMLYACC = @OCAMLYACC@
274OPENMP_ENABLE = @OPENMP_ENABLE@
274OTOOL = @OTOOL@ 275OTOOL = @OTOOL@
275OTOOL64 = @OTOOL64@ 276OTOOL64 = @OTOOL64@
276PACKAGE = @PACKAGE@ 277PACKAGE = @PACKAGE@
diff --git a/scilab/modules/compatibility_functions/Makefile.in b/scilab/modules/compatibility_functions/Makefile.in
index d36ce9c..800f7bc 100644
--- a/scilab/modules/compatibility_functions/Makefile.in
+++ b/scilab/modules/compatibility_functions/Makefile.in
@@ -235,6 +235,7 @@ OCAMLDEP = @OCAMLDEP@
235OCAMLLEX = @OCAMLLEX@ 235OCAMLLEX = @OCAMLLEX@
236OCAMLOPT = @OCAMLOPT@ 236OCAMLOPT = @OCAMLOPT@
237OCAMLYACC = @OCAMLYACC@ 237OCAMLYACC = @OCAMLYACC@
238OPENMP_ENABLE = @OPENMP_ENABLE@
238OTOOL = @OTOOL@ 239OTOOL = @OTOOL@
239OTOOL64 = @OTOOL64@ 240OTOOL64 = @OTOOL64@
240PACKAGE = @PACKAGE@ 241PACKAGE = @PACKAGE@
diff --git a/scilab/modules/completion/Makefile.in b/scilab/modules/completion/Makefile.in
index 7e2734a1..d3bc27b 100644
--- a/scilab/modules/completion/Makefile.in
+++ b/scilab/modules/completion/Makefile.in
@@ -297,6 +297,7 @@ OCAMLDEP = @OCAMLDEP@
297OCAMLLEX = @OCAMLLEX@ 297OCAMLLEX = @OCAMLLEX@
298OCAMLOPT = @OCAMLOPT@ 298OCAMLOPT = @OCAMLOPT@
299OCAMLYACC = @OCAMLYACC@ 299OCAMLYACC = @OCAMLYACC@
300OPENMP_ENABLE = @OPENMP_ENABLE@
300OTOOL = @OTOOL@ 301OTOOL = @OTOOL@
301OTOOL64 = @OTOOL64@ 302OTOOL64 = @OTOOL64@
302PACKAGE = @PACKAGE@ 303PACKAGE = @PACKAGE@
diff --git a/scilab/modules/console/Makefile.in b/scilab/modules/console/Makefile.in
index 8b4443a..7b1951a 100644
--- a/scilab/modules/console/Makefile.in
+++ b/scilab/modules/console/Makefile.in
@@ -309,6 +309,7 @@ OCAMLDEP = @OCAMLDEP@
309OCAMLLEX = @OCAMLLEX@ 309OCAMLLEX = @OCAMLLEX@
310OCAMLOPT = @OCAMLOPT@ 310OCAMLOPT = @OCAMLOPT@
311OCAMLYACC = @OCAMLYACC@ 311OCAMLYACC = @OCAMLYACC@
312OPENMP_ENABLE = @OPENMP_ENABLE@
312OTOOL = @OTOOL@ 313OTOOL = @OTOOL@
313OTOOL64 = @OTOOL64@ 314OTOOL64 = @OTOOL64@
314PACKAGE = @PACKAGE@ 315PACKAGE = @PACKAGE@
diff --git a/scilab/modules/core/Makefile.in b/scilab/modules/core/Makefile.in
index 5a3baf5..6a393a9 100644
--- a/scilab/modules/core/Makefile.in
+++ b/scilab/modules/core/Makefile.in
@@ -511,6 +511,7 @@ OCAMLDEP = @OCAMLDEP@
511OCAMLLEX = @OCAMLLEX@ 511OCAMLLEX = @OCAMLLEX@
512OCAMLOPT = @OCAMLOPT@ 512OCAMLOPT = @OCAMLOPT@
513OCAMLYACC = @OCAMLYACC@ 513OCAMLYACC = @OCAMLYACC@
514OPENMP_ENABLE = @OPENMP_ENABLE@
514OTOOL = @OTOOL@ 515OTOOL = @OTOOL@
515OTOOL64 = @OTOOL64@ 516OTOOL64 = @OTOOL64@
516PACKAGE = @PACKAGE@ 517PACKAGE = @PACKAGE@
diff --git a/scilab/modules/core/includes/callinterf.h b/scilab/modules/core/includes/callinterf.h
index 51377ce..7080ffe 100644
--- a/scilab/modules/core/includes/callinterf.h
+++ b/scilab/modules/core/includes/callinterf.h
@@ -87,6 +87,8 @@
87/* 63 */ #include "dynamic_gateways.h" /* xpad */ 87/* 63 */ #include "dynamic_gateways.h" /* xpad */
88/* 64 */ #include "dynamic_gateways.h" /* xcos */ 88/* 64 */ #include "dynamic_gateways.h" /* xcos */
89/* 65 */ #include "dynamic_gateways.h" /* action_binding */ 89/* 65 */ #include "dynamic_gateways.h" /* action_binding */
90/* 66 */ #include "dynamic_gateways.h" /* parallel */
91
90 92
91/*------------------------------------- 93/*-------------------------------------
92 * long jump to stop interface computation 94 * long jump to stop interface computation
diff --git a/scilab/modules/core/sci_gateway/core_gateway.xml b/scilab/modules/core/sci_gateway/core_gateway.xml
index b75a852..ce0cb6e 100644
--- a/scilab/modules/core/sci_gateway/core_gateway.xml
+++ b/scilab/modules/core/sci_gateway/core_gateway.xml
@@ -81,7 +81,6 @@
81 <PRIMITIVE gatewayId="13" primitiveId="51" primitiveName="getdebuginfo" /> 81 <PRIMITIVE gatewayId="13" primitiveId="51" primitiveName="getdebuginfo" />
82 <PRIMITIVE gatewayId="13" primitiveId="52" primitiveName="readgateway" /> 82 <PRIMITIVE gatewayId="13" primitiveId="52" primitiveName="readgateway" />
83 <PRIMITIVE gatewayId="13" primitiveId="53" primitiveName="exit" /> 83 <PRIMITIVE gatewayId="13" primitiveId="53" primitiveName="exit" />
84 <PRIMITIVE gatewayId="13" primitiveId="54" primitiveName="parallel_run" />
85 84
86 <PRIMITIVE gatewayId="14" primitiveId="1" primitiveName="user" /> 85 <PRIMITIVE gatewayId="14" primitiveId="1" primitiveName="user" />
87 86
diff --git a/scilab/modules/core/src/c/callinterf.c b/scilab/modules/core/src/c/callinterf.c
index 102e96f..810b461 100644
--- a/scilab/modules/core/src/c/callinterf.c
+++ b/scilab/modules/core/src/c/callinterf.c
@@ -33,7 +33,7 @@ static void sci_sigint_addinter(int n);
33 ** Watch out the positions are crutial !!! 33 ** Watch out the positions are crutial !!!
34 ** @TODO : Make this less crappy... 34 ** @TODO : Make this less crappy...
35 **/ 35 **/
36#define INTERFACES_MAX 65 36#define INTERFACES_MAX 66
37static OpTab Interfaces[INTERFACES_MAX] = { 37static OpTab Interfaces[INTERFACES_MAX] = {
38 /* 01 */ {gw_user}, /* free position may be used */ 38 /* 01 */ {gw_user}, /* free position may be used */
39 /* 02 */ {gw_linear_algebra}, 39 /* 02 */ {gw_linear_algebra},
@@ -99,7 +99,9 @@ static OpTab Interfaces[INTERFACES_MAX] = {
99 /* 62 */ {gw_dynamic_hdf5}, 99 /* 62 */ {gw_dynamic_hdf5},
100 /* 63 */ {gw_dynamic_xpad}, 100 /* 63 */ {gw_dynamic_xpad},
101 /* 64 */ {gw_dynamic_xcos}, 101 /* 64 */ {gw_dynamic_xcos},
102 /* 65 */ {gw_dynamic_action_binding} 102 /* 65 */ {gw_dynamic_action_binding},
103 /* 66 */ {gw_dynamic_parallel}
104
103}; 105};
104/*--------------------------------------------------------------------------*/ 106/*--------------------------------------------------------------------------*/
105static int sig_ok = 0; 107static int sig_ok = 0;
diff --git a/scilab/modules/core/src/c/dynamic_gateways.c b/scilab/modules/core/src/c/dynamic_gateways.c
index afa803b..fe2c7e4 100644
--- a/scilab/modules/core/src/c/dynamic_gateways.c
+++ b/scilab/modules/core/src/c/dynamic_gateways.c
@@ -361,7 +361,20 @@ int gw_dynamic_action_binding(void)
361 &ptr_gw_action_binding); 361 &ptr_gw_action_binding);
362} 362}
363/*--------------------------------------------------------------------------*/ 363/*--------------------------------------------------------------------------*/
364 364/* PARALLEL module */
365 365#define PARALLEL_MODULE_NAME "parallel"
366 366static DynLibHandle hParallelLib = NULL;
367static PROC_GATEWAY ptr_gw_parallel = NULL;
368static char* dynlibname_parallel = NULL;
369static char* gatewayname_parallel = NULL;
370/*--------------------------------------------------------------------------*/
371int gw_dynamic_parallel(void)
372{
373 return gw_dynamic_generic(PARALLEL_MODULE_NAME,
374 &dynlibname_parallel,
375 &gatewayname_parallel,
376 &hParallelLib,
377 &ptr_gw_parallel);
378}
379/*--------------------------------------------------------------------------*/
367 380
diff --git a/scilab/modules/core/src/c/dynamic_gateways.h b/scilab/modules/core/src/c/dynamic_gateways.h
index 5a9a581..14c6599 100644
--- a/scilab/modules/core/src/c/dynamic_gateways.h
+++ b/scilab/modules/core/src/c/dynamic_gateways.h
@@ -156,6 +156,13 @@ int gw_dynamic_graphic_export(void);
156*/ 156*/
157int gw_dynamic_action_binding(void); 157int gw_dynamic_action_binding(void);
158 158
159/*
160* parallel gateway
161* parallel is loaded dynamically at runtime
162* load gw_parallel in SCI/modules/parallel/sci_gateway/gw_parallel.c
163*/
164int gw_dynamic_parallel(void);
165
159#endif /* __DYNAMIC_GATEWAYS_H__ */ 166#endif /* __DYNAMIC_GATEWAYS_H__ */
160/*--------------------------------------------------------------------------*/ 167/*--------------------------------------------------------------------------*/
161 168
diff --git a/scilab/modules/data_structures/Makefile.in b/scilab/modules/data_structures/Makefile.in
index 5f27e37..4cbaa58 100644
--- a/scilab/modules/data_structures/Makefile.in
+++ b/scilab/modules/data_structures/Makefile.in
@@ -306,6 +306,7 @@ OCAMLDEP = @OCAMLDEP@
306OCAMLLEX = @OCAMLLEX@ 306OCAMLLEX = @OCAMLLEX@
307OCAMLOPT = @OCAMLOPT@ 307OCAMLOPT = @OCAMLOPT@
308OCAMLYACC = @OCAMLYACC@ 308OCAMLYACC = @OCAMLYACC@
309OPENMP_ENABLE = @OPENMP_ENABLE@
309OTOOL = @OTOOL@ 310OTOOL = @OTOOL@
310OTOOL64 = @OTOOL64@ 311OTOOL64 = @OTOOL64@
311PACKAGE = @PACKAGE@ 312PACKAGE = @PACKAGE@
diff --git a/scilab/modules/demo_tools/Makefile.in b/scilab/modules/demo_tools/Makefile.in
index 7d42a86..65e5d06 100644
--- a/scilab/modules/demo_tools/Makefile.in
+++ b/scilab/modules/demo_tools/Makefile.in
@@ -234,6 +234,7 @@ OCAMLDEP = @OCAMLDEP@
234OCAMLLEX = @OCAMLLEX@ 234OCAMLLEX = @OCAMLLEX@
235OCAMLOPT = @OCAMLOPT@ 235OCAMLOPT = @OCAMLOPT@
236OCAMLYACC = @OCAMLYACC@ 236OCAMLYACC = @OCAMLYACC@
237OPENMP_ENABLE = @OPENMP_ENABLE@
237OTOOL = @OTOOL@ 238OTOOL = @OTOOL@
238OTOOL64 = @OTOOL64@ 239OTOOL64 = @OTOOL64@
239PACKAGE = @PACKAGE@ 240PACKAGE = @PACKAGE@
diff --git a/scilab/modules/development_tools/Makefile.in b/scilab/modules/development_tools/Makefile.in
index cc1e69e..43bf4d5 100644
--- a/scilab/modules/development_tools/Makefile.in
+++ b/scilab/modules/development_tools/Makefile.in
@@ -233,6 +233,7 @@ OCAMLDEP = @OCAMLDEP@
233OCAMLLEX = @OCAMLLEX@ 233OCAMLLEX = @OCAMLLEX@
234OCAMLOPT = @OCAMLOPT@ 234OCAMLOPT = @OCAMLOPT@
235OCAMLYACC = @OCAMLYACC@ 235OCAMLYACC = @OCAMLYACC@
236OPENMP_ENABLE = @OPENMP_ENABLE@
236OTOOL = @OTOOL@ 237OTOOL = @OTOOL@
237OTOOL64 = @OTOOL64@ 238OTOOL64 = @OTOOL64@
238PACKAGE = @PACKAGE@ 239PACKAGE = @PACKAGE@
diff --git a/scilab/modules/development_tools/src/fake/Makefile.in b/scilab/modules/development_tools/src/fake/Makefile.in
index 3f3f9be..2e789af 100644
--- a/scilab/modules/development_tools/src/fake/Makefile.in
+++ b/scilab/modules/development_tools/src/fake/Makefile.in
@@ -181,6 +181,7 @@ OCAMLDEP = @OCAMLDEP@
181OCAMLLEX = @OCAMLLEX@ 181OCAMLLEX = @OCAMLLEX@
182OCAMLOPT = @OCAMLOPT@ 182OCAMLOPT = @OCAMLOPT@
183OCAMLYACC = @OCAMLYACC@ 183OCAMLYACC = @OCAMLYACC@
184OPENMP_ENABLE = @OPENMP_ENABLE@
184OTOOL = @OTOOL@ 185OTOOL = @OTOOL@
185OTOOL64 = @OTOOL64@ 186OTOOL64 = @OTOOL64@
186PACKAGE = @PACKAGE@ 187PACKAGE = @PACKAGE@
diff --git a/scilab/modules/differential_equations/Makefile.in b/scilab/modules/differential_equations/Makefile.in
index 884c227..575653c 100644
--- a/scilab/modules/differential_equations/Makefile.in
+++ b/scilab/modules/differential_equations/Makefile.in
@@ -317,6 +317,7 @@ OCAMLDEP = @OCAMLDEP@
317OCAMLLEX = @OCAMLLEX@ 317OCAMLLEX = @OCAMLLEX@
318OCAMLOPT = @OCAMLOPT@ 318OCAMLOPT = @OCAMLOPT@
319OCAMLYACC = @OCAMLYACC@ 319OCAMLYACC = @OCAMLYACC@
320OPENMP_ENABLE = @OPENMP_ENABLE@
320OTOOL = @OTOOL@ 321OTOOL = @OTOOL@
321OTOOL64 = @OTOOL64@ 322OTOOL64 = @OTOOL64@
322PACKAGE = @PACKAGE@ 323PACKAGE = @PACKAGE@
diff --git a/scilab/modules/double/Makefile.in b/scilab/modules/double/Makefile.in
index f47ace3..6b5322d 100644
--- a/scilab/modules/double/Makefile.in
+++ b/scilab/modules/double/Makefile.in
@@ -275,6 +275,7 @@ OCAMLDEP = @OCAMLDEP@
275OCAMLLEX = @OCAMLLEX@ 275OCAMLLEX = @OCAMLLEX@
276OCAMLOPT = @OCAMLOPT@ 276OCAMLOPT = @OCAMLOPT@
277OCAMLYACC = @OCAMLYACC@ 277OCAMLYACC = @OCAMLYACC@
278OPENMP_ENABLE = @OPENMP_ENABLE@
278OTOOL = @OTOOL@ 279OTOOL = @OTOOL@
279OTOOL64 = @OTOOL64@ 280OTOOL64 = @OTOOL64@
280PACKAGE = @PACKAGE@ 281PACKAGE = @PACKAGE@
diff --git a/scilab/modules/dynamic_link/Makefile.in b/scilab/modules/dynamic_link/Makefile.in
index e9128c1..e2d1a7a 100644
--- a/scilab/modules/dynamic_link/Makefile.in
+++ b/scilab/modules/dynamic_link/Makefile.in
@@ -292,6 +292,7 @@ OCAMLDEP = @OCAMLDEP@
292OCAMLLEX = @OCAMLLEX@ 292OCAMLLEX = @OCAMLLEX@
293OCAMLOPT = @OCAMLOPT@ 293OCAMLOPT = @OCAMLOPT@
294OCAMLYACC = @OCAMLYACC@ 294OCAMLYACC = @OCAMLYACC@
295OPENMP_ENABLE = @OPENMP_ENABLE@
295OTOOL = @OTOOL@ 296OTOOL = @OTOOL@
296OTOOL64 = @OTOOL64@ 297OTOOL64 = @OTOOL64@
297PACKAGE = @PACKAGE@ 298PACKAGE = @PACKAGE@
diff --git a/scilab/modules/elementary_functions/Makefile.in b/scilab/modules/elementary_functions/Makefile.in
index 59a6c4d..5a33ef6 100644
--- a/scilab/modules/elementary_functions/Makefile.in
+++ b/scilab/modules/elementary_functions/Makefile.in
@@ -641,6 +641,7 @@ OCAMLDEP = @OCAMLDEP@
641OCAMLLEX = @OCAMLLEX@ 641OCAMLLEX = @OCAMLLEX@
642OCAMLOPT = @OCAMLOPT@ 642OCAMLOPT = @OCAMLOPT@
643OCAMLYACC = @OCAMLYACC@ 643OCAMLYACC = @OCAMLYACC@
644OPENMP_ENABLE = @OPENMP_ENABLE@
644OTOOL = @OTOOL@ 645OTOOL = @OTOOL@
645OTOOL64 = @OTOOL64@ 646OTOOL64 = @OTOOL64@
646PACKAGE = @PACKAGE@ 647PACKAGE = @PACKAGE@
diff --git a/scilab/modules/fftw/Makefile.in b/scilab/modules/fftw/Makefile.in
index 4d26325..885bf49 100644
--- a/scilab/modules/fftw/Makefile.in
+++ b/scilab/modules/fftw/Makefile.in
@@ -294,6 +294,7 @@ OCAMLDEP = @OCAMLDEP@
294OCAMLLEX = @OCAMLLEX@ 294OCAMLLEX = @OCAMLLEX@
295OCAMLOPT = @OCAMLOPT@ 295OCAMLOPT = @OCAMLOPT@
296OCAMLYACC = @OCAMLYACC@ 296OCAMLYACC = @OCAMLYACC@
297OPENMP_ENABLE = @OPENMP_ENABLE@
297OTOOL = @OTOOL@ 298OTOOL = @OTOOL@
298OTOOL64 = @OTOOL64@ 299OTOOL64 = @OTOOL64@
299PACKAGE = @PACKAGE@ 300PACKAGE = @PACKAGE@
diff --git a/scilab/modules/fileio/Makefile.in b/scilab/modules/fileio/Makefile.in
index a92d752..1b1e282 100644
--- a/scilab/modules/fileio/Makefile.in
+++ b/scilab/modules/fileio/Makefile.in
@@ -325,6 +325,7 @@ OCAMLDEP = @OCAMLDEP@
325OCAMLLEX = @OCAMLLEX@ 325OCAMLLEX = @OCAMLLEX@
326OCAMLOPT = @OCAMLOPT@ 326OCAMLOPT = @OCAMLOPT@
327OCAMLYACC = @OCAMLYACC@ 327OCAMLYACC = @OCAMLYACC@
328OPENMP_ENABLE = @OPENMP_ENABLE@
328OTOOL = @OTOOL@ 329OTOOL = @OTOOL@
329OTOOL64 = @OTOOL64@ 330OTOOL64 = @OTOOL64@
330PACKAGE = @PACKAGE@ 331PACKAGE = @PACKAGE@
diff --git a/scilab/modules/functions/Makefile.in b/scilab/modules/functions/Makefile.in
index f00b28c..a298ec1 100644
--- a/scilab/modules/functions/Makefile.in
+++ b/scilab/modules/functions/Makefile.in
@@ -284,6 +284,7 @@ OCAMLDEP = @OCAMLDEP@
284OCAMLLEX = @OCAMLLEX@ 284OCAMLLEX = @OCAMLLEX@
285OCAMLOPT = @OCAMLOPT@ 285OCAMLOPT = @OCAMLOPT@
286OCAMLYACC = @OCAMLYACC@ 286OCAMLYACC = @OCAMLYACC@
287OPENMP_ENABLE = @OPENMP_ENABLE@
287OTOOL = @OTOOL@ 288OTOOL = @OTOOL@
288OTOOL64 = @OTOOL64@ 289OTOOL64 = @OTOOL64@
289PACKAGE = @PACKAGE@ 290PACKAGE = @PACKAGE@
diff --git a/scilab/modules/genetic_algorithms/Makefile.in b/scilab/modules/genetic_algorithms/Makefile.in
index 7eff724..e51f08c 100644
--- a/scilab/modules/genetic_algorithms/Makefile.in
+++ b/scilab/modules/genetic_algorithms/Makefile.in
@@ -237,6 +237,7 @@ OCAMLDEP = @OCAMLDEP@
237OCAMLLEX = @OCAMLLEX@ 237OCAMLLEX = @OCAMLLEX@
238OCAMLOPT = @OCAMLOPT@ 238OCAMLOPT = @OCAMLOPT@
239OCAMLYACC = @OCAMLYACC@ 239OCAMLYACC = @OCAMLYACC@
240OPENMP_ENABLE = @OPENMP_ENABLE@
240OTOOL = @OTOOL@ 241OTOOL = @OTOOL@
241OTOOL64 = @OTOOL64@ 242OTOOL64 = @OTOOL64@
242PACKAGE = @PACKAGE@ 243PACKAGE = @PACKAGE@
diff --git a/scilab/modules/graph/Makefile.in b/scilab/modules/graph/Makefile.in
index e1618d0..b5d7089 100644
--- a/scilab/modules/graph/Makefile.in
+++ b/scilab/modules/graph/Makefile.in
@@ -274,6 +274,7 @@ OCAMLDEP = @OCAMLDEP@
274OCAMLLEX = @OCAMLLEX@ 274OCAMLLEX = @OCAMLLEX@
275OCAMLOPT = @OCAMLOPT@ 275OCAMLOPT = @OCAMLOPT@
276OCAMLYACC = @OCAMLYACC@ 276OCAMLYACC = @OCAMLYACC@
277OPENMP_ENABLE = @OPENMP_ENABLE@
277OTOOL = @OTOOL@ 278OTOOL = @OTOOL@
278OTOOL64 = @OTOOL64@ 279OTOOL64 = @OTOOL64@
279PACKAGE = @PACKAGE@ 280PACKAGE = @PACKAGE@
diff --git a/scilab/modules/graphic_export/Makefile.in b/scilab/modules/graphic_export/Makefile.in
index 7409aa5..aad4af5 100644
--- a/scilab/modules/graphic_export/Makefile.in
+++ b/scilab/modules/graphic_export/Makefile.in
@@ -311,6 +311,7 @@ OCAMLDEP = @OCAMLDEP@
311OCAMLLEX = @OCAMLLEX@ 311OCAMLLEX = @OCAMLLEX@
312OCAMLOPT = @OCAMLOPT@ 312OCAMLOPT = @OCAMLOPT@
313OCAMLYACC = @OCAMLYACC@ 313OCAMLYACC = @OCAMLYACC@
314OPENMP_ENABLE = @OPENMP_ENABLE@
314OTOOL = @OTOOL@ 315OTOOL = @OTOOL@
315OTOOL64 = @OTOOL64@ 316OTOOL64 = @OTOOL64@
316PACKAGE = @PACKAGE@ 317PACKAGE = @PACKAGE@
diff --git a/scilab/modules/graphics/Makefile.in b/scilab/modules/graphics/Makefile.in
index 838c4aa..95d945c 100644
--- a/scilab/modules/graphics/Makefile.in
+++ b/scilab/modules/graphics/Makefile.in
@@ -646,6 +646,7 @@ OCAMLDEP = @OCAMLDEP@
646OCAMLLEX = @OCAMLLEX@ 646OCAMLLEX = @OCAMLLEX@
647OCAMLOPT = @OCAMLOPT@ 647OCAMLOPT = @OCAMLOPT@
648OCAMLYACC = @OCAMLYACC@ 648OCAMLYACC = @OCAMLYACC@
649OPENMP_ENABLE = @OPENMP_ENABLE@
649OTOOL = @OTOOL@ 650OTOOL = @OTOOL@
650OTOOL64 = @OTOOL64@ 651OTOOL64 = @OTOOL64@
651PACKAGE = @PACKAGE@ 652PACKAGE = @PACKAGE@
diff --git a/scilab/modules/gui/Makefile.in b/scilab/modules/gui/Makefile.in
index 0791aeb..71b93cd 100644
--- a/scilab/modules/gui/Makefile.in
+++ b/scilab/modules/gui/Makefile.in
@@ -400,6 +400,7 @@ OCAMLDEP = @OCAMLDEP@
400OCAMLLEX = @OCAMLLEX@ 400OCAMLLEX = @OCAMLLEX@
401OCAMLOPT = @OCAMLOPT@ 401OCAMLOPT = @OCAMLOPT@
402OCAMLYACC = @OCAMLYACC@ 402OCAMLYACC = @OCAMLYACC@
403OPENMP_ENABLE = @OPENMP_ENABLE@
403OTOOL = @OTOOL@ 404OTOOL = @OTOOL@
404OTOOL64 = @OTOOL64@ 405OTOOL64 = @OTOOL64@
405PACKAGE = @PACKAGE@ 406PACKAGE = @PACKAGE@
diff --git a/scilab/modules/hdf5/Makefile.in b/scilab/modules/hdf5/Makefile.in
index 3d2644b..5cf9e14 100644
--- a/scilab/modules/hdf5/Makefile.in
+++ b/scilab/modules/hdf5/Makefile.in
@@ -326,6 +326,7 @@ OCAMLDEP = @OCAMLDEP@
326OCAMLLEX = @OCAMLLEX@ 326OCAMLLEX = @OCAMLLEX@
327OCAMLOPT = @OCAMLOPT@ 327OCAMLOPT = @OCAMLOPT@
328OCAMLYACC = @OCAMLYACC@ 328OCAMLYACC = @OCAMLYACC@
329OPENMP_ENABLE = @OPENMP_ENABLE@
329OTOOL = @OTOOL@ 330OTOOL = @OTOOL@
330OTOOL64 = @OTOOL64@ 331OTOOL64 = @OTOOL64@
331PACKAGE = @PACKAGE@ 332PACKAGE = @PACKAGE@
diff --git a/scilab/modules/helptools/Makefile.in b/scilab/modules/helptools/Makefile.in
index f321c3c..21fe46d 100644
--- a/scilab/modules/helptools/Makefile.in
+++ b/scilab/modules/helptools/Makefile.in
@@ -299,6 +299,7 @@ OCAMLDEP = @OCAMLDEP@
299OCAMLLEX = @OCAMLLEX@ 299OCAMLLEX = @OCAMLLEX@
300OCAMLOPT = @OCAMLOPT@ 300OCAMLOPT = @OCAMLOPT@
301OCAMLYACC = @OCAMLYACC@ 301OCAMLYACC = @OCAMLYACC@
302OPENMP_ENABLE = @OPENMP_ENABLE@
302OTOOL = @OTOOL@ 303OTOOL = @OTOOL@
303OTOOL64 = @OTOOL64@ 304OTOOL64 = @OTOOL64@
304PACKAGE = @PACKAGE@ 305PACKAGE = @PACKAGE@
diff --git a/scilab/modules/history_manager/Makefile.in b/scilab/modules/history_manager/Makefile.in
index 18979f0..2a1a699 100644
--- a/scilab/modules/history_manager/Makefile.in
+++ b/scilab/modules/history_manager/Makefile.in
@@ -322,6 +322,7 @@ OCAMLDEP = @OCAMLDEP@
322OCAMLLEX = @OCAMLLEX@ 322OCAMLLEX = @OCAMLLEX@
323OCAMLOPT = @OCAMLOPT@ 323OCAMLOPT = @OCAMLOPT@
324OCAMLYACC = @OCAMLYACC@ 324OCAMLYACC = @OCAMLYACC@
325OPENMP_ENABLE = @OPENMP_ENABLE@
325OTOOL = @OTOOL@ 326OTOOL = @OTOOL@
326OTOOL64 = @OTOOL64@ 327OTOOL64 = @OTOOL64@
327PACKAGE = @PACKAGE@ 328PACKAGE = @PACKAGE@
diff --git a/scilab/modules/integer/Makefile.in b/scilab/modules/integer/Makefile.in
index ac64c26..bc4e757 100644
--- a/scilab/modules/integer/Makefile.in
+++ b/scilab/modules/integer/Makefile.in
@@ -310,6 +310,7 @@ OCAMLDEP = @OCAMLDEP@
310OCAMLLEX = @OCAMLLEX@ 310OCAMLLEX = @OCAMLLEX@
311OCAMLOPT = @OCAMLOPT@ 311OCAMLOPT = @OCAMLOPT@
312OCAMLYACC = @OCAMLYACC@ 312OCAMLYACC = @OCAMLYACC@
313OPENMP_ENABLE = @OPENMP_ENABLE@
313OTOOL = @OTOOL@ 314OTOOL = @OTOOL@
314OTOOL64 = @OTOOL64@ 315OTOOL64 = @OTOOL64@
315PACKAGE = @PACKAGE@ 316PACKAGE = @PACKAGE@
diff --git a/scilab/modules/interpolation/Makefile.in b/scilab/modules/interpolation/Makefile.in
index 037284d..5ce0336 100644
--- a/scilab/modules/interpolation/Makefile.in
+++ b/scilab/modules/interpolation/Makefile.in
@@ -292,6 +292,7 @@ OCAMLDEP = @OCAMLDEP@
292OCAMLLEX = @OCAMLLEX@ 292OCAMLLEX = @OCAMLLEX@
293OCAMLOPT = @OCAMLOPT@ 293OCAMLOPT = @OCAMLOPT@
294OCAMLYACC = @OCAMLYACC@ 294OCAMLYACC = @OCAMLYACC@
295OPENMP_ENABLE = @OPENMP_ENABLE@
295OTOOL = @OTOOL@ 296OTOOL = @OTOOL@
296OTOOL64 = @OTOOL64@ 297OTOOL64 = @OTOOL64@
297PACKAGE = @PACKAGE@ 298PACKAGE = @PACKAGE@
diff --git a/scilab/modules/intersci/Makefile.in b/scilab/modules/intersci/Makefile.in
index 7bb481a..be5f9f4 100644
--- a/scilab/modules/intersci/Makefile.in
+++ b/scilab/modules/intersci/Makefile.in
@@ -275,6 +275,7 @@ OCAMLDEP = @OCAMLDEP@
275OCAMLLEX = @OCAMLLEX@ 275OCAMLLEX = @OCAMLLEX@
276OCAMLOPT = @OCAMLOPT@ 276OCAMLOPT = @OCAMLOPT@
277OCAMLYACC = @OCAMLYACC@ 277OCAMLYACC = @OCAMLYACC@
278OPENMP_ENABLE = @OPENMP_ENABLE@
278OTOOL = @OTOOL@ 279OTOOL = @OTOOL@
279OTOOL64 = @OTOOL64@ 280OTOOL64 = @OTOOL64@
280PACKAGE = @PACKAGE@ 281PACKAGE = @PACKAGE@
diff --git a/scilab/modules/io/Makefile.in b/scilab/modules/io/Makefile.in
index 0dacd5f..e79c219 100644
--- a/scilab/modules/io/Makefile.in
+++ b/scilab/modules/io/Makefile.in
@@ -289,6 +289,7 @@ OCAMLDEP = @OCAMLDEP@
289OCAMLLEX = @OCAMLLEX@ 289OCAMLLEX = @OCAMLLEX@
290OCAMLOPT = @OCAMLOPT@ 290OCAMLOPT = @OCAMLOPT@
291OCAMLYACC = @OCAMLYACC@ 291OCAMLYACC = @OCAMLYACC@
292OPENMP_ENABLE = @OPENMP_ENABLE@
292OTOOL = @OTOOL@ 293OTOOL = @OTOOL@
293OTOOL64 = @OTOOL64@ 294OTOOL64 = @OTOOL64@
294PACKAGE = @PACKAGE@ 295PACKAGE = @PACKAGE@
diff --git a/scilab/modules/javasci/Makefile.in b/scilab/modules/javasci/Makefile.in
index d60b854..32be88f 100644
--- a/scilab/modules/javasci/Makefile.in
+++ b/scilab/modules/javasci/Makefile.in
@@ -287,6 +287,7 @@ OCAMLDEP = @OCAMLDEP@
287OCAMLLEX = @OCAMLLEX@ 287OCAMLLEX = @OCAMLLEX@
288OCAMLOPT = @OCAMLOPT@ 288OCAMLOPT = @OCAMLOPT@
289OCAMLYACC = @OCAMLYACC@ 289OCAMLYACC = @OCAMLYACC@
290OPENMP_ENABLE = @OPENMP_ENABLE@
290OTOOL = @OTOOL@ 291OTOOL = @OTOOL@
291OTOOL64 = @OTOOL64@ 292OTOOL64 = @OTOOL64@
292PACKAGE = @PACKAGE@ 293PACKAGE = @PACKAGE@
diff --git a/scilab/modules/jvm/Makefile.in b/scilab/modules/jvm/Makefile.in
index 6276e06..ec2c5a9 100644
--- a/scilab/modules/jvm/Makefile.in
+++ b/scilab/modules/jvm/Makefile.in
@@ -303,6 +303,7 @@ OCAMLDEP = @OCAMLDEP@
303OCAMLLEX = @OCAMLLEX@ 303OCAMLLEX = @OCAMLLEX@
304OCAMLOPT = @OCAMLOPT@ 304OCAMLOPT = @OCAMLOPT@
305OCAMLYACC = @OCAMLYACC@ 305OCAMLYACC = @OCAMLYACC@
306OPENMP_ENABLE = @OPENMP_ENABLE@
306OTOOL = @OTOOL@ 307OTOOL = @OTOOL@
307OTOOL64 = @OTOOL64@ 308OTOOL64 = @OTOOL64@
308PACKAGE = @PACKAGE@ 309PACKAGE = @PACKAGE@
diff --git a/scilab/modules/linear_algebra/Makefile.in b/scilab/modules/linear_algebra/Makefile.in
index 80fff7f..779d888 100644
--- a/scilab/modules/linear_algebra/Makefile.in
+++ b/scilab/modules/linear_algebra/Makefile.in
@@ -312,6 +312,7 @@ OCAMLDEP = @OCAMLDEP@
312OCAMLLEX = @OCAMLLEX@ 312OCAMLLEX = @OCAMLLEX@
313OCAMLOPT = @OCAMLOPT@ 313OCAMLOPT = @OCAMLOPT@
314OCAMLYACC = @OCAMLYACC@ 314OCAMLYACC = @OCAMLYACC@
315OPENMP_ENABLE = @OPENMP_ENABLE@
315OTOOL = @OTOOL@ 316OTOOL = @OTOOL@
316OTOOL64 = @OTOOL64@ 317OTOOL64 = @OTOOL64@
317PACKAGE = @PACKAGE@ 318PACKAGE = @PACKAGE@
diff --git a/scilab/modules/localization/Makefile.in b/scilab/modules/localization/Makefile.in
index 873b517..4b8cb23 100644
--- a/scilab/modules/localization/Makefile.in
+++ b/scilab/modules/localization/Makefile.in
@@ -299,6 +299,7 @@ OCAMLDEP = @OCAMLDEP@
299OCAMLLEX = @OCAMLLEX@ 299OCAMLLEX = @OCAMLLEX@
300OCAMLOPT = @OCAMLOPT@ 300OCAMLOPT = @OCAMLOPT@
301OCAMLYACC = @OCAMLYACC@ 301OCAMLYACC = @OCAMLYACC@
302OPENMP_ENABLE = @OPENMP_ENABLE@
302OTOOL = @OTOOL@ 303OTOOL = @OTOOL@
303OTOOL64 = @OTOOL64@ 304OTOOL64 = @OTOOL64@
304PACKAGE = @PACKAGE@ 305PACKAGE = @PACKAGE@
diff --git a/scilab/modules/m2sci/Makefile.in b/scilab/modules/m2sci/Makefile.in
index e77bd19..1fc0a5a 100644
--- a/scilab/modules/m2sci/Makefile.in
+++ b/scilab/modules/m2sci/Makefile.in
@@ -232,6 +232,7 @@ OCAMLDEP = @OCAMLDEP@
232OCAMLLEX = @OCAMLLEX@ 232OCAMLLEX = @OCAMLLEX@
233OCAMLOPT = @OCAMLOPT@ 233OCAMLOPT = @OCAMLOPT@
234OCAMLYACC = @OCAMLYACC@ 234OCAMLYACC = @OCAMLYACC@
235OPENMP_ENABLE = @OPENMP_ENABLE@
235OTOOL = @OTOOL@ 236OTOOL = @OTOOL@
236OTOOL64 = @OTOOL64@ 237OTOOL64 = @OTOOL64@
237PACKAGE = @PACKAGE@ 238PACKAGE = @PACKAGE@
diff --git a/scilab/modules/maple2scilab/Makefile.in b/scilab/modules/maple2scilab/Makefile.in
index 06df179..1b31ee0 100644
--- a/scilab/modules/maple2scilab/Makefile.in
+++ b/scilab/modules/maple2scilab/Makefile.in
@@ -232,6 +232,7 @@ OCAMLDEP = @OCAMLDEP@
232OCAMLLEX = @OCAMLLEX@ 232OCAMLLEX = @OCAMLLEX@
233OCAMLOPT = @OCAMLOPT@ 233OCAMLOPT = @OCAMLOPT@
234OCAMLYACC = @OCAMLYACC@ 234OCAMLYACC = @OCAMLYACC@
235OPENMP_ENABLE = @OPENMP_ENABLE@
235OTOOL = @OTOOL@ 236OTOOL = @OTOOL@
236OTOOL64 = @OTOOL64@ 237OTOOL64 = @OTOOL64@
237PACKAGE = @PACKAGE@ 238PACKAGE = @PACKAGE@
diff --git a/scilab/modules/matio/Makefile.in b/scilab/modules/matio/Makefile.in
index 1847819..773bec9 100644
--- a/scilab/modules/matio/Makefile.in
+++ b/scilab/modules/matio/Makefile.in
@@ -299,6 +299,7 @@ OCAMLDEP = @OCAMLDEP@
299OCAMLLEX = @OCAMLLEX@ 299OCAMLLEX = @OCAMLLEX@
300OCAMLOPT = @OCAMLOPT@ 300OCAMLOPT = @OCAMLOPT@
301OCAMLYACC = @OCAMLYACC@ 301OCAMLYACC = @OCAMLYACC@
302OPENMP_ENABLE = @OPENMP_ENABLE@
302OTOOL = @OTOOL@ 303OTOOL = @OTOOL@
303OTOOL64 = @OTOOL64@ 304OTOOL64 = @OTOOL64@
304PACKAGE = @PACKAGE@ 305PACKAGE = @PACKAGE@
diff --git a/scilab/modules/mexlib/Makefile.in b/scilab/modules/mexlib/Makefile.in
index e90c304..b735403 100644
--- a/scilab/modules/mexlib/Makefile.in
+++ b/scilab/modules/mexlib/Makefile.in
@@ -276,6 +276,7 @@ OCAMLDEP = @OCAMLDEP@
276OCAMLLEX = @OCAMLLEX@ 276OCAMLLEX = @OCAMLLEX@
277OCAMLOPT = @OCAMLOPT@ 277OCAMLOPT = @OCAMLOPT@
278OCAMLYACC = @OCAMLYACC@ 278OCAMLYACC = @OCAMLYACC@
279OPENMP_ENABLE = @OPENMP_ENABLE@
279OTOOL = @OTOOL@ 280OTOOL = @OTOOL@
280OTOOL64 = @OTOOL64@ 281OTOOL64 = @OTOOL64@
281PACKAGE = @PACKAGE@ 282PACKAGE = @PACKAGE@
diff --git a/scilab/modules/optimization/Makefile.in b/scilab/modules/optimization/Makefile.in
index c8fe543..5a245c0 100644
--- a/scilab/modules/optimization/Makefile.in
+++ b/scilab/modules/optimization/Makefile.in
@@ -303,6 +303,7 @@ OCAMLDEP = @OCAMLDEP@
303OCAMLLEX = @OCAMLLEX@ 303OCAMLLEX = @OCAMLLEX@
304OCAMLOPT = @OCAMLOPT@ 304OCAMLOPT = @OCAMLOPT@
305OCAMLYACC = @OCAMLYACC@ 305OCAMLYACC = @OCAMLYACC@
306OPENMP_ENABLE = @OPENMP_ENABLE@
306OTOOL = @OTOOL@ 307OTOOL = @OTOOL@
307OTOOL64 = @OTOOL64@ 308OTOOL64 = @OTOOL64@
308PACKAGE = @PACKAGE@ 309PACKAGE = @PACKAGE@
diff --git a/scilab/modules/output_stream/Makefile.in b/scilab/modules/output_stream/Makefile.in
index d1c35b6..5461700 100644
--- a/scilab/modules/output_stream/Makefile.in
+++ b/scilab/modules/output_stream/Makefile.in
@@ -316,6 +316,7 @@ OCAMLDEP = @OCAMLDEP@
316OCAMLLEX = @OCAMLLEX@ 316OCAMLLEX = @OCAMLLEX@
317OCAMLOPT = @OCAMLOPT@ 317OCAMLOPT = @OCAMLOPT@
318OCAMLYACC = @OCAMLYACC@ 318OCAMLYACC = @OCAMLYACC@
319OPENMP_ENABLE = @OPENMP_ENABLE@
319OTOOL = @OTOOL@ 320OTOOL = @OTOOL@
320OTOOL64 = @OTOOL64@ 321OTOOL64 = @OTOOL64@
321PACKAGE = @PACKAGE@ 322PACKAGE = @PACKAGE@
diff --git a/scilab/modules/overloading/Makefile.in b/scilab/modules/overloading/Makefile.in
index ba797b5..24b84f3 100644
--- a/scilab/modules/overloading/Makefile.in
+++ b/scilab/modules/overloading/Makefile.in
@@ -233,6 +233,7 @@ OCAMLDEP = @OCAMLDEP@
233OCAMLLEX = @OCAMLLEX@ 233OCAMLLEX = @OCAMLLEX@
234OCAMLOPT = @OCAMLOPT@ 234OCAMLOPT = @OCAMLOPT@
235OCAMLYACC = @OCAMLYACC@ 235OCAMLYACC = @OCAMLYACC@
236OPENMP_ENABLE = @OPENMP_ENABLE@
236OTOOL = @OTOOL@ 237OTOOL = @OTOOL@
237OTOOL64 = @OTOOL64@ 238OTOOL64 = @OTOOL64@
238PACKAGE = @PACKAGE@ 239PACKAGE = @PACKAGE@
diff --git a/scilab/modules/parallel/Makefile.am b/scilab/modules/parallel/Makefile.am
new file mode 100644
index 0000000..be9ff58
--- /dev/null
+++ b/scilab/modules/parallel/Makefile.am
@@ -0,0 +1,69 @@
1# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2# Copyright (C) 2010 - DIGITEO - Allan CORNET
3#
4# This file must be used under the terms of the CeCILL.
5# This source file is licensed as described in the file COPYING, which
6# you should have received as part of this distribution. The terms
7# are also available at
8# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10PARALLEL_CPP_SOURCES =
11
12GATEWAY_CPP_SOURCES = sci_gateway/cpp/sci_parallel_run.cpp
13
14PARALLEL_C_SOURCES =
15
16GATEWAY_C_SOURCES = sci_gateway/c/gw_parallel.c
17
18
19libsciparallel_la_CFLAGS= -I$(top_srcdir)/libs/MALLOC/includes/ \
20-I$(srcdir)/includes/ \
21-I$(top_srcdir)/modules/core/includes \
22-I$(srcdir)/src/c/ \
23-I$(top_srcdir)/modules/api_scilab/includes \
24-I$(top_srcdir)/modules/string/includes
25
26libsciparallel_la_CPPFLAGS= -I$(top_srcdir)/libs/MALLOC/includes/ \
27-I$(srcdir)/includes/ \
28-I$(top_srcdir)/modules/core/includes \
29-I$(srcdir)/src/cpp/ \
30-I$(srcdir)/src/c/ \
31-I$(top_srcdir)/modules/api_scilab/includes \
32-I$(top_srcdir)/modules/output_stream/includes \
33-I$(top_srcdir)/modules/parameters/includes \
34-I$(top_srcdir)/modules/dynamic_link/includes
35
36
37pkglib_LTLIBRARIES = libsciparallel.la
38
39libsciparallel_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION)
40
41libsciparallel_la_SOURCES = $(PARALLEL_C_SOURCES) $(PARALLEL_CPP_SOURCES) $(GATEWAY_C_SOURCES) $(GATEWAY_CPP_SOURCES)
42
43# For the code check (splint)
44CHECK_SRC= $(PARALLEL_C_SOURCES) $(GATEWAY_C_SOURCES)
45INCLUDE_FLAGS = $(libsciparallel_la_CFLAGS)
46
47#### Target ######
48modulename=parallel
49
50#### parallel : Conf files ####
51libsciparallel_la_rootdir = $(mydatadir)
52libsciparallel_la_root_DATA = license.txt readme.txt version.xml
53
54
55#### parallel : init scripts ####
56libsciparallel_la_etcdir = $(mydatadir)/etc
57libsciparallel_la_etc_DATA = etc/parallel.quit etc/parallel.start
58
59#### parallel : gateway declaration ####
60libsciparallel_la_sci_gatewaydir = $(mydatadir)/sci_gateway
61libsciparallel_la_sci_gateway_DATA = sci_gateway/parallel_gateway.xml
62
63#### parallel : include files ####
64libsciparallel_la_includedir=$(pkgincludedir)
65libsciparallel_la_include_HEADERS =
66
67include $(top_srcdir)/Makefile.incl.am
68
69
diff --git a/scilab/modules/parallel/Makefile.in b/scilab/modules/parallel/Makefile.in
new file mode 100644
index 0000000..0f28d2c
--- /dev/null
+++ b/scilab/modules/parallel/Makefile.in
@@ -0,0 +1,1144 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
19# Copyright (C) 2010 - DIGITEO - Allan CORNET
20#
21# This file must be used under the terms of the CeCILL.
22# This source file is licensed as described in the file COPYING, which
23# you should have received as part of this distribution. The terms
24# are also available at
25# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
26
27# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
28# Copyright (C) 2006-2008 - INRIA - Sylvestre LEDRU <sylvestre.ledru@inria.fr>
29# Copyright (C) 2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr>
30#
31# This file must be used under the terms of the CeCILL.
32# This source file is licensed as described in the file COPYING, which
33# you should have received as part of this distribution. The terms
34# are also available at
35# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
36#
37
38##########
39### Makefile included stuff
40### Target, variable, suffixes which are supposed to be usefull in every makefile.am
41##########
42
43
44
45VPATH = @srcdir@
46pkgdatadir = $(datadir)/@PACKAGE@
47pkgincludedir = $(includedir)/@PACKAGE@
48pkglibdir = $(libdir)/@PACKAGE@
49pkglibexecdir = $(libexecdir)/@PACKAGE@
50am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
51install_sh_DATA = $(install_sh) -c -m 644
52install_sh_PROGRAM = $(install_sh) -c
53install_sh_SCRIPT = $(install_sh) -c
54INSTALL_HEADER = $(INSTALL_DATA)
55transform = $(program_transform_name)
56NORMAL_INSTALL = :
57PRE_INSTALL = :
58POST_INSTALL = :
59NORMAL_UNINSTALL = :
60PRE_UNINSTALL = :
61POST_UNINSTALL = :
62build_triplet = @build@
63host_triplet = @host@
64DIST_COMMON = $(libsciparallel_la_include_HEADERS) \
65 $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
66 $(top_srcdir)/Makefile.incl.am
67@NEED_JAVA_TRUE@am__append_1 = java
68
69# With --enable-compilation-tests, launch java unitary tests
70@COMPILATION_TESTS_TRUE@am__append_2 = test
71subdir = modules/parallel
72ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
73am__aclocal_m4_deps = $(top_srcdir)/m4/docbook.m4 \
74 $(top_srcdir)/m4/fftw.m4 $(top_srcdir)/m4/fortran.m4 \
75 $(top_srcdir)/m4/giws.m4 $(top_srcdir)/m4/hdf5.m4 \
76 $(top_srcdir)/m4/intel_compiler.m4 \
77 $(top_srcdir)/m4/java-thirdparty.m4 $(top_srcdir)/m4/java.m4 \
78 $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/libsmath.m4 \
79 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libxml2.m4 \
80 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
81 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
82 $(top_srcdir)/m4/ocaml.m4 $(top_srcdir)/m4/pcre.m4 \
83 $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/pvm.m4 \
84 $(top_srcdir)/m4/relocatable.m4 $(top_srcdir)/m4/swig.m4 \
85 $(top_srcdir)/m4/symlinks.m4 $(top_srcdir)/m4/tcltk.m4 \
86 $(top_srcdir)/m4/umfpack.m4 $(top_srcdir)/configure.ac
87am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
88 $(ACLOCAL_M4)
89mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
90CONFIG_HEADER = $(top_builddir)/modules/core/includes/machine.h
91CONFIG_CLEAN_FILES =
92CONFIG_CLEAN_VPATH_FILES =
93am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
94am__vpath_adj = case $$p in \
95 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
96 *) f=$$p;; \
97 esac;
98am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
99am__install_max = 40
100am__nobase_strip_setup = \
101 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
102am__nobase_strip = \
103 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
104am__nobase_list = $(am__nobase_strip_setup); \
105 for p in $$list; do echo "$$p $$p"; done | \
106 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
107 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
108 if (++n[$$2] == $(am__install_max)) \
109 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
110 END { for (dir in files) print dir, files[dir] }'
111am__base_list = \
112 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
113 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
114am__installdirs = "$(DESTDIR)$(pkglibdir)" \
115 "$(DESTDIR)$(libsciparallel_la_etcdir)" \
116 "$(DESTDIR)$(libsciparallel_la_rootdir)" \
117 "$(DESTDIR)$(libsciparallel_la_sci_gatewaydir)" \
118 "$(DESTDIR)$(libsciparallel_la_includedir)"
119LTLIBRARIES = $(pkglib_LTLIBRARIES)
120libsciparallel_la_LIBADD =
121am__objects_1 =
122am__objects_2 = libsciparallel_la-gw_parallel.lo
123am__objects_3 = libsciparallel_la-sci_parallel_run.lo
124am_libsciparallel_la_OBJECTS = $(am__objects_1) $(am__objects_1) \
125 $(am__objects_2) $(am__objects_3)
126libsciparallel_la_OBJECTS = $(am_libsciparallel_la_OBJECTS)
127libsciparallel_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
128 $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
129 $(CXXFLAGS) $(libsciparallel_la_LDFLAGS) $(LDFLAGS) -o $@
130DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/modules/core/includes
131depcomp = $(SHELL) $(top_srcdir)/config/depcomp
132am__depfiles_maybe = depfiles
133am__mv = mv -f
134COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
135 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
136LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
137 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
138 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
139CCLD = $(CC)
140LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
141 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
142 $(LDFLAGS) -o $@
143CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
144 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
145LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
146 --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
147 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
148CXXLD = $(CXX)
149CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
150 --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
151 $(LDFLAGS) -o $@
152SOURCES = $(libsciparallel_la_SOURCES)
153DIST_SOURCES = $(libsciparallel_la_SOURCES)
154DATA = $(libsciparallel_la_etc_DATA) $(libsciparallel_la_root_DATA) \
155 $(libsciparallel_la_sci_gateway_DATA)
156HEADERS = $(libsciparallel_la_include_HEADERS)
157ETAGS = etags
158CTAGS = ctags
159DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
160ACLOCAL = @ACLOCAL@
161ALL_LINGUAS = @ALL_LINGUAS@
162AMTAR = @AMTAR@
163ANT = @ANT@
164ANTLR = @ANTLR@
165AR = @AR@
166AUTOCONF = @AUTOCONF@
167AUTOHEADER = @AUTOHEADER@
168AUTOMAKE = @AUTOMAKE@
169AVALON_FRAMEWORK = @AVALON_FRAMEWORK@
170AWK = @AWK@
171BATIK = @BATIK@
172BLAS_LIBS = @BLAS_LIBS@
173BSH = @BSH@
174CC = @CC@
175CCDEPMODE = @CCDEPMODE@
176CFLAGS = @CFLAGS@
177CHECKSTYLE = @CHECKSTYLE@
178COMMONS_BEANUTILS = @COMMONS_BEANUTILS@
179COMMONS_IO = @COMMONS_IO@
180COMMONS_LOGGING = @COMMONS_LOGGING@
181CPP = @CPP@
182CPPFLAGS = @CPPFLAGS@
183CXX = @CXX@
184CXXCPP = @CXXCPP@
185CXXDEPMODE = @CXXDEPMODE@
186CXXFLAGS = @CXXFLAGS@
187CYGPATH_W = @CYGPATH_W@
188DEFS = @DEFS@
189DEMOTOOLS_ENABLE = @DEMOTOOLS_ENABLE@
190DEPDIR = @DEPDIR@
191DOCBOOK_ROOT = @DOCBOOK_ROOT@
192DSYMUTIL = @DSYMUTIL@
193DUMPBIN = @DUMPBIN@
194ECHO_C = @ECHO_C@
195ECHO_N = @ECHO_N@
196ECHO_T = @ECHO_T@
197EGREP = @EGREP@
198EXEEXT = @EXEEXT@
199F77 = @F77@
200FFLAGS = @FFLAGS@
201FFTW3_LIB = @FFTW3_LIB@
202FFTW_ENABLE = @FFTW_ENABLE@
203FGREP = @FGREP@
204FLEXDOCK = @FLEXDOCK@
205FLIBS = @FLIBS@
206FOP = @FOP@
207GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
208GIWS_BIN = @GIWS_BIN@
209GLUEGEN_RT = @GLUEGEN_RT@
210GMSGFMT = @GMSGFMT@
211GMSGFMT_015 = @GMSGFMT_015@
212GRAPHICS_ENABLE = @GRAPHICS_ENABLE@
213GREP = @GREP@
214GUI_ENABLE = @GUI_ENABLE@
215HDF5_CFLAGS = @HDF5_CFLAGS@
216HDF5_ENABLE = @HDF5_ENABLE@
217HDF5_LIBS = @HDF5_LIBS@
218HELP_ENABLE = @HELP_ENABLE@
219INSTALL = @INSTALL@
220INSTALL_DATA = @INSTALL_DATA@
221INSTALL_PROGRAM = @INSTALL_PROGRAM@
222INSTALL_SCRIPT = @INSTALL_SCRIPT@
223INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
224INTLLIBS = @INTLLIBS@
225INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
226JAR = @JAR@
227JAVA = @JAVA@
228JAVAC = @JAVAC@
229JAVAH = @JAVAH@
230JAVASCI_ENABLE = @JAVASCI_ENABLE@
231JAVA_DEBUG_OPTIONS = @JAVA_DEBUG_OPTIONS@
232JAVA_ENABLE = @JAVA_ENABLE@
233JAVA_G = @JAVA_G@
234JAVA_HOME = @JAVA_HOME@
235JAVA_JNI_INCLUDE = @JAVA_JNI_INCLUDE@
236JAVA_JNI_LIBS = @JAVA_JNI_LIBS@
237JDB = @JDB@
238JEUCLID_CORE = @JEUCLID_CORE@
239JGRAPHX = @JGRAPHX@
240JHALL = @JHALL@
241JHDF5 = @JHDF5@
242JLATEXMATH = @JLATEXMATH@
243JLATEXMATH_FOP = @JLATEXMATH_FOP@
244JOGL = @JOGL@
245JROSETTA_API = @JROSETTA_API@
246JROSETTA_ENGINE = @JROSETTA_ENGINE@
247JUNIT = @JUNIT@
248LAPACK_LIBS = @LAPACK_LIBS@
249LD = @LD@
250LDFLAGS = @LDFLAGS@
251LIBICONV = @LIBICONV@
252LIBINTL = @LIBINTL@
253LIBM = @LIBM@
254LIBOBJS = @LIBOBJS@
255LIBS = @LIBS@
256LIBTOOL = @LIBTOOL@
257LIPO = @LIPO@
258LN_S = @LN_S@
259LOOKS = @LOOKS@
260LTLIBICONV = @LTLIBICONV@
261LTLIBINTL = @LTLIBINTL@
262LTLIBOBJS = @LTLIBOBJS@
263MAINT = @MAINT@
264MAKEINFO = @MAKEINFO@
265MATIO_CFLAGS = @MATIO_CFLAGS@
266MATIO_ENABLE = @MATIO_ENABLE@
267MATIO_LIBS = @MATIO_LIBS@
268MKDIR_P = @MKDIR_P@
269MSGCAT = @MSGCAT@
270MSGFMT = @MSGFMT@
271MSGFMT_015 = @MSGFMT_015@
272MSGMERGE = @MSGMERGE@
273NM = @NM@
274NMEDIT = @NMEDIT@
275OBJDUMP = @OBJDUMP@
276OBJEXT = @OBJEXT@
277OCAMLC = @OCAMLC@
278OCAMLDEP = @OCAMLDEP@
279OCAMLLEX = @OCAMLLEX@
280OCAMLOPT = @OCAMLOPT@
281OCAMLYACC = @OCAMLYACC@
282OPENMP_ENABLE = @OPENMP_ENABLE@
283OTOOL = @OTOOL@
284OTOOL64 = @OTOOL64@
285PACKAGE = @PACKAGE@
286PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
287PACKAGE_NAME = @PACKAGE_NAME@
288PACKAGE_STRING = @PACKAGE_STRING@
289PACKAGE_TARNAME = @PACKAGE_TARNAME@
290PACKAGE_URL = @PACKAGE_URL@
291PACKAGE_VERSION = @PACKAGE_VERSION@
292PATH_SEPARATOR = @PATH_SEPARATOR@
293PCRE_CFLAGS = @PCRE_CFLAGS@
294PCRE_CONFIG = @PCRE_CONFIG@
295PCRE_LIBS = @PCRE_LIBS@
296PCRE_VERSION = @PCRE_VERSION@
297PKG_CONFIG = @PKG_CONFIG@
298POSUB = @POSUB@
299POW_LIB = @POW_LIB@
300PVMGETARCH = @PVMGETARCH@
301PVM_ARCH = @PVM_ARCH@
302PVM_ENABLE = @PVM_ENABLE@
303PVM_INCLUDE = @PVM_INCLUDE@
304PVM_LIB = @PVM_LIB@
305PYTHON = @PYTHON@
306QDOX = @QDOX@
307RANLIB = @RANLIB@
308RELOCATABLE = @RELOCATABLE@
309RT_LIB = @RT_LIB@
310SAXON = @SAXON@
311SCICOS_ENABLE = @SCICOS_ENABLE@
312SCILAB_LIBRARY_VERSION = @SCILAB_LIBRARY_VERSION@
313SED = @SED@
314SET_MAKE = @SET_MAKE@
315SET_RELOCATABLE = @SET_RELOCATABLE@
316SHELL = @SHELL@
317SKINLF = @SKINLF@
318SPLINT = @SPLINT@
319STRIP = @STRIP@
320SWIG_BIN = @SWIG_BIN@
321SWIG_JAVA = @SWIG_JAVA@
322SWIG_RUNTIME_LIBS_DIR = @SWIG_RUNTIME_LIBS_DIR@
323TCLTK_LIBS = @TCLTK_LIBS@
324TCL_INC_PATH = @TCL_INC_PATH@
325TESTNG = @TESTNG@
326TK_INC_PATH = @TK_INC_PATH@
327UMFPACK_ENABLE = @UMFPACK_ENABLE@
328UMFPACK_LIB = @UMFPACK_LIB@
329USE_NLS = @USE_NLS@
330VERSION = @VERSION@
331WITH_OCAML = @WITH_OCAML@
332WITH_TKSCI = @WITH_TKSCI@
333XGETTEXT = @XGETTEXT@
334XGETTEXT_015 = @XGETTEXT_015@
335XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
336XMKMF = @XMKMF@
337XMLGRAPHICS_COMMONS = @XMLGRAPHICS_COMMONS@
338XML_APIS_EXT = @XML_APIS_EXT@
339XML_CONFIG = @XML_CONFIG@
340XML_FLAGS = @XML_FLAGS@
341XML_LIBS = @XML_LIBS@
342XML_VERSION = @XML_VERSION@
343X_CFLAGS = @X_CFLAGS@
344X_EXTRA_LIBS = @X_EXTRA_LIBS@
345X_LIBS = @X_LIBS@
346X_PRE_LIBS = @X_PRE_LIBS@
347abs_builddir = @abs_builddir@
348abs_srcdir = @abs_srcdir@
349abs_top_builddir = @abs_top_builddir@
350abs_top_srcdir = @abs_top_srcdir@
351ac_ct_CC = @ac_ct_CC@
352ac_ct_CXX = @ac_ct_CXX@
353ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
354ac_ct_F77 = @ac_ct_F77@
355am__include = @am__include@
356am__leading_dot = @am__leading_dot@
357am__quote = @am__quote@
358am__tar = @am__tar@
359am__untar = @am__untar@
360bindir = @bindir@
361build = @build@
362build_alias = @build_alias@
363build_cpu = @build_cpu@
364build_os = @build_os@
365build_vendor = @build_vendor@
366builddir = @builddir@
367cxx_present = @cxx_present@
368datadir = @datadir@
369datarootdir = @datarootdir@
370docdir = @docdir@
371dvidir = @dvidir@
372exec_prefix = @exec_prefix@
373host = @host@
374host_alias = @host_alias@
375host_cpu = @host_cpu@
376host_os = @host_os@
377host_vendor = @host_vendor@
378htmldir = @htmldir@
379includedir = @includedir@
380infodir = @infodir@
381install_sh = @install_sh@
382libdir = @libdir@
383libexecdir = @libexecdir@
384localedir = @localedir@
385localstatedir = @localstatedir@
386mandir = @mandir@
387mkdir_p = @mkdir_p@
388oldincludedir = @oldincludedir@
389pdfdir = @pdfdir@
390prefix = @prefix@
391program_transform_name = @program_transform_name@
392psdir = @psdir@
393sbindir = @sbindir@
394sharedstatedir = @sharedstatedir@
395srcdir = @srcdir@
396sysconfdir = @sysconfdir@
397target_alias = @target_alias@
398top_build_prefix = @top_build_prefix@
399top_builddir = @top_builddir@
400top_srcdir = @top_srcdir@
401PARALLEL_CPP_SOURCES =
402GATEWAY_CPP_SOURCES = sci_gateway/cpp/sci_parallel_run.cpp
403PARALLEL_C_SOURCES =
404GATEWAY_C_SOURCES = sci_gateway/c/gw_parallel.c
405libsciparallel_la_CFLAGS = -I$(top_srcdir)/libs/MALLOC/includes/ \
406-I$(srcdir)/includes/ \
407-I$(top_srcdir)/modules/core/includes \
408-I$(srcdir)/src/c/ \
409-I$(top_srcdir)/modules/api_scilab/includes \
410-I$(top_srcdir)/modules/string/includes
411
412libsciparallel_la_CPPFLAGS = -I$(top_srcdir)/libs/MALLOC/includes/ \
413-I$(srcdir)/includes/ \
414-I$(top_srcdir)/modules/core/includes \
415-I$(srcdir)/src/cpp/ \
416-I$(srcdir)/src/c/ \
417-I$(top_srcdir)/modules/api_scilab/includes \
418-I$(top_srcdir)/modules/output_stream/includes \
419-I$(top_srcdir)/modules/parameters/includes \
420-I$(top_srcdir)/modules/dynamic_link/includes
421
422pkglib_LTLIBRARIES = libsciparallel.la
423libsciparallel_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION)
424libsciparallel_la_SOURCES = $(PARALLEL_C_SOURCES) $(PARALLEL_CPP_SOURCES) $(GATEWAY_C_SOURCES) $(GATEWAY_CPP_SOURCES)
425
426# For the code check (splint)
427CHECK_SRC = $(PARALLEL_C_SOURCES) $(GATEWAY_C_SOURCES)
428INCLUDE_FLAGS = $(libsciparallel_la_CFLAGS)
429
430#### Target ######
431modulename = parallel
432
433#### parallel : Conf files ####
434libsciparallel_la_rootdir = $(mydatadir)
435libsciparallel_la_root_DATA = license.txt readme.txt version.xml
436
437#### parallel : init scripts ####
438libsciparallel_la_etcdir = $(mydatadir)/etc
439libsciparallel_la_etc_DATA = etc/parallel.quit etc/parallel.start
440
441#### parallel : gateway declaration ####
442libsciparallel_la_sci_gatewaydir = $(mydatadir)/sci_gateway
443libsciparallel_la_sci_gateway_DATA = sci_gateway/parallel_gateway.xml
444
445#### parallel : include files ####
446libsciparallel_la_includedir = $(pkgincludedir)
447libsciparallel_la_include_HEADERS =
448
449# Where all the Scilab stuff is installed (macros, help, ...)
450mydatadir = $(pkgdatadir)/modules/$(modulename)
451
452# splint options
453SPLINT_OPTIONS = -weak -booltype BOOL
454
455########################### JAVA ######################################
456#### We are delegating java compilation to ant... Thanks to that
457#### the procedure will be the same with Microsoft Windows (C)
458#### and Linux/Unix
459#######################################################################
460TARGETS_ALL = $(am__append_1) $(am__append_2)
461
462################ MACROS ######################
463# Rule to build a macro
464# NOT USED AT THE MOMENT
465SUFFIXES = .sci
466
467########### INSTALL DOCUMENTATION ###################
468
469# Install documentation files into the right target
470# We do not use the automake mechanism (libxxxx_la_help_fr_DATA) because
471# automake needs the html files to be present which is not the case when
472# we are building Scilab
473
474# Where it should be installed
475pkgdocdir = $(mydatadir)
476
477# What is the mask of the help source
478DOCMASKXML = *.xml
479
480# What is the mask of the MathML sources
481DOCMASKMML = *.mml
482
483########### INSTALL DATA ###################
484# Install macros, help & demos
485# Where it should be installed
486pkgmacrosdir = $(mydatadir)
487# Which directory we process
488MACRODIRS = macros/
489# Mask of the Scilab sources macros
490MACROMASK = *.sci
491# Mask of the Scilab executable sources macros
492MACROBUILDMASK = *.sce
493# Mask of the Scilab compiled macros
494MACROBINMASK = *.bin
495# List of the standard directory for tests
496TESTS_DIR = tests/benchmarks tests/nonreg_tests tests/unit_tests
497# Where the demos should be installed
498pkgdemosdir = $(mydatadir)
499# List of the standard directory for demos
500DEMOS_DIR = demos
501# List of the standard directory for examples
502EXAMPLES_DIR = examples
503# Where to export JAVA archives (.jar)
504JARDIR = jar/
505# JAR files mask
506JARMASK = *.jar
507# Chapter file
508HELP_CHAPTERDIR = help/
509HELP_CHAPTERFILE = addchapter.sce
510HELP_CHAPTERLANG = en_US fr_FR pt_BR
511all: all-am
512
513.SUFFIXES:
514.SUFFIXES: .sci .bin .c .cpp .lo .o .obj
515$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.incl.am $(am__configure_deps)
516 @for dep in $?; do \
517 case '$(am__configure_deps)' in \
518 *$$dep*) \
519 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
520 && { if test -f $@; then exit 0; else break; fi; }; \
521 exit 1;; \
522 esac; \
523 done; \
524 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/parallel/Makefile'; \
525 $(am__cd) $(top_srcdir) && \
526 $(AUTOMAKE) --foreign modules/parallel/Makefile
527.PRECIOUS: Makefile
528Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
529 @case '$?' in \
530 *config.status*) \
531 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
532 *) \
533 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
534 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
535 esac;
536
537$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
538 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
539
540$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
541 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
542$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
543 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
544$(am__aclocal_m4_deps):
545install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
546 @$(NORMAL_INSTALL)
547 test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
548 @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
549 list2=; for p in $$list; do \
550 if test -f $$p; then \
551 list2="$$list2 $$p"; \
552 else :; fi; \
553 done; \
554 test -z "$$list2" || { \
555 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
556 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
557 }
558
559uninstall-pkglibLTLIBRARIES:
560 @$(NORMAL_UNINSTALL)
561 @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
562 for p in $$list; do \
563 $(am__strip_dir) \
564 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
565 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
566 done
567
568clean-pkglibLTLIBRARIES:
569 -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
570 @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
571 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
572 test "$$dir" != "$$p" || dir=.; \
573 echo "rm -f \"$${dir}/so_locations\""; \
574 rm -f "$${dir}/so_locations"; \
575 done
576libsciparallel.la: $(libsciparallel_la_OBJECTS) $(libsciparallel_la_DEPENDENCIES)
577 $(libsciparallel_la_LINK) -rpath $(pkglibdir) $(libsciparallel_la_OBJECTS) $(libsciparallel_la_LIBADD) $(LIBS)
578
579mostlyclean-compile:
580 -rm -f *.$(OBJEXT)
581
582distclean-compile:
583 -rm -f *.tab.c
584
585@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciparallel_la-gw_parallel.Plo@am__quote@
586@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciparallel_la-sci_parallel_run.Plo@am__quote@
587
588.c.o:
589@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
590@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
591@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
592@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
593@am__fastdepCC_FALSE@ $(COMPILE) -c $<
594
595.c.obj:
596@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
597@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
598@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
599@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
600@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
601
602.c.lo:
603@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
604@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
605@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
606@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
607@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
608
609libsciparallel_la-gw_parallel.lo: sci_gateway/c/gw_parallel.c
610@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciparallel_la_CPPFLAGS) $(CPPFLAGS) $(libsciparallel_la_CFLAGS) $(CFLAGS) -MT libsciparallel_la-gw_parallel.lo -MD -MP -MF $(DEPDIR)/libsciparallel_la-gw_parallel.Tpo -c -o libsciparallel_la-gw_parallel.lo `test -f 'sci_gateway/c/gw_parallel.c' || echo '$(srcdir)/'`sci_gateway/c/gw_parallel.c
611@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsciparallel_la-gw_parallel.Tpo $(DEPDIR)/libsciparallel_la-gw_parallel.Plo
612@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sci_gateway/c/gw_parallel.c' object='libsciparallel_la-gw_parallel.lo' libtool=yes @AMDEPBACKSLASH@
613@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
614@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciparallel_la_CPPFLAGS) $(CPPFLAGS) $(libsciparallel_la_CFLAGS) $(CFLAGS) -c -o libsciparallel_la-gw_parallel.lo `test -f 'sci_gateway/c/gw_parallel.c' || echo '$(srcdir)/'`sci_gateway/c/gw_parallel.c
615
616.cpp.o:
617@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
618@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
619@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
620@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
621@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
622
623.cpp.obj:
624@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
625@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
626@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
627@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
628@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
629
630.cpp.lo:
631@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
632@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
633@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
634@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
635@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
636
637libsciparallel_la-sci_parallel_run.lo: sci_gateway/cpp/sci_parallel_run.cpp
638@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciparallel_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libsciparallel_la-sci_parallel_run.lo -MD -MP -MF $(DEPDIR)/libsciparallel_la-sci_parallel_run.Tpo -c -o libsciparallel_la-sci_parallel_run.lo `test -f 'sci_gateway/cpp/sci_parallel_run.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_parallel_run.cpp
639@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libsciparallel_la-sci_parallel_run.Tpo $(DEPDIR)/libsciparallel_la-sci_parallel_run.Plo
640@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='sci_gateway/cpp/sci_parallel_run.cpp' object='libsciparallel_la-sci_parallel_run.lo' libtool=yes @AMDEPBACKSLASH@
641@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
642@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciparallel_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libsciparallel_la-sci_parallel_run.lo `test -f 'sci_gateway/cpp/sci_parallel_run.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_parallel_run.cpp
643
644mostlyclean-libtool:
645 -rm -f *.lo
646
647clean-libtool:
648 -rm -rf .libs _libs
649install-libsciparallel_la_etcDATA: $(libsciparallel_la_etc_DATA)
650 @$(NORMAL_INSTALL)
651 test -z "$(libsciparallel_la_etcdir)" || $(MKDIR_P) "$(DESTDIR)$(libsciparallel_la_etcdir)"
652 @list='$(libsciparallel_la_etc_DATA)'; test -n "$(libsciparallel_la_etcdir)" || list=; \
653 for p in $$list; do \
654 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
655 echo "$$d$$p"; \
656 done | $(am__base_list) | \
657 while read files; do \
658 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libsciparallel_la_etcdir)'"; \
659 $(INSTALL_DATA) $$files "$(DESTDIR)$(libsciparallel_la_etcdir)" || exit $$?; \
660 done
661
662uninstall-libsciparallel_la_etcDATA:
663 @$(NORMAL_UNINSTALL)
664 @list='$(libsciparallel_la_etc_DATA)'; test -n "$(libsciparallel_la_etcdir)" || list=; \
665 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
666 test -n "$$files" || exit 0; \
667 echo " ( cd '$(DESTDIR)$(libsciparallel_la_etcdir)' && rm -f" $$files ")"; \
668 cd "$(DESTDIR)$(libsciparallel_la_etcdir)" && rm -f $$files
669install-libsciparallel_la_rootDATA: $(libsciparallel_la_root_DATA)
670 @$(NORMAL_INSTALL)
671 test -z "$(libsciparallel_la_rootdir)" || $(MKDIR_P) "$(DESTDIR)$(libsciparallel_la_rootdir)"
672 @list='$(libsciparallel_la_root_DATA)'; test -n "$(libsciparallel_la_rootdir)" || list=; \
673 for p in $$list; do \
674 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
675 echo "$$d$$p"; \
676 done | $(am__base_list) | \
677 while read files; do \
678 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libsciparallel_la_rootdir)'"; \
679 $(INSTALL_DATA) $$files "$(DESTDIR)$(libsciparallel_la_rootdir)" || exit $$?; \
680 done
681
682uninstall-libsciparallel_la_rootDATA:
683 @$(NORMAL_UNINSTALL)
684 @list='$(libsciparallel_la_root_DATA)'; test -n "$(libsciparallel_la_rootdir)" || list=; \
685 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
686 test -n "$$files" || exit 0; \
687 echo " ( cd '$(DESTDIR)$(libsciparallel_la_rootdir)' && rm -f" $$files ")"; \
688 cd "$(DESTDIR)$(libsciparallel_la_rootdir)" && rm -f $$files
689install-libsciparallel_la_sci_gatewayDATA: $(libsciparallel_la_sci_gateway_DATA)
690 @$(NORMAL_INSTALL)
691 test -z "$(libsciparallel_la_sci_gatewaydir)" || $(MKDIR_P) "$(DESTDIR)$(libsciparallel_la_sci_gatewaydir)"
692 @list='$(libsciparallel_la_sci_gateway_DATA)'; test -n "$(libsciparallel_la_sci_gatewaydir)" || list=; \
693 for p in $$list; do \
694 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
695 echo "$$d$$p"; \
696 done | $(am__base_list) | \
697 while read files; do \
698 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libsciparallel_la_sci_gatewaydir)'"; \
699 $(INSTALL_DATA) $$files "$(DESTDIR)$(libsciparallel_la_sci_gatewaydir)" || exit $$?; \
700 done
701
702uninstall-libsciparallel_la_sci_gatewayDATA:
703 @$(NORMAL_UNINSTALL)
704 @list='$(libsciparallel_la_sci_gateway_DATA)'; test -n "$(libsciparallel_la_sci_gatewaydir)" || list=; \
705 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
706 test -n "$$files" || exit 0; \
707 echo " ( cd '$(DESTDIR)$(libsciparallel_la_sci_gatewaydir)' && rm -f" $$files ")"; \
708 cd "$(DESTDIR)$(libsciparallel_la_sci_gatewaydir)" && rm -f $$files
709install-libsciparallel_la_includeHEADERS: $(libsciparallel_la_include_HEADERS)
710 @$(NORMAL_INSTALL)
711 test -z "$(libsciparallel_la_includedir)" || $(MKDIR_P) "$(DESTDIR)$(libsciparallel_la_includedir)"
712 @list='$(libsciparallel_la_include_HEADERS)'; test -n "$(libsciparallel_la_includedir)" || list=; \
713 for p in $$list; do \
714 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
715 echo "$$d$$p"; \
716 done | $(am__base_list) | \
717 while read files; do \
718 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libsciparallel_la_includedir)'"; \
719 $(INSTALL_HEADER) $$files "$(DESTDIR)$(libsciparallel_la_includedir)" || exit $$?; \
720 done
721
722uninstall-libsciparallel_la_includeHEADERS:
723 @$(NORMAL_UNINSTALL)
724 @list='$(libsciparallel_la_include_HEADERS)'; test -n "$(libsciparallel_la_includedir)" || list=; \
725 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
726 test -n "$$files" || exit 0; \
727 echo " ( cd '$(DESTDIR)$(libsciparallel_la_includedir)' && rm -f" $$files ")"; \
728 cd "$(DESTDIR)$(libsciparallel_la_includedir)" && rm -f $$files
729
730ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
731 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
732 unique=`for i in $$list; do \
733 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
734 done | \
735 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
736 END { if (nonempty) { for (i in files) print i; }; }'`; \
737 mkid -fID $$unique
738tags: TAGS
739
740TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
741 $(TAGS_FILES) $(LISP)
742 set x; \
743 here=`pwd`; \
744 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
745 unique=`for i in $$list; do \
746 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
747 done | \
748 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
749 END { if (nonempty) { for (i in files) print i; }; }'`; \
750 shift; \
751 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
752 test -n "$$unique" || unique=$$empty_fix; \
753 if test $$# -gt 0; then \
754 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
755 "$$@" $$unique; \
756 else \
757 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
758 $$unique; \
759 fi; \
760 fi
761ctags: CTAGS
762CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
763 $(TAGS_FILES) $(LISP)
764 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
765 unique=`for i in $$list; do \
766 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
767 done | \
768 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
769 END { if (nonempty) { for (i in files) print i; }; }'`; \
770 test -z "$(CTAGS_ARGS)$$unique" \
771 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
772 $$unique
773
774GTAGS:
775 here=`$(am__cd) $(top_builddir) && pwd` \
776 && $(am__cd) $(top_srcdir) \
777 && gtags -i $(GTAGS_ARGS) "$$here"
778
779distclean-tags:
780 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
781
782distdir: $(DISTFILES)
783 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
784 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
785 list='$(DISTFILES)'; \
786 dist_files=`for file in $$list; do echo $$file; done | \
787 sed -e "s|^$$srcdirstrip/||;t" \
788 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
789 case $$dist_files in \
790 */*) $(MKDIR_P) `echo "$$dist_files" | \
791 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
792 sort -u` ;; \
793 esac; \
794 for file in $$dist_files; do \
795 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
796 if test -d $$d/$$file; then \
797 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
798 if test -d "$(distdir)/$$file"; then \
799 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
800 fi; \
801 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
802 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
803 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
804 fi; \
805 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
806 else \
807 test -f "$(distdir)/$$file" \
808 || cp -p $$d/$$file "$(distdir)/$$file" \
809 || exit 1; \
810 fi; \
811 done
812check-am: all-am
813 $(MAKE) $(AM_MAKEFLAGS) check-local
814check: check-am
815all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) all-local
816installdirs:
817 for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(libsciparallel_la_etcdir)" "$(DESTDIR)$(libsciparallel_la_rootdir)" "$(DESTDIR)$(libsciparallel_la_sci_gatewaydir)" "$(DESTDIR)$(libsciparallel_la_includedir)"; do \
818 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
819 done
820install: install-am
821install-exec: install-exec-am
822install-data: install-data-am
823uninstall: uninstall-am
824
825install-am: all-am
826 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
827
828installcheck: installcheck-am
829install-strip:
830 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
831 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
832 `test -z '$(STRIP)' || \
833 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
834mostlyclean-generic:
835
836clean-generic:
837
838distclean-generic:
839 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
840 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
841
842maintainer-clean-generic:
843 @echo "This command is intended for maintainers to use"
844 @echo "it deletes files that may require special tools to rebuild."
845clean: clean-am
846
847clean-am: clean-generic clean-libtool clean-local \
848 clean-pkglibLTLIBRARIES mostlyclean-am
849
850distclean: distclean-am
851 -rm -rf ./$(DEPDIR)
852 -rm -f Makefile
853distclean-am: clean-am distclean-compile distclean-generic \
854 distclean-local distclean-tags
855
856dvi: dvi-am
857
858dvi-am:
859
860html: html-am
861
862html-am:
863
864info: info-am
865
866info-am:
867
868install-data-am: install-data-local install-libsciparallel_la_etcDATA \
869 install-libsciparallel_la_includeHEADERS \
870 install-libsciparallel_la_rootDATA \
871 install-libsciparallel_la_sci_gatewayDATA
872
873install-dvi: install-dvi-am
874
875install-dvi-am:
876
877install-exec-am: install-pkglibLTLIBRARIES
878
879install-html: install-html-am
880
881install-html-am: install-html-local
882
883install-info: install-info-am
884
885install-info-am:
886
887install-man:
888
889install-pdf: install-pdf-am
890
891install-pdf-am:
892
893install-ps: install-ps-am
894
895install-ps-am:
896
897installcheck-am:
898
899maintainer-clean: maintainer-clean-am
900 -rm -rf ./$(DEPDIR)
901 -rm -f Makefile
902maintainer-clean-am: distclean-am maintainer-clean-generic
903
904mostlyclean: mostlyclean-am
905
906mostlyclean-am: mostlyclean-compile mostlyclean-generic \
907 mostlyclean-libtool
908
909pdf: pdf-am
910
911pdf-am:
912
913ps: ps-am
914
915ps-am:
916
917uninstall-am: uninstall-libsciparallel_la_etcDATA \
918 uninstall-libsciparallel_la_includeHEADERS \
919 uninstall-libsciparallel_la_rootDATA \
920 uninstall-libsciparallel_la_sci_gatewayDATA \
921 uninstall-pkglibLTLIBRARIES
922
923.MAKE: check-am install-am install-strip
924
925.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \
926 clean clean-generic clean-libtool clean-local \
927 clean-pkglibLTLIBRARIES ctags distclean distclean-compile \
928 distclean-generic distclean-libtool distclean-local \
929 distclean-tags distdir dvi dvi-am html html-am info info-am \
930 install install-am install-data install-data-am \
931 install-data-local install-dvi install-dvi-am install-exec \
932 install-exec-am install-html install-html-am \
933 install-html-local install-info install-info-am \
934 install-libsciparallel_la_etcDATA \
935 install-libsciparallel_la_includeHEADERS \
936 install-libsciparallel_la_rootDATA \
937 install-libsciparallel_la_sci_gatewayDATA install-man \
938 install-pdf install-pdf-am install-pkglibLTLIBRARIES \
939 install-ps install-ps-am install-strip installcheck \
940 installcheck-am installdirs maintainer-clean \
941 maintainer-clean-generic mostlyclean mostlyclean-compile \
942 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
943 tags uninstall uninstall-am \
944 uninstall-libsciparallel_la_etcDATA \
945 uninstall-libsciparallel_la_includeHEADERS \
946 uninstall-libsciparallel_la_rootDATA \
947 uninstall-libsciparallel_la_sci_gatewayDATA \
948 uninstall-pkglibLTLIBRARIES
949
950
951# This target enables tests for Scilab
952check-local: $(top_builddir)/scilab-bin test
953 @COMMAND="test_run('$(modulename)');quit";\
954 export LANG=C;\
955 $(top_builddir)/bin/scilab -nwni -nb -e "$$COMMAND"
956check-code:
957 if test -f build.xml; then \
958 $(ANT) checkstyle; \
959 fi
960 if test -x "$(SPLINT)"; then \
961 $(SPLINT) $(SPLINT_OPTIONS) -I$(top_srcdir)/modules/core/includes/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/localization/includes/ $(INCLUDE_FLAGS) $(CHECK_SRC); \
962 fi
963@NEED_JAVA_TRUE@java:
964# Some configurations needs to export JAVA_HOME in the current env
965@NEED_JAVA_TRUE@ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
966@NEED_JAVA_TRUE@ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
967@NEED_JAVA_TRUE@ if test -f build.xml -a $$USEANT -eq 1; then \
968@NEED_JAVA_TRUE@ $(ANT); \
969@NEED_JAVA_TRUE@ fi
970
971@NEED_JAVA_TRUE@clean-java:
972# Some configurations needs to export JAVA_HOME in the current env
973@NEED_JAVA_TRUE@ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
974@NEED_JAVA_TRUE@ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
975@NEED_JAVA_TRUE@ if test -f build.xml -a $$USEANT -eq 1; then \
976@NEED_JAVA_TRUE@ $(ANT) clean; \
977@NEED_JAVA_TRUE@ fi;
978
979# If the user request for the SWIG generation of the wrappers Java => C/C++
980# We call the target swig-build on the variable SWIG_WRAPPERS
981
982@SWIG_TRUE@swig: $(SWIG_WRAPPERS)
983@SWIG_TRUE@ @SWIG_PACKAGENAME=org.scilab.modules.$(modulename); \
984@SWIG_TRUE@ SWIG_OUTDIR=src/java/org/scilab/modules/$(modulename)/; \
985@SWIG_TRUE@ if test -n "$(SWIG_WRAPPERS)"; then \
986@SWIG_TRUE@ for file in $(SWIG_WRAPPERS) ; do \
987@SWIG_TRUE@ echo "Swig process of $$file ..."; \
988@SWIG_TRUE@ $(SWIG_BIN) $(SWIG_JAVA) -package $$SWIG_PACKAGENAME -outdir $$SWIG_OUTDIR $$file; \
989@SWIG_TRUE@ done; \
990@SWIG_TRUE@ fi
991
992# If the user request for the SWIG generation of the wrappers Java => C/C++
993# We call the target swig-build on the variable SWIG_WRAPPERS
994
995@GIWS_TRUE@giws: $(GIWS_WRAPPERS)
996@GIWS_TRUE@ @GIWS_OUTPUTDIR=src/jni/;\
997@GIWS_TRUE@ if test -n "$(GIWS_WRAPPERS)"; then \
998@GIWS_TRUE@ for file in $(GIWS_WRAPPERS) ; do \
999@GIWS_TRUE@ echo "GIWS process of $$file ..."; \
1000@GIWS_TRUE@ $(GIWS_BIN) --disable-return-size-array --output-dir $$GIWS_OUTPUTDIR --throws-exception-on-error --description-file $$file; \
1001@GIWS_TRUE@ done; \
1002@GIWS_TRUE@ fi
1003
1004macros:
1005 -@( if test ! -x $(top_builddir)/scilab-bin; then \
1006 echo "Error : Cannot build $< : Scilab has not been built"; \
1007 else \
1008 $(top_builddir)/bin/scilab -ns -nwni -e "exec('macros/buildmacros.sce');quit;";\
1009 fi)
1010
1011# Removes the macros
1012clean-macros:
1013# Removes macros (*.bin generated from .sci)
1014 @for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
1015 echo "rm -f $(builddir)/$$dir/$(MACROBINMASK)"; \
1016 rm -f $(builddir)/$$dir/$(MACROBINMASK); \
1017 done
1018
1019test:
1020# More tests could be added here
1021 @if test -f build.xml; then \
1022 $(ANT) test; \
1023 fi
1024
1025all-local: $(TARGETS_ALL)
1026
1027.sci.bin:
1028 -@( if test ! -x $(top_builddir)/scilab-bin; then \
1029 echo "Error : Cannot build $< : Scilab has not been build"; \
1030 else \
1031 echo "Creating $@"; \
1032 $(top_builddir)/bin/scilab -ns -nwni -e "exec('$(abs_srcdir)/$<');save('$(abs_srcdir)/$@');exit;"; \
1033 fi )
1034
1035install-html-local:
1036# If the user wants the help sources to be installed
1037@INSTALL_HELP_XML_TRUE@ @echo "-------- Install of XML sources of help files --------"; \
1038@INSTALL_HELP_XML_TRUE@ for lang in $(ALL_LINGUAS); do \
1039@INSTALL_HELP_XML_TRUE@ if test -d $(srcdir)/help/$$lang; then \
1040@INSTALL_HELP_XML_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/$$lang && \
1041@INSTALL_HELP_XML_TRUE@ if ls -lLd $(srcdir)/help/$$lang/$(DOCMASKXML) >/dev/null 2>&1; then \
1042@INSTALL_HELP_XML_TRUE@ for file in $(srcdir)/help/$$lang/$(DOCMASKXML) ; do \
1043@INSTALL_HELP_XML_TRUE@ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/$$lang" ; \
1044@INSTALL_HELP_XML_TRUE@ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/$$lang ; \
1045@INSTALL_HELP_XML_TRUE@ done ; \
1046@INSTALL_HELP_XML_TRUE@ fi; \
1047@INSTALL_HELP_XML_TRUE@ fi; \
1048@INSTALL_HELP_XML_TRUE@ done; \
1049@INSTALL_HELP_XML_TRUE@ @echo "-------- Install of MathML sources --------"; \
1050@INSTALL_HELP_XML_TRUE@ if test -d $(srcdir)/help/mml/; then \
1051@INSTALL_HELP_XML_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/mml/ && \
1052@INSTALL_HELP_XML_TRUE@ if ls -lLd $(srcdir)/help/mml/$(DOCMASKMML) >/dev/null 2>&1; then \
1053@INSTALL_HELP_XML_TRUE@ for file in $(srcdir)/help/mml/$(DOCMASKMML) ; do \
1054@INSTALL_HELP_XML_TRUE@ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/mml" ; \
1055@INSTALL_HELP_XML_TRUE@ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/mml ; \
1056@INSTALL_HELP_XML_TRUE@ done ; \
1057@INSTALL_HELP_XML_TRUE@ fi; \
1058@INSTALL_HELP_XML_TRUE@ fi
1059install-data-local:
1060# Install the tests
1061 @echo "-------- Install tests (if any) --------"; \
1062 for dir in $(TESTS_DIR) $(TESTS_DIREXT) ; do \
1063 if test -d $(srcdir)/$$dir/; then \
1064 $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
1065 for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
1066 if test -d "$(srcdir)/$$dir/$$file"; then \
1067 echo $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir/$$file; \
1068 $(mkinstalldirs) "$(DESTDIR)$(pkgmacrosdir)/$$dir/$$file"; \
1069 else \
1070 echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
1071 $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
1072 fi \
1073 done; \
1074 fi; \
1075 done
1076# Install the help chapter
1077 @echo "-------- Install the help chapter (if any) --------"; \
1078 for lang in $(HELP_CHAPTERLANG); do \
1079 HELPFILE=$(srcdir)/$(HELP_CHAPTERDIR)$$lang/$(HELP_CHAPTERFILE); \
1080 if test -f $$HELPFILE; then \
1081 echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
1082 $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
1083 echo $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
1084 $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
1085 fi; \
1086 done
1087# Install the demos & examples
1088 @echo "-------- Install demos & examples (if any) --------"; \
1089 for dir in $(DEMOS_DIR) $(DEMOS_DIREXT) $(EXAMPLES_DIR) $(EXAMPLES_DIREXT) ; do \
1090 if test -d $(srcdir)/$$dir/; then \
1091 $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir && \
1092 for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
1093 if test -d "$(srcdir)/$$dir/$$file"; then \
1094 echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir/$$file; \
1095 $(mkinstalldirs) "$(DESTDIR)$(pkgdocdir)/$$dir/$$file"; \
1096 else \
1097 echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
1098 $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
1099 fi \
1100 done; \
1101 fi; \
1102 done
1103# Install the macros
1104 @echo "-------- Install macros (if any) --------"; \
1105 for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
1106 $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
1107 if test -d $(srcdir)/$$dir/; then \
1108 FILELIST="$(srcdir)/$$dir/$(MACROMASK) $(srcdir)/$$dir/$(MACROBINMASK) $(srcdir)/$$dir/$(MACROBUILDMASK) $(srcdir)/$$dir/names $(srcdir)/$$dir/lib";\
1109 if test -n "$(MACROSSPECIALEXT)"; then \
1110 specialExtDir=""; \
1111 for specialExt in $(MACROSSPECIALEXT); do \
1112 specialExtDir="$$specialExtDir $(srcdir)/$$dir/$$specialExt"; \
1113 done; \
1114 FILELIST="$$FILELIST $$specialExtDir"; \
1115 fi; \
1116 for file in `ls -1 $$FILELIST 2>/dev/null`; do \
1117 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgmacrosdir)/$$dir" ; \
1118 $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgmacrosdir)/$$dir ; \
1119 done; \
1120 fi; \
1121 done
1122# Install java files (.jar)
1123 @if ls -lLd $(srcdir)/$(JARDIR)$(JARMASK) >/dev/null 2>&1; then \
1124 echo "-------- Install jar files --------"; \
1125 $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(JARDIR); \
1126 for file in $(srcdir)/$(JARDIR)$(JARMASK); do\
1127 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/$(JARDIR)" ; \
1128 $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/$(JARDIR) ; \
1129 done ; \
1130 fi
1131
1132########### CLEAN ###################
1133# Clean macros and help (generated automatically by Scilab)
1134@NEED_JAVA_TRUE@clean-local: clean-java clean-macros
1135@NEED_JAVA_FALSE@clean-local: clean-macros
1136
1137distclean-local:
1138 rm -f $(builddir)/help/*/.last_successful_build_javaHelp $(builddir)/help/*/.list_*
1139
1140.PHONY: macros java swig giws
1141
1142# Tell versions [3.59,3.63) of GNU make to not export all variables.
1143# Otherwise a system limit (for SysV at least) may be exceeded.
1144.NOEXPORT:
diff --git a/scilab/modules/parallel/etc/parallel.quit b/scilab/modules/parallel/etc/parallel.quit
new file mode 100644
index 0000000..870ee1f
--- /dev/null
+++ b/scilab/modules/parallel/etc/parallel.quit
@@ -0,0 +1,8 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) 2010 - DIGITEO - Allan CORNET
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
diff --git a/scilab/modules/parallel/etc/parallel.start b/scilab/modules/parallel/etc/parallel.start
new file mode 100644
index 0000000..870ee1f
--- /dev/null
+++ b/scilab/modules/parallel/etc/parallel.start
@@ -0,0 +1,8 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) 2010 - DIGITEO - Allan CORNET
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
diff --git a/scilab/modules/parallel/help/en_US/addchapter.sce b/scilab/modules/parallel/help/en_US/addchapter.sce
new file mode 100644
index 0000000..f23a242
--- /dev/null
+++ b/scilab/modules/parallel/help/en_US/addchapter.sce
@@ -0,0 +1,11 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) 2010 - DIGITEO - Allan CORNET
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10add_help_chapter("Parallel", SCI + "/modules/parallel/help/en_US", %T);
11
diff --git a/scilab/modules/parallel/help/en_US/parallel_run.xml b/scilab/modules/parallel/help/en_US/parallel_run.xml
new file mode 100644
index 0000000..8708e74
--- /dev/null
+++ b/scilab/modules/parallel/help/en_US/parallel_run.xml
@@ -0,0 +1,621 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2010 - DIGITEO Bernard HUGUENEY
5 *
6 * This file must be used under the terms of the CeCILL.
7 * This source file is licensed as described in the file COPYING, which
8 * you should have received as part of this distribution. The terms
9 * are also available at
10 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11 *
12 -->
13<refentry version="5.0-subset Scilab" xml:id="parallel_run" xml:lang="en"
14 xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns3="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20 <info>
21 <pubdate>$LastChangedDate$</pubdate>
22 </info>
23
24 <refnamediv>
25 <refname>parallel_run</refname>
26
27 <refpurpose>parallel calls to a function</refpurpose>
28 </refnamediv>
29
30 <refsynopsisdiv>
31 <title>Calling Sequence</title>
32
33 <synopsis>[R1[,…,Rm]]=parallel_run(A1[,…,Ak], f[,types][,dims], p)</synopsis>
34 </refsynopsisdiv>
35
36 <refsection>
37 <title>Parameters</title>
38
39 <variablelist>
40 <varlistentry>
41 <term>Ai</term>
42
43 <listitem>
44 <para>Argument matrix of scalars (real) for function f. The Ai
45 matrices do not need to have the same number of columns. Let n be
46 the largest number of columns for the Ai : f will be called <literal>n</literal> times
47 with arguments Ai(:,k) for k=1…n. For Ai with less than n
48 columns, the columns are 'recycled' and the kth call is passed
49 Ai(:,(modulo(k-1,n)+1).</para>
50 </listitem>
51 </varlistentry>
52
53 <varlistentry>
54 <term>f</term>
55
56 <listitem>
57 <para>string containing the name of the function to call.</para>
58 </listitem>
59 </varlistentry>
60
61 <varlistentry>
62 <term>types</term>
63
64 <listitem>
65 <para>strings containing the type name (as per <link
66 linkend="typeof">typeof</link>) of results of the function <emphasis
67 role="bold">f</emphasis>. Currently, only &quot;constant&quot; for reals
68 (scalar or matrix) is supported. Defaults to &quot;constant&quot;.</para>
69 </listitem>
70 </varlistentry>
71
72 <varlistentry>
73 <term>dims</term>
74
75 <listitem>
76 <para>matrix with 1 or 2 columns containing the dimensions of the
77 results of the function <emphasis role="bold">f</emphasis>. Defaults
78 to 1 (i.e. scalar results).</para>
79 </listitem>
80 </varlistentry>
81
82 <varlistentry>
83 <term>p</term>
84
85 <listitem>
86 <para>parameters list (as created with <link
87 linkend="init_param">init_param</link>) used for tuning the
88 parallelization strategy. See <emphasis role="bold">&#167;Tuning the Parallelization with Configuration Parameters</emphasis> for the various parameters that can be set.</para>
89 </listitem>
90 </varlistentry>
91
92 <varlistentry>
93 <term>Ri</term>
94
95 <listitem>
96 <para>vectors of n (see above) columns containing the results of the
97 function called. The number of rows are given by the corresponding
98 size argument if any (1 otherwise).</para>
99 </listitem>
100 </varlistentry>
101 </variablelist>
102 </refsection>
103 <refsection>
104 <title>Description</title>
105
106 <para>parallel_run makes parallel calls (on a multicore system) to the
107 provided function on the supplied vectors of arguments. The function can
108 be the name of either a compiled foreign function (see <link
109 linkend="ilib_for_link">ilib_for_link</link>) or a Scilab macro. In the
110 latter case, the macro should not rely on side effects because some of them
111 will be lost (those performed in other processes than the main scilab
112 process). The number of
113 calls (and dimension of the result vectors) is given by the length of the
114 longest vector of arguments.</para>
115
116 <para>Except for side effects, [R1[,…,Rm]]=parallel_run(A1[,…,Ak],
117 'f'[,types][,dims][,C]) is equivalent to the Scilab pseudo code:</para>
118
119 <programlisting role="example"><![CDATA[for i = 1:max(size(A1,'c'),…,size(Ak,'c'))
120 [R1(:,i),…,Rm(:,i)]= f(A1(:(modulo(i-1,size(A1,'c'))+1),…,Ak(:(modulo(i-1,size(Ak,'c'))+1));
121end; ]]></programlisting>
122
123 <para>Note that the equivalent code does not need <literal>types</literal>, <literal>dims</literal> or <literal>p</literal>.
124 <literal>parallel_run</literal> needs them for performance reasons : <literal>types</literal> and <literal>dims</literal> are used
125 to pre-allocate the result variables and <literal>p</literal> is used to fine tune the
126 parallelization strategy.</para>
127
128 </refsection>
129 <refsection>
130 <title>Limitations</title>
131
132 <para>In order to provide the most efficient implementation possible, the least that parallel_run can do is to avoid imposing an overhead over an explicit loop. Unfortunately, this can only be achieved on some data structures.
133For matrices of scalar, extracting a single column to pass as argument to the function can be done very efficiently.
134Not so for matrices of strings or sparse matrices (not to mention lists !).
135For now, parallel_run only handles arguments and results of scalar matrices of real values and the <emphasis role="bold">types</emphasis> argument is not used.
136</para>
137 <para>Furthermore, no locking primitives are available in Scilab to handle concurrent accesses to shared variables.
138For this reason, the concurrent execution of Scilab macros cannot be safe in a shared memory environment and each parallel execution must be done in a separate memory space. As a result, one should not rely on side effects such as modifying variables from outer scope : only the data stored into the result variables will be copied back into the calling environment.
139</para>
140 <para>A last limitation imposed by the aim to minimize data shuffling info memory is that no stack resizing (via <link linkend="gstacksize">gstacksize()</link> or via <link linkend="stacksize">stacksize()</link>) should take place during a call to <literal>parallel_run</literal> (neither by the function f nor by the prologue or epilogue cf. infra.).
141</para>
142 </refsection>
143 <refsection>
144 <title>Advanced usage</title>
145<para>
146To achieve maximum performance and void any unwarranted copy and heavy context switching, it is possible to use parallel_run on compiled foreign functions. Such and advanced usage of parallel_run is detailed bellow in <emphasis role="bold">&#167;&#160;Advanced Usage : Compiled Foreign Functions</emphasis>.</para>
147 </refsection>
148
149 <refsection>
150 <title>Examples </title>
151<refsection>
152<title>First steps </title>
153 <para>First we rewrite the most trivial loop with parallel_run:</para>
154
155 <programlisting role="example"><![CDATA[for i=1:10
156 res(i)= i*i;
157end;
158// for parallel_run, we need to have a function performing the computation
159function a= g(arg1)
160 a=arg1*arg1
161endfunction
162
163res=parallel_run(1:10, "g"); // res = [1., 4., 9., 16., 25., 36., 49., 64., 81., 100.]; ]]></programlisting>
164The matrix res was filled with res(i)= g(i), with concurrent calls to g(). To see that the calls to <literal>g</literal> are not sequential, we can add some output to the function :
165 <programlisting role="example"><![CDATA[function a= g(arg1)
166disp("called on "+string(arg1));
167 a=arg1*arg1;
168disp("computed "+string(a));
169endfunction
170
171res=parallel_run(1:6, "g"); // the actual output depends on the architecture (i.e. 4 cores) and current load
172 called on 3
173
174 computed 9
175
176 called on 2
177
178 called on 5
179
180 computed 25
181
182
183 computed 4
184
185 called on 1
186 called on 6
187
188 computed 36
189
190 computed 1
191
192 called on 4
193
194 computed 16]]></programlisting>
195As we can see, not only were the the calls to <literal>g</literal> 'out of order', but they where also interleaved.
196<para>
197<emphasis role="bold">Note :</emphasis> This example is for illustrative purposes only ! When the operations performed by the function are available in vector form, it is much more efficient to use these operators than to call parallel_run. For instance, the most efficient way to perform g() on a vector of values would be to rewrite it as <emphasis role="italic"> a= arg1 .* arg1</emphasis> an call it directly on the matrix of arguments (i.e res= g(1:10);). parallel_run is intended for more involved functions.
198</para>
199To illustrate the running time gain, we instrument the next example with calls to <link linkend="getdate">getdate()</link>. However, the next examples will focus only on the illustrative purpose irrespectively of any actual gain. Running the simplest Scilab function with a relevant signature on datasets small enough to be printed is unlikely to benefit from multicore parallel scheduling ! Each example will perform a computation with an explicit loop, and then the same computation with parallel_run.
200<title>Wallclock gain</title>
201<programlisting role="example"
202><![CDATA[function r=f(n)
203 if(n == 0)
204 r= 1;
205 else
206 r= n-m(f(n-1));
207 end;
208endfunction
209
210function r=m(n)
211 if(n == 0)
212 r= 0;
213 else
214 r= n - f(m(n-1));
215 end;
216endfunction;
217
218n_max=40;
219
220t0=getdate();
221for i=1:n_max
222 r(i)= m(i);
223end;
224etime(getdate(), t0) // output the wallclock time for the explicit loop computation
225
226t0=getdate();
227r= parallel_run(1:n_max,"m");
228etime(getdate(), t0) // output the wallclock time for the parallel_run computation, it should be lower that the previous on multicore architectures.]]></programlisting>
229<title>Plurality of arguments and returned values</title>
230 It is of course possible to have more than one argument and more than one returned value :
231 <programlisting role="example"
232><![CDATA[function [r_min, r_med, r_max]= min_med_max(a, b, c)
233 r_min=min(a,b,c); r_med=median([a,b,c]); r_max=max(a,b,c);
234endfunction
235
236N=10;
237A=rand(1:N);B=rand(1:N);C=rand(1:N);
238
239Min=zeros(N); Med=Min; Max=Min;
240for i =1:N
241 [Min(i), Med(i), Max(i)]= min_med_max(A(i), B(i), C(i));
242end;
243
244[Min,Med,Max]=parallel_run(A,B,C,"min_med_max");// equivalent to the previous loop.]]></programlisting>
245
246
247As we have seen in the Note of &#167;First steps, the best performance is achieved by making use of vector (1xn matrices) operations. With parallel_run, it is also possible to take advantage of those operations by taking vector arguments and returning vector results. When returning a vector, one must use the <literal>dims</literal> so that <literal>parallel_run</literal> knows beforehand the number of returned values to expect.
248<title>Vector arguments and results</title>
249 <programlisting role="example"
250><![CDATA[function r= quantiles(data, ranks)
251 tmp=gsort(data,'g','i');
252 r=tmp(ranks);
253endfunction
254
255N=100;
256data=matrix(rand(1:N*10), N, 10);
257
258R4_6_7=matrix(zeros(1:3*10),3,10);
259for i =1:10
260 R4_6_7(:,i)= quantiles(data(:,i),[4;6;7]);
261end;
262
263R4_6_7=parallel_run(data,[4;6;7],"quantiles", 3);// note the last argument to inform that quantiles returns 3 scalars.]]></programlisting>
264While it is only possible to pass vectors (1&#160;x&#160;n) as columns of argument and/or result matrices, it is easy to reshape any matrix into such vector to circumvent this restriction. The previous example was passing arguments with different numbers of columns. In fact, the second argument to pass to <literal>quantiles</literal> only has one columns, because all the calls to the function must be made with the same ranks. This column is recycled as if the second argument had as much columns as the first, all with the same values.
265<para>
266<emphasis role="bold">Note :</emphasis> In the previous example, the shape of the second argument is of utmost importance for parallel_run ! While it was possible to write <emphasis role="italic">R4_6_7(:,i)= quantiles(data(:,i),[4<emphasis role="bold">,</emphasis>6<emphasis role="bold">,</emphasis>7]);</emphasis> (note the comma) in the explicit loop, calling <emphasis role="italic">parallel_run(data,[4;6;7],"quantiles", 3)</emphasis> would have computed a very different result :
267 <programlisting role="example"
268><![CDATA[// with previous definitions
269-->parallel_run(data,[4;6;7],"quantiles", 3)
270ans =
271
272 0.0000426 0.0000512 0.0000387 0.0000271 0.0000175 0.0000462 0.0000243 0.0000302 0.0000483 0.0000099
273 0.0000799 0.0000681 0.0000516 0.0000435 0.0000576 0.0000645 0.0000700 0.0000478 0.0000604 0.0000252
274 0.0000963 0.0000953 0.0000649 0.0000452 0.0000650 0.0000805 0.0000793 0.0000615 0.0000666 0.0000335
275-->parallel_run(data,[4,6,7],"quantiles", 3)
276 ans =
277
278 0.0000426 0.0000681 0.0000649 0.0000271 0.0000576 0.0000805 0.0000243 0.0000478 0.0000666 0.0000099
279 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
280 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]]></programlisting>
281The second call to <literal>parallel_run</literal> has a second argument of 3 columns and 1 row, so each call to <literal>quantiles</literal> only gets 1 scalar as second argument. The first call to <literal>quantiles</literal> gets '4' and returns the 4th value of the first columns of data. This is confirmed by the fact that the returned value (0.0000426) is the same as the first returned by the previous call to <literal>parallel_run</literal> (which returned the 4th, 6th and 7th values). For the second call to <literal>parallel_run</literal>, the two other values of the first result column (here 0. ) are undefined because we stated that <literal>quantiles</literal> would return 3 values (the last argument to <literal>parallel_run</literal> ) while in fact <literal>quantiles</literal> only returned one (because it only got one rank as second argument). The second call to <literal>quantiles</literal> gets '6' and returns the 6th value of the second columns of data. This is confirmed by the fact that the returned value (0.0000681) is the same as the first returned by the previous call to <literal>parallel_run</literal> (which returned the 4th, 6th and 7th values). For the second call to <literal>parallel_run</literal>, the two other values of the second result column (here 0. ) are undefined for the reason we have just seen. The third call to <literal>quantiles</literal> gets '7' and computes the 7th rank. For the next calls, the argument matrix with only three columns has its columns recycled so that <literal>quantiles</literal> gets '4' and then '6' and then '7' and then '4' etc.
282
283</para>
284<title>Handling other data types</title>
285
286 <refsection>
287<title>Handling other argument types</title>
288While it is not possible to pass or return most Scilab types with functions called by <literal>parallel_run</literal>, this does not mean that one cannot interact with any data structure. The easiest is to read from any kind of data type: as the global environment is shared amongst the parallel execution context, one can just pass column numbers instead of columns for instance, and let the macro access the data.
289
290 <refsection>
291<title>Handling a sparse matrix argument</title>
292 The following code sample shows how to access to elements of a sparse matrix, to compute quantiles of those elements.
293
294 <programlisting role="example"
295><![CDATA[N=5; // size of a block
296L=10; // number of blocks
297
298
299data=spzeros(N*L,N*L);
300for k=1:L // init diagonal blocks of sparse matrix with random numbers
301 kk=(k-1)*N+1:k*N;
302 data(kk,kk)=matrix(rand(1:N*N),N,N);
303end
304// function to compute quantiles in blocks from a the data sparse matrix
305function r= quantiles_sparse(indices_i, indices_j, ranks)
306 tmp=gsort(full(data(indices_i, indices_j)),'g','i');
307 r=tmp(ranks);
308endfunction
309// compute quantiles of diagonal blocks
310// with explicit loop
311R3_6_9=matrix(zeros(1:3*L),3,L);
312for k=1:L
313 kk=(k-1)*N+1:k*N;
314 R3_6_9(:,k)=quantiles_sparse(kk,kk, [3,6,9]);
315end;
316// compute quantiles of diagonal blocks
317// with parallel_run
318idx=matrix(1:(L*N), N,L);
319R3_6_9=parallel_run(idx,idx,[3;6;9],"quantiles_sparse",3);]]></programlisting>
320</refsection>
321 <refsection>
322<title>Handling a matrix of strings argument</title>
323 The following code sample shows how to access to elements of a matrix of strings, to compute the number of digits in those strings..
324
325 <programlisting role="example"
326><![CDATA[a=["a1";"b2b";"1cc2c";"4d555"]
327
328function result=count_digits(str)
329 result=sum(isdigit(str));
330endfunction
331
332for i=1:size(a,'r')
333 nb_digits(:,i)=count_digits(a(i));
334end;
335
336function result=count_digits_i(index) // we must define another function taking an index argument
337 result=sum(isdigit(a(index))); // and accessing the string from the variable in outer scope
338endfunction
339
340nb_digits= parallel_run(1:size(a,'r'),"count_digits_i");]]></programlisting>
341</refsection>
342</refsection>
343
344 </refsection>
345 <refsection>
346<title>Handling other result types</title>
347Other result types are much harder to handle and should be avoid if at all possible. It would be useless to write to variables from outer scope because each execution environment has its own copy of the memory space. The only solution is to find a mapping to a vector of scalars and channel the result data through it.
348
349 <refsection>
350<title>Handling a sparse matrix argument and result type</title>
351 The following code sample shows how to access to elements of a sparse matrix, to compute the invert of a block diagonal sparse matrix, and return the result in a sparse matrix.
352
353 <programlisting role="example"
354><![CDATA[N=5; // size of a block
355L=10; // number of blocks
356
357
358data=spzeros(N*L,N*L);
359for k=1:L// init sparse matrix with random diagonal blocks
360 kk=(k-1)*N+1:k*N;
361 data(kk,kk)=matrix(rand(1:N*N),N,N);
362end
363
364// invert the diagonal blocks of the sparse matrix
365// with explicit loop
366r=data;
367for k=1:L
368 kk=(k-1)*N+1:k*N;
369 r(kk,kk)=inv(data(kk,kk));
370end;
371
372// function to compute the invert of a block from the sparse matrix
373// it cannot take a sparse matrix argument so it must take the block number (k)
374// a retrieve the block from the variable data in outer scope
375// it also cannot put the result directly in a sparse matrix result
376// so we return the full matrix of the inverted block
377function r= invert_one_block(block_size,k)
378 kk=(k-1)*block_size+1:k*block_size;
379 r=full(inv(data(kk,kk)));// data from global scope
380endfunction;
381
382// function to make a sparse matrix and fill it with the full results
383// from parallel_run
384function r=to_sparse(full_diag,block_size) // full_diag is L * block_size^2
385s=size(full_diag);
386nb_blocks=s(2);
387r=data;//data from global scope
388for k=1:s(2)
389 kk=(k-1)*block_size+1:k*block_size;
390 r(kk,kk)= matrix(full_diag(1:s(1),k),block_size,block_size);
391end
392endfunction
393
394// call parallel_run() to operate on blocks of the sparse matrix
395// and to_sparse() to build the sparse result
396r=to_sparse(parallel_run(N,1:L,"invert_one_block",[N,N]),N);]]></programlisting>
397</refsection>
398 <refsection>
399<title>Handling matrices of strings as argument and result type</title>
400 The following uses the workaround seen in <emphasis role="bold">&#167;Handling a matrix of strings argument</emphasis> to access a string matrix argument, and shows how to return strings by using their numeric representation with ascii(), to flip odd characters in strings.
401
402 <programlisting role="example"
403><![CDATA[a=["one a";"b";"c and a word"];
404
405// only works for ASCII
406function p=censor_odds(str)
407odds=(0:((length(str)-1)/2))*2+1;
408p=ascii(str);
409p(odds)= ascii('#');
410p=ascii(p);
411endfunction
412
413
414for i=1:size(a,'r')
415 res(i)=censor_odds(a(i));
416end;
417
418
419function p=censor_odds_i(i,max_len) // pass an index and the max length
420strlen=length(a(i));
421odds=(0:((strlen-1)/2))*2+1;
422p=ascii(a(i)+blanks(max_len-strlen));
423p(odds)= ascii('#');
424endfunction
425
426function v=censor_v(codes)
427for i=1:size(codes,'r')
428 v(i)=ascii(codes(i,:));
429end;
430endfunction
431
432len=max(length(a));
433res=ascii_v(parallel_run(1:size(a,'r'), len, "censor_odds_i",len)');]]></programlisting>
434</refsection>
435</refsection>
436
437 </refsection>
438<refsection>
439 <title>Advanced Usage : Compiled Foreign Functions</title>
440When aiming at maximum performance, it sometimes makes sense to rewrite a few lines of Scilab code in a compiled language such as C++, C or Fortran.
441 <link linkend="ilib_for_link">ilib_for_link</link> allows to do it easily from Scilab, and <literal>parallel_run</literal> allows you to run your compiled code on your multicore architecture. Moreover, as it is possible to make compiled code thread-safe, it is also possible to launch compiled foreign function in lightweight (with less scheduling overhead) shared memory workers (threads), as will be seen in REF Parameters.
442
443<refsection>
444 <title>Compiled Foreign Functions API</title>
445The restrictions imposed on the data types handled by <literal>parallel_run</literal>() allows to use a simpler API :
446 <programlisting role="example"><![CDATA[void f(void const* const* args, void *const* res)]]></programlisting>
447Both arguments refer to data of opaque type <literal>(void*)</literal> and the implementation has to know which kind of data it receives and cast the pointers accordingly.
448(Note that current implementation only supports double data, but integer types will soon be available.)
449
450<para> <emphasis role="bold">void const* const* args </emphasis> is a pointer to an array of the data of each argument Ai. If there is only one argument, then only args[0] is valid and contains the pointer to its data. Each argument i can be a vector (it is a column of the Scilab matrix argument) and args[i-1] contains the pointer to its data. If argument i is a scalar (Scilab matrix Ai has only one row), only args[i][0] is valid and contains the value. Note : the data referenced by **args is declared const because it refers to arguments of the function. However, the data is currently copied from from underlying Scilab variables before being passed to the function, so it can safely be overwritten by casting away the constness(but conversely cannot be used as in/out parameters). If k arguments are provided to parallel_run, the args[0]...args[k-1] will always be valid for each call, even if some arguments had less columns than others : parallel_run will handle the "recycling" shown in <emphasis role="bold">&#167;Description</emphasis>.
451</para>
452<para> <emphasis role="bold">void *const* res</emphasis> is a pointer to an array of the data of each result Ri. If there is only one argument, then only res[0] is valid and contains the pointer to its data. Each result i (counted from 0) can be a vector as specified by the dims argument and res[i] contains the pointer to its data. If res i is a scalar (default when no dims argument is used), only res[i][0] is valid and available to store the value.
453</para>
454</refsection>
455
456<refsection>
457 <title>Examples</title>
458The following examples are the compiled foreign function rewrite of those from the previous section. However, we will not handle other data types because accessing those data structures from compiled code would be outside the scope of this document. Furthermore, when speed is of essence (as usual when one goes to the length of rewriting some Scilab code into a compiled language) one should strive to stick to dense matrices.
459<refsection>
460
461<title>First steps </title>
462 <para>The most simple application of parallel_run is to</para>
463
464 <programlisting role="example"><![CDATA[function make_compiled_function(name, ext, code)
465 filename=name+ext;
466 mputl(code, filename);
467 ilib_for_link(fun_name,filename,[],"c");
468 exec loader.sce;
469 mdelete(filename);
470endfunction
471
472fun_name='test_fun';
473c_prog=['#include <math.h>'
474'void '+fun_name+'(void const* const* args, void *const* res) {'
475'*((double*)*res)= (((double*)args[0])[0])*(((double*)args[0])[0]);'
476'}'];
477make_compiled_function(fun_name, '.c',c_prog);
478
479res=parallel_run(1:10, fun_name);// res = [1., 4., 9., 16., 25., 36., 49., 64., 81., 100.]; ]]></programlisting>
480<title>Wallclock gain</title>
481In order to illustrate the parallelization gains, the next example includes an explicit loop calling a foreign c function with call.
482The remaining examples will only include the parallel_run version, as their purpose was already illustrated in the previous section.
483<programlisting role="example"
484><![CDATA[function make_compiled_function(name, ext, code)
485 filename=name+ext;
486 mputl(code, filename);
487 ilib_for_link(name,filename,[],"c");
488 exec loader.sce;
489 mdelete(filename);
490endfunction
491
492fun_name='male';
493c_prog=['static int m(int);'
494'static int f(int n) { return n ? (n-m(f(n-1))) : 1 ; }'
495'static int m(int n) { return n ? (n-f(m(n-1))) : 0 ; }'
496'void '+fun_name+'(double* res, double* n) '
497'{ *res= (double)m((int)*n);}'];
498
499make_compiled_function(fun_name, '.c',c_prog);
500
501t0=getdate();for i=1:200
502 res_c(i)=call(fun_name, i,2,"d","out", [1,1],1,"d");
503end;etime(getdate(), t0) // note that we ran the computation until m(200) !
504
505fun_name='male_p';
506// same implementation, only change is the API
507c_prog(4:5)=['void '+fun_name+'(void const* const* args, void *const* res) '
508'{ *((double*)*res)= (double)m((int)((double*)args[0])[0]); }'];
509make_compiled_function(fun_name, '.c',c_prog);
510t0=getdate();res=parallel_run(1:200, fun_name);etime(getdate(), t0)// execution time is shorter on multicore]]></programlisting>
511<title>Plurality of arguments and returned values</title>
512 It is of course possible to have more than one argument, and more than one returned value :
513 <programlisting role="example"
514><![CDATA[N=10;
515A=rand(1:N);B=rand(1:N);C=rand(1:N);
516
517
518f1=['#include <algorithm>',
519'extern ""C""{',
520' void min_med_max_cxx(void const*const* args, void*const* res){',
521' double a(((double const*const*)args)[0][0]),b(((double const*const*)args)[1][0]),c(((double const*const*)args)[2][0]);',
522' if(b<a){ std::swap(a,b);}',
523' if(c<a){ std::swap(a,c);}',
524' if(c<b){ std::swap(b,c);}',
525' ((double*const*)res)[0][0]=a; ((double*const*)res)[1][0]=b; ((double*const*)res)[2][0]= c;',
526' return;',
527' }',
528'}'];
529
530mputl(f1,'min_med_max_cxx.cxx');
531ilib_for_link('min_med_max_cxx','min_med_max_cxx.cxx',[],"c")
532exec loader.sce
533
534
535[Min,Med,Max]=parallel_run(A,B,C, "min_med_max_cxx")]]></programlisting>
536
537
538<title>Vector arguments and results</title>
539 <programlisting role="example"
540><![CDATA[f1=['#include<algorithm>',
541'extern ""C""{',
542' void quantiles_cxx(void const*const* args, void*const* res){',
543' double * data(((double *const*)args)[0]);',
544' int data_size(static_cast<int>(((double const*const*)args)[1][0]));',
545' double const* ranks(((double *const*)args)[2]);',
546' int ranks_size(static_cast<int>(((double *const*)args)[3][0]));',
547' std::sort(data,data+data_size);',
548' for(int i(0); i != ranks_size; ++i)',
549' { ((double*const*)res)[0][i]= data[static_cast<int>(ranks[i])-1]; }',
550' return;',
551' }',
552'}'];
553mputl(f1,'quantiles_cxx.cxx');
554ilib_for_link('quantiles_cxx','quantiles_cxx.cxx',[],"c")
555exec loader.sce
556N=10;
557data=matrix(rand(1:N*N),N,N);
558
559R4_6_7=parallel_run(data',N,[4;6;7],3,"quantiles_cxx", 3);// note the last argument to inform that quantiles returns 3 scalars.]]></programlisting>
560
561
562 </refsection>
563
564 </refsection>
565 </refsection>
566
567
568<refsection>
569<title>Tuning the Parallelization with Configuration Parameters</title>
570
571As we have seen in the calling sequence, it is possible to add a configuration parameter as a last argument to parallel_run. This argument is handled by the <literal>params</literal> module and created with<link linkend="init_param">init_param</link>() (further informations on how to handle parameters can be found in the help pages of <link linkend="add_param">add_param</link>, <link linkend="set_param">set_param</link> and <link linkend="remove_param">remove_param</link>).
572
573<refsection>
574<title>Number of workers </title>
575The number of computing resources used in parallel can be set by the parameter <literal>nb_workers</literal>. The default value (0) uses as many workers as there are cores available.
576</refsection>
577<refsection>
578<title>Shared (threads) or separate (process) memory </title>
579While threads are the most efficient (lightweight) parallelization model, current Scilab implementation does not allow threadsafe code, so threads can only be used for foreign function (which must be threadsafe!) and processes are used for Scilab macros. The behavior is controlled par the <literal>shared_memory</literal> parameter which is a numeric value used as a boolean : threads are used if <literal>shared_memory</literal> is not 0 and <literal>f</literal> is a foreign function. This default value (0) implies separate memory (processes).
580</refsection>
581<refsection>
582<title>Dynamic scheduling </title>
583The number of function calls assigned to each worker can either be static (each worker gets the same number of function calls to do) or dynamic. In the latter case, function calls are assigned to workers when they are available. The behavior is controlled par the <literal>dynamic_scheduling</literal> parameter which is a numeric value used as a boolean : dynamic scheduling is used if <literal>dynamic_scheduling</literal> is not 0. This default value (1) implies dynamic scheduling. Static scheduling is more efficient when there are many calls to the function <literal>f</literal> and they will all take the same amount of time, while dynamic scheduling should be preferred when the amount a time for each call can varies a lot.
584</refsection>
585<refsection>
586<title>Chunk size </title>
587In order to reduce dynamic scheduling overhead, the n function calls are dispatched in chunks. The chunk size can be set by the parameter <literal>chunk_size</literal>. The default value (0) uses chunks of size 1. For static scheduling, there is virtually no scheduling overhead and the difference between the minimum and maximum number of function calls performed by the workers is at most 1.
588</refsection>
589<refsection>
590<title>Prologue and Epilogue </title>
591When using separate memory, it is not uncommon to perform process-specific initialization and finalization. For example, when making Monte Carlo simulations, one must insure that each process uses different random number generator initial state, otherwise all the processes would perform the same pseudo-random sequences in parallel ! The <literal>prologue</literal> (resp. <literal>epilogue</literal>) parameter is a string value either empty ("" default) or containing the name of a macro taking one scalar argument to be run upon starting (resp. ending) a new process (separate memory worker, see above). Each process is given a unique scalar passed as argument to both prologue and epilogue macros.
592<programlisting role="example"><![CDATA[function init_rand(n)
593 rand('seed',n);
594endfunction;
595
596function res= rand_macro(nb)
597 res= rand(1, nb);
598endfunction
599nb= 5;
600// We use a configuration parameter to force nb_workers = 2 even on monocore
601res= parallel_run([nb,nb],'rand_macro',nb,init_param('nb_workers', 2));// without seeding the 2 workers have the same rng state.
602
603res= parallel_run([nb,nb],'rand_macro',nb,init_param('nb_workers', 2,'prologue','init_rand'));// when setting the seed, they should have different random numbers ]]></programlisting>
604</refsection>
605
606
607</refsection>
608
609
610 <refsection>
611 <title>See Also</title>
612
613 <simplelist type="inline">
614 <member><link linkend="typeof">typeof</link></member>
615
616 <member><link linkend="ilib_for_link">ilib_for_link</link></member>
617 <member><link linkend="init_param">init_param</link></member>
618 <member><link linkend="call">call</link></member>
619 </simplelist>
620 </refsection>
621</refentry> \ No newline at end of file
diff --git a/scilab/modules/parallel/help/fr_FR/addchapter.sce b/scilab/modules/parallel/help/fr_FR/addchapter.sce
new file mode 100644
index 0000000..f23a242
--- /dev/null
+++ b/scilab/modules/parallel/help/fr_FR/addchapter.sce
@@ -0,0 +1,11 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) 2010 - DIGITEO - Allan CORNET
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10add_help_chapter("Parallel", SCI + "/modules/parallel/help/en_US", %T);
11
diff --git a/scilab/modules/parallel/help/pt_BR/addchapter.sce b/scilab/modules/parallel/help/pt_BR/addchapter.sce
new file mode 100644
index 0000000..1eee166
--- /dev/null
+++ b/scilab/modules/parallel/help/pt_BR/addchapter.sce
@@ -0,0 +1,11 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) 2010 - DIGITEO - Allan CORNET
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10add_help_chapter("Parallel", SCI + "/modules/parallel/help/pt_BR", %T);
11
diff --git a/scilab/modules/parallel/includes/dynlib_parallel.h b/scilab/modules/parallel/includes/dynlib_parallel.h
new file mode 100644
index 0000000..674d222
--- /dev/null
+++ b/scilab/modules/parallel/includes/dynlib_parallel.h
@@ -0,0 +1,28 @@
1/*
2* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3* Copyright (C) DIGITEO - 2010 - Allan CORNET
4*
5* This file must be used under the terms of the CeCILL.
6* This source file is licensed as described in the file COPYING, which
7* you should have received as part of this distribution. The terms
8* are also available at
9* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10*
11*/
12
13/*--------------------------------------------------------------------------*/
14#ifndef __DYNLIB_PARALLEL_H__
15#define __DYNLIB_PARALLEL_H__
16
17#ifdef _MSC_VER
18#ifdef PARALLEL_EXPORTS
19#define PARALLEL_IMPEXP __declspec(dllexport)
20#else
21#define PARALLEL_IMPEXP __declspec(dllimport)
22#endif
23#else
24#define PARALLEL_IMPEXP
25#endif
26
27#endif /* __DYNLIB_PARALLEL_H__ */
28/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/parallel/includes/gw_parallel.h b/scilab/modules/parallel/includes/gw_parallel.h
new file mode 100644
index 0000000..6aa5190
--- /dev/null
+++ b/scilab/modules/parallel/includes/gw_parallel.h
@@ -0,0 +1,22 @@
1/*
2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2010 - DIGITEO - Allan CORNET
4 *
5 * This file must be used under the terms of the CeCILL.
6 * This source file is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at
9 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10 *
11 */
12#ifndef __GW_PARALLEL_H__
13#define __GW_PARALLEL_H__
14/*--------------------------------------------------------------------------*/
15#include "dynlib_parallel.h"
16/*--------------------------------------------------------------------------*/
17PARALLEL_IMPEXP int gw_parallel(void);
18/*--------------------------------------------------------------------------*/
19int sci_parallel_run(char *fname,unsigned long fname_len);
20/*--------------------------------------------------------------------------*/
21#endif /* __GW_PARALLEL_H__ */
22/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/parallel/license.txt b/scilab/modules/parallel/license.txt
new file mode 100644
index 0000000..46ae42e
--- /dev/null
+++ b/scilab/modules/parallel/license.txt
@@ -0,0 +1,9 @@
1Copyright:
2Copyright (c) 2010 - DIGITEO
3
4License:
5This module must be used under the terms of the CeCILL.
6This module file is licensed as described in the file COPYING, which
7you should have received as part of this distribution. The terms
8are also available at
9http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
diff --git a/scilab/modules/parallel/macros/buildmacros.bat b/scilab/modules/parallel/macros/buildmacros.bat
new file mode 100644
index 0000000..1f23385
--- /dev/null
+++ b/scilab/modules/parallel/macros/buildmacros.bat
@@ -0,0 +1,11 @@
1
2rem Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3rem Copyright (C) 2008 - INRIA
4rem
5rem This file must be used under the terms of the CeCILL.
6rem This source file is licensed as described in the file COPYING, which
7rem you should have received as part of this distribution. The terms
8rem are also available at
9rem http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10
11@..\..\..\bin\scilex -nwni -ns -e exec('buildmacros.sce');quit;
diff --git a/scilab/modules/parallel/macros/buildmacros.sce b/scilab/modules/parallel/macros/buildmacros.sce
new file mode 100644
index 0000000..13f725e
--- /dev/null
+++ b/scilab/modules/parallel/macros/buildmacros.sce
@@ -0,0 +1,17 @@
1
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2010 - DIGITEO - Allan CORNET
4//
5// This file must be used under the terms of the CeCILL.
6// This source file is licensed as described in the file COPYING, which
7// you should have received as part of this distribution. The terms
8// are also available at
9// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10
11if (isdef('genlib') == %f) then
12 exec(SCI+'/modules/functions/scripts/buildmacros/loadgenlib.sce');
13end
14
15// genlib("parallellib", "SCI/modules/parallel/macros", %f, %t);
16
17
diff --git a/scilab/modules/parallel/macros/cleanmacros.bat b/scilab/modules/parallel/macros/cleanmacros.bat
new file mode 100644
index 0000000..6e6b7bc
--- /dev/null
+++ b/scilab/modules/parallel/macros/cleanmacros.bat
@@ -0,0 +1,13 @@
1
2rem Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3rem Copyright (C) 2008 - INRIA
4rem
5rem This file must be used under the terms of the CeCILL.
6rem This source file is licensed as described in the file COPYING, which
7rem you should have received as part of this distribution. The terms
8rem are also available at
9rem http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10
11@del *.bin 2>NUL
12@del lib 2>NUL
13@del names 2>NUL
diff --git a/scilab/modules/parallel/parallel.iss b/scilab/modules/parallel/parallel.iss
new file mode 100644
index 0000000..662da66
--- /dev/null
+++ b/scilab/modules/parallel/parallel.iss
@@ -0,0 +1,43 @@
1;
2; Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3; Copyright (C) 2010 - DIGITEO - Allan CORNET
4;
5; This file must be used under the terms of the CeCILL.
6; This source file is licensed as described in the file COPYING, which
7; you should have received as part of this distribution. The terms
8; are also available at
9; http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10;
11;--------------------------------------------------------------------------------------------------------------
12; parallel module
13;--------------------------------------------------------------------------------------------------------------
14;
15#define PARALLEL "parallel"
16;
17Source: bin\parallel.dll; DestDir: {app}\bin; Components: {#COMPN_PARALLEL}
18;
19Source: modules\{#PARALLEL}\changelog.txt; DestDir: {app}\modules\{#PARALLEL}; Components: {#COMPN_PARALLEL};
20Source: modules\{#PARALLEL}\license.txt; DestDir: {app}\modules\{#PARALLEL}; Components: {#COMPN_PARALLEL}
21Source: modules\{#PARALLEL}\readme.txt; DestDir: {app}\modules\{#PARALLEL}; Components: {#COMPN_PARALLEL}
22Source: modules\{#PARALLEL}\version.xml; DestDir: {app}\modules\{#PARALLEL}; Components: {#COMPN_PARALLEL}
23;
24Source: modules\{#PARALLEL}\sci_gateway\parallel_gateway.xml; DestDir: {app}\modules\{#PARALLEL}\sci_gateway; Components: {#COMPN_PARALLEL}
25;
26;Source: modules\{#PARALLEL}\includes\*.h; DestDir: {app}\modules\{#PARALLEL}\includes; Components: {#COMPN_PARALLEL}
27;
28Source: modules\{#PARALLEL}\etc\{#PARALLEL}.quit; DestDir: {app}\modules\{#PARALLEL}\etc; Components: {#COMPN_PARALLEL}
29Source: modules\{#PARALLEL}\etc\{#PARALLEL}.start; DestDir: {app}\modules\{#PARALLEL}\etc; Components: {#COMPN_PARALLEL}
30;
31;
32Source: modules\{#PARALLEL}\macros\buildmacros.sce; DestDir: {app}\modules\{#PARALLEL}\macros; Components: {#COMPN_PARALLEL}
33Source: modules\{#PARALLEL}\macros\buildmacros.bat; DestDir: {app}\modules\{#PARALLEL}\macros; Components: {#COMPN_PARALLEL}
34Source: modules\{#PARALLEL}\macros\cleanmacros.bat; DestDir: {app}\modules\{#PARALLEL}\macros; Components: {#COMPN_PARALLEL}
35;Source: modules\{#PARALLEL}\macros\*.bin; DestDir: {app}\modules\{#PARALLEL}\macros; Components: {#COMPN_PARALLEL}
36;Source: modules\{#PARALLEL}\macros\*.sci; DestDir: {app}\modules\{#PARALLEL}\macros; Components: {#COMPN_PARALLEL}
37;Source: modules\{#PARALLEL}\macros\lib; DestDir: {app}\modules\{#PARALLEL}\macros; Components: {#COMPN_PARALLEL}
38;Source: modules\{#PARALLEL}\macros\names; DestDir: {app}\modules\{#PARALLEL}\macros; Components: {#COMPN_PARALLEL}
39;
40;Source: modules\{#PARALLEL}\demos\*.*; DestDir: {app}\modules\{#PARALLEL}\demos; Flags: recursesubdirs; Components: {#COMPN_PARALLEL}
41;
42Source: modules\{#PARALLEL}\tests\*.*; DestDir: {app}\modules\{#PARALLEL}\tests; Flags: recursesubdirs; Components: {#COMPN_TESTS} and {#COMPN_PARALLEL}
43;--------------------------------------------------------------------------------------------------------------
diff --git a/scilab/modules/parallel/readme.txt b/scilab/modules/parallel/readme.txt
new file mode 100644
index 0000000..785eeec
--- /dev/null
+++ b/scilab/modules/parallel/readme.txt
@@ -0,0 +1 @@
README File
diff --git a/scilab/modules/parallel/sci_gateway/c/gw_parallel.c b/scilab/modules/parallel/sci_gateway/c/gw_parallel.c
new file mode 100644
index 0000000..3944a21
--- /dev/null
+++ b/scilab/modules/parallel/sci_gateway/c/gw_parallel.c
@@ -0,0 +1,38 @@
1/*
2* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3* Copyright (C) 2010 - DIGITEO - Allan CORNET
4*
5* This file must be used under the terms of the CeCILL.
6* This source file is licensed as described in the file COPYING, which
7* you should have received as part of this distribution. The terms
8* are also available at
9* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10*
11*/
12#include <string.h>
13#include "api_scilab.h"
14#include "gw_parallel.h"
15#include "MALLOC.h"
16#include "stack-c.h"
17#include "callFunctionFromGateway.h"
18
19/*--------------------------------------------------------------------------*/
20static gw_generic_table Tab[]=
21{
22 {sci_parallel_run,"parallel_run"}
23};
24/*--------------------------------------------------------------------------*/
25int gw_parallel(void)
26{
27 Rhs = Max(0, Rhs);
28
29 if(pvApiCtx == NULL)
30 {
31 pvApiCtx = (StrCtx*)MALLOC(sizeof(StrCtx));
32 }
33
34 pvApiCtx->pstName = (char*)Tab[Fin-1].name;
35 callFunctionFromGateway(Tab, SIZE_CURRENT_GENERIC_TABLE(Tab));
36 return 0;
37}
38/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/parallel/sci_gateway/cpp/sci_parallel_run.cpp b/scilab/modules/parallel/sci_gateway/cpp/sci_parallel_run.cpp
new file mode 100644
index 0000000..0ca7bd0
--- /dev/null
+++ b/scilab/modules/parallel/sci_gateway/cpp/sci_parallel_run.cpp
@@ -0,0 +1,871 @@
1/*
2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2010 - DIGITEO - Bernard HUGUENEY
4 *
5 * This file must be used under the terms of the CeCILL.
6 * This source file is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at
9 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10 *
11 */
12extern "C" {
13#include <stdio.h>
14#include "api_scilab.h"
15#include "stack-c.h"
16#include "gw_parallel.h"
17#include "dynamic_link.h"
18#include "MALLOC.h"
19#include "Scierror.h"
20#include "localization.h"
21#include "parameters.h"
22#include "stack-def.h" /* #define nlgh nsiz*4 */
23#include "stack-c.h" /* #define Nbvars C2F(intersci).nbvars, Top & cie */
24}
25
26#include <cstdlib>
27#include <cstring>
28/*#include <sstream> for debug purposes only */
29#include "parallel_run.hxx"
30
31
32
33#include <utility>
34#include <vector>
35#include <iostream>
36#include <algorithm>
37#include <functional>
38#include <limits>
39#include <iterator>
40/*
41 *
42 We can handle k Rhs et m Lhs. Currently, only real (double) matrix are implemented.
43 In fact, from a performance point of view, only Random-Acces data types where it is possible to "extract" a column in O(1)
44 (plus memcpy for macro a args) are making sense. This rules out most Scilab data types except for matrices of double / int.
45
46
47 [R1, ... , Rm] = parallel_run(A1, ... , Ak, f [,Types] [,Dims])
48
49 If Args are of diffrent sizes, the smallest are recycled.
50
51 Types : matrix of <=m strings of the names (as in typeof()) of the m lhs fo 'f'. default to "constant"
52 Rows : matrix of doubles 1 x <=m or 2 x <=m giving the nb of rows (or rows and columns) of the m lhs of f. default to 1
53
54 /!\ due to matrix data layout in Scilab (i.e. Fortran columnswise storage)
55 , a matrix [a11,a12,a13;a21,a22,a23] contains 3 (ncols) arguments of 2 (nrows) elements;
56*/
57
58extern "C"
59{
60 int sci_parallel_run(char *fname,unsigned long fname_len);
61}
62
63namespace
64{
65 /* to distinguish scilab variable 'address' from usual int* */
66 typedef int* scilabVar_t;
67
68 int currentTop; /* Top is fragile : this var mimics Top to avoid touching the real one */
69 char* currentFname= 0; /* name of the current Scilab function, to be used un error messages btw, what is the api_scilab equivalent of get_fname()?*/
70
71 SciErr err; /* store error status from api_scilab functions */
72
73 /* often, we handle nb of dimensions (rows and cols) at once.
74 * I'd have gone for std::size_t but Scilab uses int :( */
75 typedef std::pair<int, int> dim_t;
76
77 /* A scilab variable description is a typename and a matric dimension, just to add a default constructor on the inherited struct
78 * character string a static (no dynamic alloc/destruction)
79 */
80 struct scilabDesc_t :std::pair<char const*, dim_t>
81 {
82 scilabDesc_t(char const* name="constant", dim_t dim=dim_t(1,1)) /* default variable is a scalar i.e. 1x1 matrix of typename "constant" */
83 :std::pair<char const*, dim_t>(name, dim)
84 {
85 }
86/* for debug purposes only
87 std::string toString() const
88 {
89 std::stringstream buf;
90 buf<<std::pair<char const*, dim_t>::first<<" :"<<std::pair<char const*, dim_t>::second.first
91 <<" x "<<std::pair<char const*, dim_t>::second.second;
92 return buf.str();
93 }
94*/
95 };
96
97 /* types to be used in unions of function pointers */
98 typedef void (*functionToCall_t)(void const*const*, void*const*);
99 typedef void (*wrapperFunction_t)(double const*, double*);
100 typedef void (*loadedFunction_t)();
101 typedef void (*simpleFunction_t)(int );
102
103 /* ptr to data type */
104 typedef union {
105 double* doublePtr;
106 int* intPtr;
107 char* bytePtr;
108 char** strArrayPtr;
109 void* opaquePtr;
110 int sciCFunction;
111 } unionOfPtrs_t;
112
113 /* a functional version of getVarType that can be composed
114 * @param int* address of the scilab var
115 * @return the type (0 on error)
116 */
117 int getVarType(scilabVar_t var)
118 {
119 int res(0);
120 err= getVarType(pvApiCtx, var, &res);
121 return res;
122 }
123
124 /* return the typename (as in typeof() )
125 * @param int* address of the scilab var
126 * @return the name
127 * only implements the current valid types for parallel_run args.
128 */
129 char const* getTypeName(scilabVar_t var)
130 {
131 char const* res;
132 switch(getVarType(var))
133 {
134 case sci_matrix:
135 {
136 res= "constant";
137 break;
138 }
139 default:
140 {
141 res="unimplemented type in getTypeName";
142 }
143 }
144 return res;
145 }
146 /* get nb of Rows & Cols of a Scilab var : a fonctional version of getVarDimension that can be composed.
147 * @param the address of the variable
148 * @return the dimensions in a std::pair<int,int> of nb of rows, nb of columns. (0,0) on error.
149 */
150 dim_t getRowsCols(scilabVar_t var)
151 {
152 dim_t res(0,0);
153 err= getVarDimension(pvApiCtx, var, &res.first, &res.second);
154 return res;
155 }
156 /* get nb of Rows of a Scilab var (would not be needed with tr1)
157 * @param the address of the variable
158 * @return the nb of rows, 0 on error.
159 */
160 int getRows(scilabVar_t var)
161 {
162 return getRowsCols(var).first;
163 }
164 /* get nb of Columns of a Scilab var (would not be needed with tr1)
165 * @param the address of the variable
166 * @return the nb of columns, 0 on error.
167 */
168 int getCols(scilabVar_t var)
169 {
170 return getRowsCols(var).second;
171 }
172
173 /* test if the scilab var can be a function (either because it *is* one or because it can be the name of a function : 1x1 string marix)
174 * @param var the scilab var
175 * @return bool true iff it can be a function
176 */
177 bool isFunctionOrString(scilabVar_t var){
178 bool res;
179 switch(getVarType(var))
180 {
181 case sci_u_function :
182 case sci_c_function :
183 {
184 res= true;
185 break;
186 }
187 case sci_strings :
188 {
189 res= (getRows(var) == 1) && (getCols(var) == 1);
190 break;
191 }
192 default :
193 {
194 res= false;
195 }
196 }
197 return res;
198 }
199 /* get ptr to data of a Scilab variable
200 * @param var 'address' of the scilab var
201 * @return ptr to the data
202 */
203 unionOfPtrs_t getData(scilabVar_t var)
204 {
205 unionOfPtrs_t res={0};
206 switch(getVarType(var)) // unhandled data types should be caught during arg validation
207 {
208 case sci_matrix :
209 {
210 if(!isVarComplex(pvApiCtx, var))
211 {
212 int unused;
213 err= getMatrixOfDouble(pvApiCtx, var, &unused, &unused, &res.doublePtr);
214 }
215 else
216 {/* TODO suggest workaround in tutorial */
217
218// std::cerr<<"complex data not yet implemented var @"<<var<<std::endl;
219 }
220 break;
221 }
222 case sci_strings :
223 {
224// std::cerr<<"getData() string data not yet implemented"<<std::endl;
225 break;
226 }
227 default :
228 {
229// std::cerr<<"getData() data type"<<getVarType(var)<<" not yet implemented"<<std::endl;
230// abort();
231 }
232 }
233 return res;
234 }
235 /* get size of an element in a scilab matrix data structure.
236 * @param var 'address' of the scilab var
237 * @return the size in bytes, 0 on error.
238 */
239 std::size_t getSizeOfElement(scilabVar_t var)
240 {
241 std::size_t res(0);
242 switch(getVarType(var))
243 {
244 case sci_matrix :
245 {
246 res= sizeof(double);
247 break;
248 }
249 default : /* returns 0 */
250 {
251// std::cerr<<"getSizeOfElt() @"<<var<<":data type not yet implemented"<<std::endl;
252 }
253 }
254 return res;
255 }
256
257 /* get size of a columns in a scilab matrix data structure.
258 * @param var 'address' of the scilab var
259 * @return the size in bytes, 0 on error.
260 */
261 std::size_t getSizeOfColumn(scilabVar_t var)
262 {
263 return getSizeOfElement(var) * getRows(var) ;
264 }
265
266 /* get size of the data in a scilab matrix data structure.
267 * @param var 'address' of the scilab var
268 * @return the size in bytes, 0 on error.
269 */
270 std::size_t getSizeOfData(scilabVar_t var)
271 {
272 return getSizeOfColumn(var) * getCols(var) ;
273 }
274
275 /* computes a dimension that is either
276 * a slice (one column), or the concatenation of n matrix
277 * For n=1, the dimension is untouched.
278 * @param d dimension to slice or concatenate
279 * @return the new dimension
280 */
281 dim_t sliceOrConcat(dim_t d, std::size_t n=1)
282 {
283 switch(n)
284 {
285 case 0 :
286 {
287 d.second= 1; /* slice : one column */
288 break;
289 }
290 case 1:
291 break;
292 default :
293 {
294 d.first *= d.second;
295 d.second = static_cast<int>(n);
296 }
297 }
298 return d;
299 }
300
301 /* Get the description from a scilab variable.
302 * If n is provided, it instead returns the description of
303 * either a slice (n==0) or a concatenation (n>1) of the variable.
304 * @param var scilab variable address
305 * @param n either slice or concatenation
306 * @return the description
307 */
308 scilabDesc_t getDesc(scilabVar_t var, std::size_t n=1)
309 {
310 return scilabDesc_t( getTypeName(var),sliceOrConcat(getRowsCols(var), n));
311 }
312
313 /* allocate a scilab variable according to a provided description.
314 * If n is provided, it instead allocates
315 * either a slice (n==0) or a concatenation (n>1) of the variable.
316 * @param d scilab variable description
317 * @param n either slice or concatenation
318 * @return the variable address
319 * only real matrices are implemented yet.
320 */
321 scilabVar_t allocVar(scilabDesc_t d, std::size_t n=1)
322 {
323 scilabVar_t res(0);
324 if(std::strcmp(d.first, "constant")==0)
325 {
326 double* unused;
327 dim_t toAlloc(sliceOrConcat(d.second, n));
328 err= allocMatrixOfDouble(pvApiCtx, ++currentTop, toAlloc.first, toAlloc.second, &unused);
329 ++Nbvars;
330// std::cerr<<"alloc var :"<<d.toString()<<" @"<<(currentTop)<<" with Nbvars="<<Nbvars<<std::endl;
331 err= getVarAddressFromPosition(pvApiCtx, currentTop, &res);
332 }
333 else /* unhandled type should be caught at arg validation time */
334 {
335// std::cerr<<"allocVar() "<<d.first<<" data type not yet implemented"<<std::endl;
336 }
337 return res;
338 }
339 /* Ensures that the complete expected var is filled with reasonable default values
340 * when the returned var was smaller than expected
341 *
342 * i.e. we just copied the data from a resultVar @ varData
343 * when we were expecting an expectedVar : we fill the rest.
344 *
345 * @param d scilab variable description
346 * @param n either slice or concatenation
347 * @return the variable address
348 * only real matrices are implemented yet.
349 */
350 void fillUndefinedData(void* varData, scilabDesc_t resultVar, scilabDesc_t expectedVar)
351 {
352 if(!std::strcmp(resultVar.first, expectedVar.first))
353 {
354 if(!strcmp(resultVar.first, "constant"))
355 {
356 std::size_t const nbFilled(resultVar.second.first * resultVar.second.second);
357 std::fill_n(static_cast<double *>(varData)+ nbFilled
358 , expectedVar.second.first * expectedVar.second.second - nbFilled
359 ,std::numeric_limits<double>::quiet_NaN() );
360
361 }
362 }
363 }
364 /*
365 wrapper on a native c function or a scilab macro called on scilab variables.
366
367 constructed on :
368 - scilab variable for the function (external native function name, sci_c_function (buggy) or macro name)scilab matrices of arguments
369 - expected lhs
370
371 upon construction, allocate scilab result variables and computes all necessary meta data.
372 */
373 struct wrapper {
374
375 typedef std::vector<std::size_t> sizes_container;
376
377 /* wrapper contructor
378 * @param args_begin iterator to the first args of parallel_run
379 * @param function_it iterator to the function argument of parallel_run
380 * @param args_end iterator past the end of parallel_run args
381 * @param function_lhs number of lhs (of parallel_run and of the function: it is the same)
382 */
383 template<typename VarsIt>
384 wrapper(VarsIt begin, VarsIt functionIt, VarsIt end, std::size_t functionLhs)
385 {
386 registerArgs(begin, functionIt);
387 n= *std::max_element(argsNb.begin(), argsNb.end());
388 getFunction(*functionIt);
389 allocCompleteResults(begin, functionIt+1, end, functionLhs);
390 }
391
392 /* the member function performing the call to the function (foreign function of Scilab macro)
393 * @ param args array of ptrs to args data
394 * @ param res array of ptrs to res data
395 */
396 void operator()(void const** args, void ** res)
397 {
398 (*this.*(this->fPtr))(args, res);
399 }
400
401 /* It is idiomatic to pass functors by value in C++, but our wrapper is heavy,
402 * so we provide a lightweight handle */
403 struct handle
404 {
405 handle(wrapper& r) : w(r)
406 {
407 }
408 /* just forward to the underlying wrapper */
409 void operator()(void const** args, void ** res) const
410 {
411 w(args, res);
412 }
413 wrapper& w;
414 };
415 handle getHandle()
416 {
417 return handle(*this);
418 }
419 /* @return begin iterator to the array of pointers to arguments data */
420 void const*const* argsDataBegin() const
421 {
422 return &argsData[0].opaquePtr;
423 }
424 /* @return begin iterator to the array of arguments sizes */
425 std::size_t const* argsSizesBegin() const
426 {
427 return &argsSizes[0];
428 }
429 /* @return begin iterator to the array of arguments number of elements (they are not requires to have the same nb of elements */
430 std::size_t const* argsNbBegin() const
431 {
432 return &argsNb[0];
433 }
434 /* @return nb of tasks (calls) to perform = max(args_nb_begin(), args_nb_begin()+rhs) */
435 std::size_t tasksNb() const
436 {
437 return n;
438 }
439 /* @return begin iterator to the array of pointers to result data */
440 void * const* resDataBegin()
441 {
442 return &resData[0].opaquePtr;
443 }
444 /* @return begin iterator to the array of results sizes */
445 std::size_t const* resSizesBegin() const
446 {
447 return &resSizes[0];
448 }
449 /* @return nb of rhs vars of the function */
450 std::size_t nbRhs() const
451 {
452 return rhsDesc.size();
453 }
454 /* @return true if the underlying function is a foreign function, false if it is a Scilab macro */
455 bool isForeignFunction() const
456 {
457 return function.toCall !=0 ;
458 }
459
460 private:
461 /* ptr to foreign function (types used where storing, calling or wrapping) */
462 union{
463 functionToCall_t toCall;
464 loadedFunction_t toLoad;
465 wrapperFunction_t wrapper;
466 } function;
467 /* register a matrix of arguments to be used as rhs) */
468 template<typename ArgIt>
469 void registerArgs(ArgIt it, ArgIt end)
470 {
471 std::transform(it, end, std::back_inserter(argsData), &getData);
472 std::transform(it, end, std::back_inserter(argsSizes), &getSizeOfColumn);
473 std::transform(it, end, std::back_inserter(argsNb), &getCols);
474 std::transform(it, end, std::back_inserter(rhsDesc), std::bind2nd(std::ptr_fun(&getDesc), 0)); /* get a slice as model for function rhs*/
475 }
476
477 /* alloc the scilab variables that will hold the complete collection of results
478 * @param first_arg_position only used to compute the args positions for error messages
479 * @param res_types_begin, res_types_end iterator range on the args describing result, can be empty
480 * @param nb_lhs number of lhs */
481 template<typename VarPtrIt>
482 void allocCompleteResults(VarPtrIt begin, VarPtrIt resBegin, VarPtrIt resEnd, std::size_t nbLhs)
483 {
484 lhsDesc.resize(nbLhs);
485 if(resBegin != resEnd)
486 {
487 if(getVarType(*resBegin) == sci_strings)
488 {
489 // std::cerr<<"we have a type lhs arg\n";
490 ++resBegin;
491 }
492 if(resBegin != resEnd)
493 {
494 if(getVarType(*resBegin) == sci_matrix)
495 {
496 // std::cerr<<"we have a dim lhs arg\n";
497 dim_t const tmp(getRowsCols(*resBegin));
498 double const*const data(getData(*resBegin).doublePtr);
499 switch(tmp.second)
500 {
501
502 case 2:
503 {
504 // std::cerr<<"we have rows and cols\n";
505 for(int i(0); i < tmp.first && i< tmp.first*tmp.second; ++i)
506 {
507 lhsDesc[i].second.first= static_cast<int>(data[i]);
508 lhsDesc[i].second.second=static_cast<int>(data[i+tmp.first]);
509 }
510 break;
511 }
512 case 1:
513 {
514 // std::cerr<<"we have rows \n";
515 for(int i(0); i< tmp.first && i< tmp.first*tmp.second; ++i)
516 {
517 lhsDesc[i].second.first= static_cast<int>(data[i]);
518 }
519 break;
520 }
521 default :
522 {
523 Scierror(999,_("%s: Wrong size of input argument #%d: Number of columns are incompatible ")
524 ,currentFname, std::distance(begin, resBegin));
525 }
526 }
527 }
528 }
529 }
530 /* we want to have to result var at hand before calling the scilab macro so we must create it now before the args */
531 std::transform(lhsDesc.begin(), lhsDesc.end(), std::back_inserter(scilabCollectionsOfLhs), std::bind2nd(std::ptr_fun(&allocVar), n));
532 /* we store addr of result data and the size for the parallel wrapper */
533 std::transform(scilabCollectionsOfLhs.begin(), scilabCollectionsOfLhs.end(), std::back_inserter(resData), &getData);
534 std::transform(scilabCollectionsOfLhs.begin(), scilabCollectionsOfLhs.end(), std::back_inserter(resSizes), &getSizeOfColumn);
535 }
536
537 /* extract the function form the scilab variable (i.e.string) reprensenting it.
538 * @param v the variable
539 * @return nothing useful but GetRhsVar() macro wants to be able to return an int :(
540 */
541 int getFunction(scilabVar_t var) {
542 function.toCall= 0;
543 switch(getVarType(var))
544 {
545 case sci_c_function : {
546 int unused[2];
547 GetRhsVar(2, EXTERNAL_DATATYPE, unused, unused+1, &scilabFunction);
548 fPtr = &wrapper::macro<false>;
549 break;
550 }
551 case sci_strings : {
552 char* funName;
553 getAllocatedSingleString(pvApiCtx, var, &funName);
554 int found;
555 found=SearchInDynLinks(funName, &function.toLoad);
556 fPtr= &wrapper::nativeFunction;
557 if(found == -1)
558 {
559 /* should check amongst defined macros with getmacroslist (cf dans core/src/c/getvariablesname.c) and check that type is sci_XXX */
560 function.toCall=0;
561 scilabFunctionName= funName;
562 scilabFunctionNameLength= std::strlen(scilabFunctionName);
563 fPtr= &wrapper::macro<true>;
564 }
565 }
566 }
567 return 0;
568 }
569
570 /* performs the Scilab macro call
571 * @param byName bool template parameter tells if the macro is called by name or by ptr (ptr is currently broken).
572 * @param args array of ptrs to args data
573 * @param res array of ptr to res data
574 */
575 template<bool byName>
576 void macro(void const** args, void ** res) {
577 /* rhs models from */
578 int saveNbvars= Nbvars, saveTop= currentTop;
579 for( std::vector<scilabDesc_t>::const_iterator it(rhsDesc.begin())
580 ; it != rhsDesc.end(); ++it, ++args)
581 {
582 scilabVar_t scilabArg= allocVar(*it); /* create a var for a slice (col)of the parallel_run Rhs arg */
583 memcpy(getData(scilabArg).bytePtr, *args, getSizeOfData(scilabArg));
584 }
585
586 int sciRhs = static_cast<int>(rhsDesc.size());
587 int sciLhs = static_cast<int>(lhsDesc.size());
588
589 std::size_t dummyVars(0); /* alloc safety variable to ensure space on the stack upon return*/
590 int sciArgPos = saveTop+1;
591 for( ;sciRhs+dummyVars < sciLhs+maxSafetyLhs; ++dummyVars, ++Nbvars)
592 {
593 double* unused;
594 err= allocMatrixOfDouble(pvApiCtx, ++currentTop, 0, 0, &unused);
595 }
596 Nbvars = Rhs+Lhs+sciRhs;
597 if(byName)
598 {
599 C2F(scistring)(&sciArgPos, scilabFunctionName, &sciLhs, &sciRhs, static_cast<unsigned long>(scilabFunctionNameLength));
600 }
601 else
602 {
603 C2F(scifunction)(&sciArgPos, &scilabFunction, &sciLhs, &sciRhs);
604 }
605 // result r is now on first position on stack
606 {
607 Nbvars = static_cast<int>(Rhs + Lhs + sciRhs + dummyVars);
608 int resPos = Rhs + Lhs + 1; //+1
609
610 for( std::vector<scilabDesc_t>::iterator it(lhsDesc.begin())
611 ; it != lhsDesc.end(); ++it, ++resPos, ++res)
612 {
613 scilabVar_t scilabRes;
614 err= getVarAddressFromPosition(pvApiCtx, resPos, &scilabRes);
615 scilabDesc_t resDesc;
616 if(err.iErr)
617 {/* there was an error getting the result variable */
618 resDesc= *it; /* pretend we got the right type */
619 resDesc.second.first = resDesc.second.second= 0;/* but 0 elements */
620 }
621 else
622 { /* copy the returned data */
623 memcpy(*res, getData(scilabRes).bytePtr, getSizeOfData(scilabRes));
624 resDesc= getDesc(scilabRes);
625 }
626 fillUndefinedData(*res, resDesc, *it);
627 }
628 Nbvars= saveNbvars;
629 currentTop=saveTop;
630 }
631 }
632 void nativeFunction(void const** args, void ** res)
633 {
634 function.toCall(args, res);
635 }
636
637 /* we prealloc as much scilab var more than requested lhs in case the scilab macro call back returns more thant requested.*/
638 static unsigned int const maxSafetyLhs = 20;
639
640 std::size_t n; /* nb of calls to perform */
641 sizes_container argsSizes, argsNb, resSizes; /* sizes of arguments, nb of elements for each argument, sizes for results */
642 std::vector<unionOfPtrs_t> argsData; /* ptrs to args data */
643 std::vector<unionOfPtrs_t> resData; /* ptrs to res data */
644
645 /* the member function to call, dispatches to macro of foreign function */
646 void(wrapper::*fPtr)(void const** args, void ** res);
647
648 int scilabFunction; /* the scilab function 'ptr' for scifunction */
649 char* scilabFunctionName;/* the scilab function name for scistring */
650 std::size_t scilabFunctionNameLength;/* the scilab function name length for scistring */
651
652 /* store models of scilab lhs and rhs variables */
653 std::vector<scilabDesc_t> lhsDesc, rhsDesc;
654 std::vector<scilabVar_t> scilabCollectionsOfLhs; /* lhs vars of the parallel_run function : collections of the lhs form the function*/
655
656 };
657 /* Checks if the function parallel_run arguments are valid.
658 * 1 or more matrices of doubles
659 * 1 matrix of 1 string
660 * 0 or 1 matrix of strings and/or 1 matrix of doubles with 1 ou 2 columns
661 * 0 or 1 configuration plist
662 *
663 * @retun true is the args are valid */
664 bool check_args(void) {
665 {
666 if(Rhs<2) { return false; }
667 bool before_function(true), at_least_one_arg(false);
668 bool ok(true);
669 for( unsigned int pos(1); pos <= (unsigned int)Rhs && ok; ++pos) {
670 int* addr;
671 err= getVarAddressFromPosition(pvApiCtx, pos, &addr);
672 int type;
673 err= getVarType( pvApiCtx, addr, &type );
674 if (before_function) {
675 switch (type) {