Changeset e1b841 in git for Singular/LIB/parallel.lib
- Timestamp:
- Jan 7, 2012, 12:42:56 AM (12 years ago)
- Branches:
- (u'spielwiese', 'd1b01e9d51ade4b46b745d3bada5c5f3696be3a8')
- Children:
- 5abb0e7fdca82a2bad9778e410148c74d7b49a0b
- Parents:
- f1cfef36a45967a6dc88672e6efc050bf9c592b1
- git-author:
- Andreas Steenpass <steenpass@mathematik.uni-kl.de>2012-01-07 00:42:56+01:00
- git-committer:
- Andreas Steenpass <steenpass@mathematik.uni-kl.de>2012-08-02 18:26:50+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/parallel.lib
rf1cfef re1b841 3 3 category="General purpose"; 4 4 info=" 5 LIBRARY: parallel.lib An Interfacefor Parallelization5 LIBRARY: parallel.lib Tools for Parallelization 6 6 AUTHOR: Andreas Steenpass, e-mail: steenpass@mathematik.uni-kl.de 7 8 OVERVIEW: 9 This library provides tools to do several computations in parallel. They 10 are aimed at ordinary Singular users as well as authors of Singular 11 libraries. 12 @* Even without this library, it is possible to do execute self-defined 13 Singular commands in parallel using @ref{links}, but the handling of 14 such links can be quite tedious. With the pocedures described below, 15 this can be done by one-line commands. 16 @* There are many parallel 'skeletons' (i.e. ways in which parallel 17 tasks rely upon and interact with each other). A few of them are already 18 implemented. Future plans include an abstraction layer for modular 19 techniques, 'worker farms', and parallel tests. 7 20 8 21 SEE ALSO: link, modstd_lib, assprimeszerodim_lib … … 26 39 RETURN: a list, containing the results of commands[i] applied to arg[i], 27 40 i = 1, ..., size(commands). 28 @* The entries of the list commands must be strings.29 @* The entries of the list args must be lists.30 41 @* The procedure waits for N jobs to finish. 31 @* An optional timeout in ms can be provided. Default is 0 which 42 43 @* OPTIONAL PARAMETERS: 44 45 An optional timeout in ms can be provided. Default is 0 which 32 46 disables the timeout. 33 @* Supported linktypes are up to now \"ssi\" and \"mp\", see 47 48 Supported linktypes are up to now \"ssi\" and \"mp\", see 34 49 @ref{Ssi links} and @ref{MP links}. 50 51 Servers: 35 52 @* Each server is given by a list containing the address of the server, 36 53 the number of cores to use on this server and the command to start 37 Singular. If the address is \"localhost\", the processes will 38 be generated on the same machine using forks. If the command to 39 start Singular is \"\" (the empty string), \"Singular\" will be 40 used. Default is @code{list(\"localhost\", system(\"cpu\"), \"\")}. 41 There are some obvious shortcuts for servers, e.g. \"myserver\" is 54 Singular. 55 @* If the address is \"localhost\", the processes will be generated on 56 the same machine using forks. If the command to start Singular is 57 \"\" (the empty string), \"Singular\" will be used. 58 @* Default is @code{list(\"localhost\", system(\"cpu\"), \"\")}. 59 @* There are some obvious shortcuts for servers, e.g. \"myserver\" is 42 60 a shortcut for 43 61 @code{list(\"myserver\", [nb. of cores on myserver], \"\")}, or 3 44 62 for @code{list(\"localhost\", 3, \"\")}. 63 64 Memory limits: 45 65 @* If an intvec maxmemory of size @code{size(commands)} is given, the 46 66 i-th job will be killed if it uses more than maxmemory[i] MB of 47 67 memory. If maxmemory[i] is 0, there will be no restraint for the 48 68 i-th job. Default is @code{0:size(commands)}. 49 NOTE: The returned list may contain more than N results if several jobs 69 NOTE: The entries of the list commands must be strings. 70 @* The entries of the list args must be lists. 71 @* The returned list may contain more than N results if several jobs 50 72 finished \"at the same time\". It may contain less than N results in 51 73 the case of timeout or errors occurring. … … 542 564 ideal i = z8+z6+4z5+4z3+4z2+4, y-z2; 543 565 ideal j = 3x3y+x3+xy3+y2z2, 2x3z-xy-xz3-y4-z2, 2x2yz-2xy2+xz2-y4; 544 list commands = list("std", "primdecGTZ", "primdecSY", "std", "primdecGTZ",545 " primdecSY");566 list commands = list("std", "primdecGTZ", "primdecSY", 567 "std", "primdecGTZ", "primdecSY"); 546 568 list args = list(list(i), list(i), list(i), list(j), list(j), list(j)); 547 569 parallelWaitN(commands, args, 3);
Note: See TracChangeset
for help on using the changeset viewer.