Howto use software

From ImageWiki

Jump to: navigation, search

Contents

Accessing files and directories

When OfficeGrid start your job on any of the imageserver machines you cannot assume that it runs with the current directory path set to point to your home directory (or any other directory for that matter).

You therefore have to use explicit directory paths in your program when accessing files.

Here is an example of how to read and write files in matlab:

% Remember to use absolute paths when reading and writing files. Like this
X = 10;
save('/home/kimstp/test_officegrid/data.mat','X');
clear all;
load('/home/kimstp/test_officegrid/data.mat');
X

% Remember to call exit at the end of your matlab script (this is a problem
% with our current matlab installation, ver. 7.3.0.298)
exit();


Monitoring console output

When using OfficeGrid you will not be able to see the output your write to standard out (console text) before the program terminates. After termination you can get the output using the og_res command.

However there is a work-around if you need to monitor the console output while the program runs. The trick is to pipe the output to a text file when you start your program in OfficeGrid.

Using the command line interface this would look like this:

 og_shcmd -p linux echo 'Hello World' > /home/myuser/out.txt 

Remember to use absolute paths for the output file!

(From this example you should be able to figure out how to do it in the OG GUI as well.)


Using Matlab

Matlab is installed on the machines imageserver1-3. If you are not going to use the GUI or any graphics you might as well start matlab with:

matlab -nodesktop -nojvm

There is a problem with our current matlab installation (ver. 7.3.0.298), such that a matlab script will never terminate, which means your OfficeGrid job will never terminate. The work-around to this problem is to explicitly call exit at the end of your matlab script:

% Remember to call exit at the end of your matlab script (this is a problem
% with our current matlab installation, ver. 7.3.0.298)
exit();


Using Maya with OG

Maya is currently only installed on imageserver1-2, therefore to use Maya via OfficeGrid you will have to specify the maya tag when you submit your job. In the GUI write the following in the Tag box:

 maya

Using the CLI you have to do the following:

 og_shcmd -p linux -t maya myprogram
Personal tools