Scientific Computing to your office and to your home

Josef Otta

Department of Mathematics
Faculty of Applied Sciences
University of West Bohemia

The Czech Republic

Co-authors : Petr Girg*, Luboš Matějka **, Ladislav Pešička **

*  Department of Mathematics, Faculty of Applied Sciences, University of West Bohemia, The Czech Republic
** Department of Computer Science and Engineering, Faculty of Applied Sciences, University of West Bohemia, The Czech Republic

Introduction

We present a connection prototype of WebMathematica with GridMathematica. We developed interactive webpages which are powered by webMathematica and give access to computational applications programmed under gridMathematica. These applications are then computed at METACentrum - parallel computational cluster.

Motivation

Why to connect WebMathematica with GridMathematica and why use it?

User does not know parallel programming or even Mathematica programing language

Time demand of the computation on a single machine is very high or the large scale problems are not possible to compute on single machine

Cluster Launching and a maintenance of the cluster enviroment is not so trivial thing

Comfortable and nice interface

Typical user

Tallented undergraduated math students - limited knowledge of parallel computation.

Specialists in various fields of science, without any experience with parallel computing and/or Mathematica.

....

Basic used technologies

WebMathematica

Powerful tool for a computation on the web powered by Mathematica

Computation for users without licence of Mathematica

A lot of websites with WebMathematica around the World

Useful for relatively small applications with not so high time demands.

User can not compute any large tasks, because the computation time is limited by the parameter $KernelTimeLimit  (60 seconds by default).

GridMathematica

A powerful parallel technical-computing system

Consists of a collection of Mathematica kernels: the Master kernel and several slave kernels

Communication is provided via MathLink technology.

Useful for large scale, long jobs.

METACentrum

A queing of jobs

Priority queues based on the ownership of resources

Automatic assigning of free nodes to the given job based on resources specification - CPU per node, memory, domain specification, time estimate

Connection scheme

Import["c:\\schemapict.tif"]

Connection  "WebMathematica↔gridMathematica"

WebMathematica

Verification of input data

Heuristics for time demand estimate and determining of number of used CPUs

Parallel code creation

Controlling the inner processes

Daemon

Linking of web server with a parallel computational cluster.

Checks whether new job for parallel computation occurs. Then it sends the data and parallel code to the computational cluster.

Monitor if a job at the cluster is done. If yes, then it sends the results to the web server with webMathematica and informs user by email about a job finishing and gives a link to the computed data.

GridMathematica

Parallel computation

Example - Data Input

Screenshot

Example - Confirmation

Screenshot

METACentrum

METACentrum is a IT project which covers gridcomputing, cluster and supercomputing in the Czech Republic. The aim of METACentrum is a maintanance of computational resources and broadening available computational capacity to the largest academic centres in the Czech Republic.

METACentrum unifies wide range of hardware.There are available large many - processors SMP machines with shared memory as well as clusters composed of many two - processors PC interconnected by fast 1 Gb/s (GE, Gigabit Ethernet) or 2.5 Gb/s (Myrinet) network.(Comparison of SMP and clusters can be found here).Concerning the processors architectures large SMP machines are built on MIPS processors, clusters are based on 32 - bit Intel processors (Pentium 3 a Pentium 4 Xeon).There are also available machines with 64 - bit processors Intel Itanium II, AMD Opteron, IBM Power4 + and HP Alpha that can address more than 4 GB of memory.

The aim of METACentrum is to build a virtual metacomputer.Therefore the individual clusters skirit (96 CPU), perian (136 CPU), skurut (134 CPU), nympha (32 CPU) and minos (32 CPU) located in Brno, Prague and Pilsen, are interconneted by fast network (2.5 Gb/s), use batch queueing system PBSPro and distributed filesystem AFS and from user' s point of view create one huge virtual cluster with more than 900 CPU.You can check its state of its load by clicking the link Current state in menu.

ScreenShot

Example: Bifurcation diagram

Bifurcation diagrams for BVPs of ODEs

This example page was the first prototype of connection GridMathematica-WebMathematica

This website was developed for undergraduate research project KMA/PRJ3 at our university. The functionality of this site was proved by numerous students of this project. Among others by Jana Babováková and Šárka Petříčková, who performed numerical experiments that are presented at the students competition AISC-2007 held at UNC at Grensboro, North Carolina.

Aim

To create a solver for numerical approximation of Bifurcation Diagrams for the nonlinear oscillator with allowance with periodic boundary conditions

x''[t]+a x[t]+(Subscript[k, 1])Max[0,x[t]-(Subscript[r, 1])]-(Subscript[k, 2]) Max[0,-(x[t]+(Subscript[r, 2]))]==0,  t  ∈ [0,T],
x'[0]==x'[T]==0,   T>0

Top View

Original algorithm for finding the bifurcation branches, [KMA, ZČU; Drift]

Finding the intersection of the surface f(a,b)=x'(T;a,b) with plane g(a,b)=0, where x(t; a, b) is a solution of an IVP 

x''[t]+a x[t]+(Subscript[k, 1])Max[0,x[t]-(Subscript[r, 1])]-(Subscript[k, 2]) Max[0,-(x[t]+(Subscript[r, 2]))]==0,  t  ∈ [0,T],

with initial conditions

x'[0] == x'[T] == 0,   T > 0

ContourPlot

Easy way how to implement TopView to Mathematica

Basic principle : 

	Evaluation the function f(a,b) in a grid of points
	
	Seeking for sign changes
	
	Finer recursive sampling in areas with sign changes (new in Version 6)
	
	Linear interpolation
	
Disadvantage:

	The order of interpolation needs a lot of points to get results with sufficiently small approximation error.
	
Our approach:

	Approximation of bifurcation branches by ContourPlot
	
	Extraction of branches points
	
	Setting these points as a starting values for FindRoot
	
	Numerical approximation of these roots
	
	Reconstruction of the bifurcation branches

This approach is easy for parallelization

Parallelization

Domain division into n subdomains

Solution on m nodes, (In our case n=4m, the uniform loading of nodes and avoiding granularity is expected, from our point of view)

The starting approximation is found, then the precise computation of roots is computed.

When all of the roots at specific subdomains are found, the master kernel collect all of the data and the numerical approximation of bifurcation diagram is computed.

Example IV. - Getting the solution

The user got an email with information that the solution was computed and with a link to computed data and postprocessing notebook.

Example V. - Postprocessing

when the user download the data and postprocessing notebook, he can work with data as he want and use then for his future research.

Summary and future work

Prototype of the connection gridMathematica-WebMathematica

possibility of a processing of large scale data - splitting to several smaller part automatically

better and transparent web interface

connection to the database

References

[KMA, ZCU; Drift] 	  	http://drift.kma.zcu.cz
[KMA, ZCU; webmath]	http://webmath.zcu.cz
[METACentrum]		http://meta.cesnet.cz
[WebMathematica]		http://www.wolfram.com/products/webmathematica/index.html
[gridMathematica]		http://wolfram.com/products/gridmathematica/