Once the interface is successfully installed, the first thing to do is to start a Mathematica client and type
NetSolve[] |
In[1]:= NetSolve[] usage: NetSolve[FuncName[arg1, ...]] - blocking problem call NetSolveNB[FuncName[arg1, ...]] - nonblocking problem call NetSolveProbe[request] - checks if a request has been completed NetSolveWait[request] - waits for a request to complete NetSolveGetAgent[] - returns the current agent name NetSolveSetAgent[AgentName] - changes the agent we are working with NetSolveError[] - returns the result code of the last executed NetSolve function NetSolveErrorMsg[rc] - returns a string describing the result code passed NetSolve["?problems"] - shows a list of available problems NetSolve["?servers"] - shows a list of available servers NetSolve["?FuncName[]"] - shows a problem description |
Let us review the possibilities:
This set of functions provides information about a specific problem's calling sequence and which problems and servers are available through the user's agent.
This function is a blocking call to NetSolve to solve a certain problem. When utilizing this type of call to NetSolve, the user does not regain execution control until the result becomes available.
This function is a non-blocking call to NetSolve to solve a certain problem. Unlike a blocking call to NetSolve, a non-blocking call returns the execution control, as well as a request handler, immediately to the user. The request handler can then be ``probed'' for the status of the calculation.
NetsolveGetAgent[] returns a string containing the host name of the agent. The user can change the current agent by the NetSolveSetAgent[] function at any time.
Let us now assume that the user has started Mathematica and is ready to use NetSolve. We can check who our agent is by typing
In[1]:= NetSolveGetAgent[] Out[1]= torc0.cs.utk.edu |
In[2]:= NetSolveSetAgent["netsolve.cs.utk.edu"] |
The agent can be changed at any time provided there is another NetSolve agent running on the host whose name has been passed as an argument. However, if the agent is changed, then the set of servers and possibly the set of solvable problems has also been changed.
A list of the solvable problems can be obtained by the function NetSolve["?problems"]. Here is a possible list (clipped to save space).
In[3]:= NetSolve["?problems"] /BLAS-wrappers/Level3/dmatmul /BLAS-wrappers/Level3/zmatmul /BLAS/Level1/daxpy /BLAS/Level1/ddot /BLAS/Level1/zaxpy /BLAS/Level2/dgemv /BLAS/Level3/dgemm /BLAS/Level3/zgemm /LAPACK-wrapper/Simple/Eig_and_Singular/eig /LAPACK-wrapper/Simple/Linear_Equations/linsol /QuickSort/DoublePrecision/dqsort /QuickSort/Integer/iqsort . . . -------------------- Handle 41 problem(s). -------------------- |
Similarly, a list of the servers can be printed by the function NetSolve["?servers"]
In[4]:= NetSolve["?servers"] Initializing NetSolve... Initializing NetSolve Complete ---- List of NetSolve agents ---- netsolve.cs.utk.edu (160.36.58.76) Host: Up ---- List of NetSolve servers ---- cetus3a.cs.utk.edu (160.36.56.94) (0 failures) cetus3b.cs.utk.edu (160.36.56.95) (0 failures) torc1.cs.utk.edu (160.36.56.200) (0 failures) torc2.cs.utk.edu (160.36.56.201) (0 failures) torc3.cs.utk.edu (160.36.56.202) (0 failures) . . . |
For every server associated with a specific agent, the following information is given: its name, IP address, host and server status, and how many different problems it can solve.
The user can easily determine information about a specific problem, iqsort for instance, by typing
NetSolve["?iqsort[]"] |
The brackets after the problem name are required because every NetSolve problem is treated as a function defined in Mathematica.
The output of that command is as follows:
In[5]:= NetSolve["?iqsort[]"] iqsort: Quicksort - Sorts a vector of integers Input: # 0 : Integer Vector Vector of integers to Sort Output: # 0 : Integer Vector Sorted Vector Mathematica example: rI0 = NetSolve[iqsort[I0]] examples for types: Char Byte/Integer Single/Double Complex Scalar: "c" 42 66.32 4 - 7 I Vector: "vector" {1,2,3} {3,4.5,7} {3, -5+3I, 8} Matrix: {"line 1", {{1,2,3}, {{6.4,2,1}, {{1+2I, 3+4I}, "line 2"} {4,5,6}} {-7,1.2,4}} {5-6I, 7}} |
The first part of the output is a brief general description of the problem. The second part describes the input and output objects, their type and description. And lastly, an example is provided.
If the user does not provide the number, the type, and the sequence of arguments correctly, an error message message will be printed and the $Null symbol will be returned.
The arguments shown in the example are variables but the user may also choose to pass numerical values, symbols with assigned data or function calls.
Here are some rules the user must remember.
Characters are passed as strings (only the first character is used).
Integers can be passed instead of reals and vice versa (conversion is performed automatically).
Integers and reals can be passed instead of complex numbers.
Vectors of characters are passed as strings.
Matrices of characters are passed as vectors of strings.