GAUSS

From HPCC Wiki
Jump to navigation Jump to search

A SLURM submit script for GAUSS that runs on 1 processor (core) follows:

#!/bin/bash
#SBATCH --partition production
#SBATCH --job-name GAUSS_job
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --mem=2880


# Find out name of master execution host (compute node)
echo -n ">>>> SLURM Master compute node is: "
hostname
echo ""

# You must explicitly change to the working directory in SLURM
cd $SLURM_SUBMIT_DIR

#
# Point to the serial executable to run
#
echo ">>>> Begin GAUSS Serial Run ..."
# Static executable
/share/apps/gauss/default/tgauss.static < ./pxyz.e > pxyz.out
#
# Dynamic executable
#/share/apps/gauss/default/tgauss < ./quantile.e > gauss.out
#
echo ">>>> End   GAUSS Serial Run ..."

Here, the file pxyz.e was taken from the GAUSS examples in /share/apps/gauss/examples. Upon successful completion, a run file "graphic.tkf" should be created in working directory.

pxyz.e:

library pgraph;
graphset;

let v = 100 100 640 480 0 0 1 6 15 0 0 2 2;
wxyz = WinOpenPQG( v, "XYZ Plot", "XYZ" );
call WinSetActive( wxyz );

begwind;
makewind(9,6.855,0,0,1);
makewind(9/2.9,6.855/2.9,0,0,0);
makewind(9/2.9,6.855/2.9,0,3.8,0);
_psurf = 0;
title("\202XYZ Curve - \201Toroidal Spiral");
fonts("simplex complex");
xlabel("X");
ylabel("Y");
zlabel("Z");

setwind(1);
t = seqa(0,.0157,401);
a = .2; b=.8; c=20;
x = 3*((a*sin(c*t)+b) .* cos(t));
y = 3*((a*sin(c*t)+b) .* sin(t));
z = a*cos(c*t);
margin(.5,0,0,0);
ztics(-.3,.3,.3,0);
_pcolor = 10;
view(-3,-2,4);
volume(1,1,.7);
_plwidth = 5;
xyz(x,y,z);

nextwind;
margin(0,0,0,0);
title("");
x = x .* (sin(z)/10);
_paxes = 0;
_pframe = 0;
_pbox = 13;
_pcolor = 11;
_plwidth = 0;
view(15,2,10);
xyz(x,y,z);

nextwind;
_pcolor = 9;
a = .4; b=.4; c=15;
x = 3*((a*sin(c*t)+b) .* cos(t));
y = 3*((a*sin(c*t)+b) .* sin(t));
z = a*cos(c*t);
volume(1,1,.4);
xyz(x,y,z);

endwind;

call WinSetActive( 1 );