Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Data Structure Expert

Exercise 1: Basic Use

1. Unpack the Unicore client package (if you haven't done already)

Copy the UCC preferences file from .../ucc-distribution-6.5.1/conf/preferences to ~/.ucc/preferences ("~/" refers to your home directory; see section 2.4 of the client manual for where to put it on Windows).

2. Edit that copy of the preferences file's keystore entry to specify the full location of the user-keystore.jks file instead of using the default relative path. (That is a pre-configured digital identity that the installed Unicore server already recognizes.)

3. Edit that copy of the preferences file's registry entry to specify the location of the Unicore service you will be using. This should be set to (one line):

https://eric.rcs.manchester.ac.uk:8000/DEMO-SITE/services/Registry?res=default_registry

4. In a terminal, put the ucc command on your PATH. On Unix, this is done with:

PATH=$PATH:.../ucc-distribution-6.5.1/bin

5. Issue this command, which you need to give once per session (i.e., after each time the virtual machine is booted up). ucc connect

6. Now you can discover information about the virtual machine configuration. Report the output of the two commands:
ucc list-sites
ucc list-applications

The first command describes what Unicore server installations are known about to the client; it should be a single long line with "DEMO-SITE" as the first part. The second command lists all the applications known to the site. Successfully executing the two commands indicates that you have a correctly configured installation.

Exercise: A simple Date job

This is the simplest possible job that produces meaningful output.

1.

Save this job definition to a JSON file called date.u:
{

ApplicationName: Date,

ApplicationVersion: 1.0,
}

2. Run this job definition with:

ucc run -b -o datejob date.u

3. Look in the datejob directory, which will be created with a number of files. The file with a .properties extension is an XML description of the job . The output of the job will be in the file stdout.

Exercise 3: A raytracing job

This exercise uses a raytracer program (POV-Ray) to render a simple picture. Raytracing is a technique that can produce images of extremely high quality, and works by simulating the physics of light. The objects in the scene are described mathematically. The scene used here is especially simple in order to keep rendering times short.

1. Save this job definition to a JSON file called povray.u:
{
#
# application name as defined in server IDB
#
ApplicationName: POVRay,

#
# environment settings used to pass parameters
#
Environment: [
"OUTPUT_FORMAT=PNG",
"SOURCE=input.pov",
"TARGET=output.png",
"WIDTH=320",
"HEIGHT=200",
],

#
# Import local files; note rename
#
Imports: [{

From: "sphere.pov",
To: "input.pov"
}],

#
# Export result file
#
Exports: [{
From: "output.png",
To: "sphere.png"
}],
}

 

Exercise 4: A graph-plotting job

This exercise uses a graph-plotting program (gnuplot) to convert tabular data into an image. This is a technique that is very widely used to visualize scientific data; with appropriate instructions, gnuplot can produce significantly more complex graphs than almost all of its competitors.

Note that povray and gnuplot have quite substantially different ways of being controlled. The povray executable (from the previous example) has a complex command line interface that has been configured into the Unicore server. By comparison, gnuplot is extremely simple (so much so that it doesn't need explicit support at the server level) but it has to have the name of associated files placed in its control file: this increased coupling tends to make code more fragile.

1. Save this job definition to a JSON file called gnuplot.u:

{
Executable: "/bin/sh",
Arguments: ["control.sh"],
Imports: [
{From: "control.sh", To: "control.sh"},
{From: "data.csv", To: "data.csv"},
],
Exports: [
{From: "output.png", To: "plot.png"}
],
}

2. Save this control description in a file called control.sh (this is a shell script that runs gnuplot from within itself):

gnuplot << EOF
set term png
set output "output.png"
set datafile separator ","
plot "data.csv" using 1:2 with lines
EOF

3. Save this data in a file called data.csv (the CSV format can be produced by many tools, including most spreadsheets).

0.0,0.0
1.0,0.0
1.0,1.0
1.1,1.0
0.5,1.6
-0.1,1.0
0.0,1.0
0.0,0.0

4. Run this job definition with:
ucc run -b -o gnuplotjob gnuplot.u

Data Structure, Computer Science

  • Category:- Data Structure
  • Reference No.:- M9716242
  • Price:- $25

Priced at Now at $25, Verified Solution

Have any Question?


Related Questions in Data Structure

Data Communication Delivering Information anywhere

Topic: Data Communication Delivering Information anywhere. Write a 9-12 pages paper in which you: Present an overview of the origin and history of the concept. Describe the current use of and attitude toward the concept. ...

Problem regarding the management program

Problem: Looks like its just adding a save and load feature to the same file you sent me for python 3.5 Until now, you have had to leave your team management program running on your computer indefinitely since you did no ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As