Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 Ind
[Top of Book] [Contents] [Previous Chapter] [Next Chapter]

[MathJax off]

36 Parallel Computation - Core Functions
36.1
36.1-1 ChildProcess
36.1-2 ChildClose
36.1-3 ChildCommand
36.1-4 NextAvailableChild
36.1-5 IsAvailableChild
36.1-6 ChildPut
36.1-7 ChildGet
36.1-8 HAPPrintTo
36.1-9 HAPRead

### 36 Parallel Computation - Core Functions

#### 36.1

##### 36.1-1 ChildProcess

`‣ ChildProcess`( ) | ( function )

`‣ ChildProcess`( arg ) | ( function )

This starts a GAP session as a child process and returns a stream to the child process. If no argument is given then the child process is created on the local machine; otherwise the argument should be:
1) \(arg\)="computer.ac.wales" the address of a remote computer for which ssh has been configured to require no password from the user;
(2) \(arg\)=["-m", "100000M", "-T"] a list of GAP command line options;
(3) \(arg\)="computer.ac.wales", ["-m", "100000M", "-T"] the address of a computer followed by a list of command line options.

(To configure ssh so that the user can login without a password prompt from "thishost" to "remotehost" either consult "man ssh" or
- open a shell on thishost
- cd .ssh
- ls
-> if id_dsa, id_rsa etc exists, skip the next two steps!
- ssh-keygen -t rsa
- ssh-keygen -t dsa
- scp *.pub userremotehost:~/
- ssh remotehost -l user
- cat id_rsa.pub >> .ssh/authorized_keys
- cat id_dsa.pub >> .ssh/authorized_keys
- rm id_rsa.pub id_dsa.pub
- exit
You should now be able to connect from "thishost" to "remotehost" without a password prompt.)

Examples: 1 , 2

##### 36.1-2 ChildClose

`‣ ChildClose`( s ) | ( function )

This closes the stream s to a child GAP process.

Examples: 1

##### 36.1-3 ChildCommand

`‣ ChildCommand`( str, s ) | ( function )

This runs a GAP command \(str\)="cmd;" on the child process accessed by the stream s. Here "cmd;" is a string representing the command.

Examples: 1 , 2

##### 36.1-4 NextAvailableChild

`‣ NextAvailableChild`( L ) | ( function )

Inputs a list \(L\) of child processes and returns a child in \(L\) which is ready for computation (as soon as such a child is available).

Examples: 1 , 2

##### 36.1-5 IsAvailableChild

`‣ IsAvailableChild`( s ) | ( function )

Inputs a child process \(s\) and returns true if s is currently available for computations, and false otherwise.

Examples: 1

##### 36.1-6 ChildPut

`‣ ChildPut`( A, str, s ) | ( function )

This copies a GAP object A on the parent process to an object B=\(str\) on the child process s. (The copying relies on the function PrintObj(A); )

Examples: 1 , 2

##### 36.1-7 ChildGet

`‣ ChildGet`( str, s ) | ( function )

This functions copies a GAP object A="str" on the child process s and returns it on the parent process. (The copying relies on the function PrintObj(A); )

Examples: 1 , 2

##### 36.1-8 HAPPrintTo

`‣ HAPPrintTo`( str, R ) | ( function )

Inputs a string \(str\)="file" giving the address of a new text file and a HAP object R. It writes the object R to "file". Currently this is only implemented for R equal to a resolution.

Examples: 1

##### 36.1-9 HAPRead

`‣ HAPRead`( str, R ) | ( function )

Inputs an address \(str\)="file" of a file containing a HAP object R and returns the object. Currently this is only implemented for R equal to a resolution.

Examples: 1

[Top of Book] [Contents] [Previous Chapter] [Next Chapter]
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 Ind

generated by GAPDoc2HTML