חזרה לתוכן העניינים

# The calculations on a supercomputer

In order to solve computational problems that require large computation time or large amounts of memory, the system has special functions that provide the user with resources of supercomputer. These functions allow you to perform calculations on a dedicated set of cores. The number of kernels ordered by the user.

You have the following functions ( 3ar-functions) that apply to supercomputer:

1) matMultPar1x8 — calculation of the matrix product;

3) charPolPar — computation of the characteristic polynomial of a matrix;

4) polMultPar — computation of the product of two polynomials;

5) BellmanEquationParA — solution of a homogeneous Bellman equation $Ax=x$;

6) BellmanEquationParA,b — solution of an inhomogeneous Bellman equation $Ax+b=x$;

7) BellmanInequalityParA — solution of a homogeneous Bellman inequality $Ax\leq x$;

8) BellmanInequalityParA,b — solution of an inhomogeneous Bellman inequality $Ax+b\leq x$;

%1) gbasisPar — computation of Grobner basis;

%3) adjointDetPar — computation of the adjoint matrix and determinant of the matrix;

%4) echelonFormPar — computation of the matrix echelon form;

%%5) inversePar — computation of the inverse matrix;

%6) detPar — computation of the determinant of the matrix;

%7) kernelPar — computation of the kernel of a linear operator;

Before applying any of these functions, the user must specify the parameters that define the parallel environment:

$TOTALNODES$ — total number of processors (cores), which provides for the computation

$PROCPERNODE$ — number of cores on a single node,

$CLUSTERTIME$ — maximum time (in minutes) execution of the program, after which the program is forced to end.

$MAXCLUSTERMEMORY$ — amount of memory allocated for the JVM for a one process (for -Xmx parameter).

To set the number of cores on a single node the user must know what a cluster is used and how many cores it is available on the node. By default, the $TOTALPROCNUMBER$ and $NODEPROCNUMBER$ installed so that all the cores were used per node, and $CLUSTERTIME = 1$.

The user can change the number of cores on a single node. This is an important feature, since the memory on a single node is used by all $NODEPROCNUMBER$ cores. Consequently, the user can regulate the size of of RAM that is available to one core.

## 13.1 Parallel polynomial computations

For parallel computation of the polynomial product you can use the multiplyPar(p1, p2), where $p1$, $p2$ — given polynomials.

אין תוצאות עד כה

%% For parallel computing Grobner basis you must use the % gbasisPar([p1, p2, p3,…, pn]), where $p1, p2, p3,…, pn$ — polynomials. % %

אין תוצאות עד כה

## 13.2 Parallel matrix computations

For parallel computing products of matrices $m1$ and $m2$ you must use the multiplyPar(m1, m2).

אין תוצאות עד כה

For parallel computation of the adjoint matrix for the matrix $m$ you can use the adjointPar(m). Similarly, for the matrix $m$ you can perform the calculation of the echelon form echelonFormPar(m), the computation of the determinant detPar(m), computation of the kernel kernelPar(m), the calculation of the characteristic polynomial charPolPar(m). The command adjointDetPar(m) allows us to calculate the determinant and adjoint matrix simultaneously.

אין תוצאות עד כה

section {Running your parallel programs} Mathpar allows you to download and execute your parallel programs. Your package must be in the root directory of the project. To ensure that your program is able to interact with the system management tasks, you need to add an initialization string

QueryResult queryRes = Tools.getDataFromClusterRootNode (args)

\noindent (immediately after MPI.Init) and the completion string

Tools.sendFinishMessage (args)

\noindent (before MPI.Finalize) in your main-method. You can also pass any arguments to your program from the web-interface Mathpartner. Within the program you can get them by calling queryRes.getData (). Below is an example of a parallel program that simply outputs on standard output the arguments passed to it.

אין תוצאות עד כה

After that you need to compile the program, and the program folder packed in zip-archive.Then you need to download this file to the server, using the tab "File" and clicking "download file". RAM is divided equally between all cores. For example, if the cluster node has 8GB of memory, then if you request 4 cores on a single processor, each will receive 2GB, and if you have requested one core - then it will get 8GB.

uploadToCluster} {(FileName), where FileName - name of zip-archive.

showFileList} {().

To run your program, use the command

{runUploadedClass(archieveName, classPath, param0, param1, ...), where archieveName - the name of the downloaded zip-archive with the program, classPath - the path to the class containing main-method (full path with the packages) paramX - arbitrary parameters specified separated by commas, to be passed to your program.

To monitor the running programs, use the command