Ruby

Ruby  is installed on the compute nodes of the HPC3.

Hello World

Create a file hello.rb

10.times do 
	puts "hello world"
end

and a bash script run.sh

# !/bin/bash
#$ -l m_mem_free=1G
#$ -j y
#$ -N hello

ruby hello.rb

Run the ruby code with qsub run.sh

This program will create a single file called hello.o<jobid>  with the following content:

hello world
hello world
hello world
hello world
hello world
hello world
hello world
hello world
hello world
hello world