| 1 | /* -*- mode: c++ -*- */ |
|---|
| 2 | |
|---|
| 3 | /* |
|---|
| 4 | ststServerInfo -- |
|---|
| 5 | |
|---|
| 6 | Estructura para almacenar la informacion necesaria para comunicarse |
|---|
| 7 | con un servidor de calculo |
|---|
| 8 | */ |
|---|
| 9 | Struct _stServerInfo { |
|---|
| 10 | Text host; |
|---|
| 11 | Real port |
|---|
| 12 | }; |
|---|
| 13 | |
|---|
| 14 | /* |
|---|
| 15 | Conjunto de servers a utilizar en este ejemplo. Deberiamos |
|---|
| 16 | asegurarnos antes que los servidores estan ejecutandose. |
|---|
| 17 | */ |
|---|
| 18 | Set servers = [[ |
|---|
| 19 | _stServerInfo("localhost", 40000), |
|---|
| 20 | _stServerInfo("localhost", 40001) |
|---|
| 21 | ]]; |
|---|
| 22 | |
|---|
| 23 | Set paramTest = { |
|---|
| 24 | |
|---|
| 25 | /* |
|---|
| 26 | Directorio de intercambio de datos. En este directorio se almacenan |
|---|
| 27 | los resultados parciales. |
|---|
| 28 | */ |
|---|
| 29 | Text dataDir = If(ObjectExist("Text", "dataDir"), dataDir, |
|---|
| 30 | If(OSUnix, "/tmp", "c:/temp")); |
|---|
| 31 | |
|---|
| 32 | // Dimensiones del producto : C(MxN) = A(MxK)*B(KxN) |
|---|
| 33 | Real M = If(ObjectExist("Real", "M"), M, 700); |
|---|
| 34 | Real K = If(ObjectExist("Real", "K"), K, 700); |
|---|
| 35 | Real N = If(ObjectExist("Real", "N"), N, 700); |
|---|
| 36 | |
|---|
| 37 | Set [[ M, N, K, dataDir ]] |
|---|
| 38 | }; |
|---|
| 39 | |
|---|
| 40 | WriteLn("Test configuration:"); |
|---|
| 41 | WriteLn(" M = "<<paramTest["M"]); |
|---|
| 42 | WriteLn(" K = "<<paramTest["K"]); |
|---|
| 43 | WriteLn(" N = "<<paramTest["N"]); |
|---|
| 44 | WriteLn(" dataDir = "<<paramTest["dataDir"]); |
|---|