Mathematical Languages & Tools

 ----------------------------------------------------------------------------------------------------------

  Octave

 GNU Octave is a high-level language, helps in solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language, mostly compatible with Matlab. Octave is installed on resources provided through the dzgrid VO.

We will display Octave usage with a simple example file that calculates π using a Monte Carlo method, which the Octave script will be executed:

$ cat OctavePi.sh

#!/bin/bash
octave OctavePi.m

   

Our next step is the JDL file.

JobType = "Normal";
Executable = "OctavePi.sh";  
StdOutput = "std.out";  
StdError = "std.err";  
InputSandbox = {"OctavePi.sh","OctavePi.m"};
OutputSandbox = {"std.err","std.out"};  

 

  R Project for Statistical Computing

 
 R is a free software environment for statistical computing and graphics. It compiles and runs on a wide variety of platforms.

This is the bash script and the macro sent in InputSandbox with the JDL file:

 
$ cat start_R_macro.sh 
#!/bin/sh
${VO_EUMED_SW_DIR}/R-2.14.1-1.el5.x86_64/usr/bin/R --vanilla < $1 > std.out

$ cat macro.r 
postscript("out.ps")
x<-c(1,2,3,4,5,6,7,8)
y<-c(1,2,3,4,5,6,7,8)
plot(x,y,xlim=range(0:10),ylim=range(0:10),type='b',main="X vs Y")
text(4,6,label="Slope=1")
title("X vs Y")
lines(x,y)
dev.off()
q()
 

 This is an example of JDL file that can be used for testing:

$ cat R.jdl 
Executable = "/bin/sh";
Arguments = "start_R_macro.sh macro.r";
StdOutput = "std.out";
StdError = "std.err";
InputSandbox = {"start_R_macro.sh","macro.r"};
OutputSandbox = {"std.out", "std.err", "out.ps"}
 
Links
 arn
-----------------------------