Biowulf at the NIH
Scilab on Biowulf
scilab_logo

Scilab is a scientific software package for numerical computations providing a powerful open computing environment for engineering and scientific applications. Scilab includes hundreds of mathematical functions with the ability to interactively add programs from other languages such as C and Fortran. . It has sophisticated data structures (including lists, polynomials, rational functions, linear systems...), an interpreter and a high level programming language. Scilab has been designed to be an open system where the user can define new data types and operations on these data types by using overloading.

Scilab includes conversion programs for Matlab m files (m2sci), and a Scilab -> Fortran compiler (sci2for). Since Scilab is open-source, there is no restriction on the maximum number of simultaneous Scilab runs, which may be an advantage to users with large-scale projects.

Scilab has been developed since 1990 by researchers from INRIA and ENPC. The Scilab website is at www.scilab.org and includes some documentation and a list of equivalent Matlab/Scilab functions.

Submitting a single Scilab batch job

Create a batch script file (a csh or bash file) that contains any desired PBS options and the commands to run Scilab non-interactively. Example below: NOTE: The scripts on this page are very simple and are used ONLY as examples on how to submit jobs to the Biowulf cluster. Users will typically submit much more compute-intensive jobs.

Sample file scilab.script

#!/bin/tcsh
#
#PBS -N Scilab
#PBS -m be 
#PBS -k oe
 
date

/usr/local/bin/scilab -nw << EOF       #starts Scilab
a = 10;                                       #Scilab commands
b = 20;
c = 30;
d = sqrt((a + b + c)/pi);
exit
EOF                                            #end of Scilab commands

Submit the script using the qsub command, e.g.
qsub -v -l nodes=1 /full/pathname/scilab.script

You will receive email when the job is executed and when it ends.

Submitting a swarm of Scilab jobs

The swarm program is a convenient way to submit large numbers of jobs. Each command is represented by a single line in the swarm command file that you create, and runs as a separate batch job. See the swarm page. for more information.

Create a swarm command file, named scilab_swarm_jobs for instance, with each line containing a single executable script.

Sample Scilab swarm command file:

/data/username/scilab-data/runplot
/data/username/scilab-data/runplot1
/data/username/scilab-data/runplot2
/data/username/scilab-data/runplot3
/data/username/scilab-data/runplot4

Each of these scripts (runplot, runplot1, etc.) would look like the following:

/usr/local/bin/scilab -nw << EOF
[...some Scilab commands ...]
exit
EOF

Submit this swarm command file scilab_swarm_jobs to the batch system with the command:

swarm -f scilab_swarm_jobs 

Alternatively, the Scilab commands could be in the usual Scilab script files (similar to the Matlab .m files) , and the swarm command file would look like this:

/usr/local/bin/scilab -nw < /data/user/run1.sci
/usr/local/bin/scilab -nw < /data/user/run2.sci
/usr/local/bin/scilab -nw < /data/user/run3.sci
This command file would be submitted using the swarm command:
swarm -f my_swarm_file 
Run the Scilab GUI Interactively

If you simply log in to Biowulf and give the scilab command, scilab will run on the main Biowulf login node. This is highly discouraged because the login node has only 2 processors and is not intended for running computational applications. Instead, to run scilab interactively, you should allocate a node for interactive use and run on that node, as described in the example below.

To run the Scilab graphics interface, an X windows connection to Biowulf is required. Open an Xwindows connection to biowulf.nih.gov, and check that it is working by typing 'xclock' at the Biowulf prompt. Now allocate an interactive node with the '-V' flag to transfer all your environment variables to the computational node. Example:

     biowulf% qsub -I -l nodes=1 -V
     qsub: waiting for job 423061.biobos to start
     qsub: job 423061.biobos ready

     [username@p955 ~]$ scilab&

Sample Scilab GUI screenshots: scilab screen capturescilab screen capture

Run Scilab interactively without the GUI

It is also possible to run Scilab interactively on the command-line, without the GUI. This would be useful only if there's no way to get an Xwindows connection, or for testing/debugging a Scilab script. . Again, this should be done by allocating an interactive node. Example:

biowulf% qsub -I -l nodes=1
qsub: waiting for job 2011.biobos to start
qsub: job 2011.biobos ready

p139$ scilab
-------------------------------------------
              scilab-3.1.1
        Copyright (c) 1989-2005          
    Consortium Scilab (INRIA, ENPC)      
-------------------------------------------
 
 
Startup execution:
  loading initial environment
 
-->quit
[username@p139 ~]$ exit
logout

qsub: job 2011.biobos completed
biowulf$ 
Documentation