You are here: Home Use Cases Integrating Software DIET Scilab

DIET Scilab

This page gives some information about the Scilab and DIET interface.
DIET Scilab

May the puffin be with you!


Partners / Contributors
Adela Neacsu
INRIA Logo INRIA
Eddy Caron

ENS-Lyon

Logo ENS

Benjamin Depardon SysFera DIET Scilab
Sylvestre Ledru Scilab Enterprises Logo Scilab Enterprise

 

for the impatient... jump to download section

Introduction to Scilab

Scilab is a freely distributed open source scientific software package, developed in 1989 by researchers from INRIA and ENPC, currently maintained by the Scilab Enterprises. It provides a powerful computing environment for engineering and scientific applications, as well as the possibility to add external modules.

Scilab includes hundreds of mathematical functions and has a high level programming language allowing access to advanced data structures. Also it has an open programming environment that allows users to create their own functions and libraries.

Scilab is a useful environment in the context of HPC, allowing the simple development of applications. However, when application data grows, the lack of parallel constructs limits its use for real cases. Hence, the goal is to have an interface with DIET that can distribute Scilab tasks on several nodes over Grids or over Cloud platforms.

Former approaches have been considered for integrating these two pieces of software. These were based either on message-passing (PVM) or using parallel libraries such as ScaLAPACK. However, both DIET and Scilab have evolved allowing an easier integration.

 

Architecture

The architecture presented here can be decomposed in two parts: one where Scilab is a client for DIET and one in which it is a server. These approaches can be used together or individually.

Scilab Server

DIET Scilab

This part corresponds to a SeD offering the Scilab services for all the clients. The Scilab engine is started just when the server is launched. It can be called from another Scilab instance or from a different type of client. Each client has individual access - requests don't overlap. This offers all the power that Scilab has to offer without having to install the software.

Scilab Client

DIET Scilab

The client part is represented by a module for Scilab which can be easily compiled, built and loaded into the Scilab engine by using ATOMS. After loading the module, accessing DIET is as easy as calling a function from Scilab.  The module checks the parameters, creates a client and deploys the task to DIET. This allows a high level of transparency for the user and limits the wrong usage of the software.

Data types

Even though Scilab is specialised in matrix operations, all data types have their importance. Thanks to DAGDA and to API Scilab, it is possible to use almost all data types in this software :

  • Double scalars, simple and complex
  • Double matrices, simple and complex
  • Integer scalars, signed and unsigned, different precision
  • Integer matrices, signed and unsigned, different precision
  • Strings and string matrices
  • Polynomials, simple and complex
  • Boolean variables
  • Sparse matrices

 

Download and Installation

 

Before installing the necessary files for this module, make sure you already have the prerequisites installed and working. Then, download the files from here:



DIET-Scilab 1.0
Tarballs Sources diet-scilab-1.0.tar.gz

 

Prerequisites

  • DIET: 
    version 2.7
  • Scilab: 
    version 5.3
  • Operating system(s):
    Linux, MacOSX
  • Compiler(s):
    Classical gcc compiler suite
  • Library(ies):
    libstdc++6.1.15

Usage

For the Scilab part, you have two options:

  • You can either copy the module in SCI/modules and let ATOMS do all the work for you, OR
  • You can keep the toolbox wherever you want, and load it manually. The first time you will have to compile it, so that it contains your system settings. This is done by simply starting a Scilab instance, changing the current directory to the root of the toolbox and executing the main builder. After this step, you have to execute the loader.

For making calls from inside Scilab, use the following syntax:

DIET_call ( "path", [ " x1, x2, x3", [ " y1, y2, y3" ] ] );

with the following parameters :

path = the path to the Scilab script you want to send to DIET. This script will be executed on the server side, so make sure it is correct before sending it. You can either give the full or the relative path to the script.

"x1, x2, x3" = the names of the variables you want to get back from the server. The order is not important. This parameter must be passed as a string in which the names are separated by spaces, commas or semicolons. This is an optional parameter. These variables must be either used in the script or send as initial parameters.

"y1, y2, y3" = the names of the variables you want to send to the server. The order is not important. This parameter must be passed as a string in which the names are separated by spaces, commas or semicolons. This is an optional parameter. These variables must be declared and initialised inside the current Scilab instance.

Here is an example of calling DIET from Scilab:

--> chdir /home/Documents/tollbox/sci2diet;

--> exec builder.sce;

--> exec loader.sce;

--> chdir /home/Documents/scripts;

--> B = 100 ;

--> C = [1, 2, 3; 4, 5, 6 ];

--> mputl('A = B * C ; disp(C); ',TMPDIR+"/simple_script.sce");

--> chdir TMPDIR;

--> DIET_call( "simple_script.sce", "A B", "C" );

--> disp(C);

Document Actions