# Blocking call to NetSolve

In the previous section we explained how the user can obtain information about a problem and its calling sequence. For the call itself, the function NetSolve[] is invoked with the problem name and its arguments. For example,
 ``` In:= NetSolve[iqsort[{7,2,3,5,1}]] contacting server torc0.cs.utk.edu ... Out= {1, 2, 3, 5, 7} ```

As stated earlier the user can pass not only numerical values, but also symbols that contain data of proper type or functions that return a result of this type. Indeed, Mathematica calculates these expressions and passes the arguments by value. For example
 ``` In:= v = -Range Out= {-1, -2, -3, -4, -5} In:= NetSolve[iqsort[v]] contacting server torc0.cs.utk.edu ... Out= {-5, -4, -3, -2, -1}```
or to sort a random vector of size 7
 ``` In:= NetSolve[iqsort[Table[Ceiling[10*Random[]], {7}]]] contacting server torc0.cs.utk.edu ... Out= {1, 2, 2, 2, 4, 6, 7} ```

Since NetSolve[] is a function defined in Mathematica, it can be used in expressions like:
 ``` In:= NetSolve[iqsort[Table[Ceiling[10*Random[]], {7}]]] contacting server torc0.cs.utk.edu ... Out= {1, 2, 2, 2, 4, 6, 7} In:= Print["The minimal element of v is ", NetSolve[iqsort[v]][]] contacting server torc0.cs.utk.edu ... The minimal element of v is -5 ```

Let us consider a more complex problem such as the Level 3 BLAS subroutine dgemm[] which calculates where \$op(X) = X\$ or \$op(X) = X'\$.

The routine dgemm[] requires the following 7 arguments.

Let us generate three random matrices.
 ``` In:= RandomMatrix[m_,n_] := Table[Ceiling[10*Random[]], {m}, {n}] In:= a = RandomMatrix[2,3] Out= {{9, 2, 3}, {6, 3, 9}} In:= b = RandomMatrix[3,2] Out= {{6, 4}, {4, 10}, {2, 9}} In:= c = RandomMatrix[2,2] Out= {{4, 7}, {4, 8}}```
and call dgemm[].
 ``` In:= NetSolve[dgemm["N", "N", 2, a, b, 3, c]] contacting server cetus2a.cs.utk.edu ... Out= {{148., 187.}, {144., 294.}} In:= 2 a . b + 3 c Out= {{148, 187}, {144, 294}} ```