25
OSP Tutorial OSP Tutorial An Introduction An Introduction

OSP Tutorial An Introduction. Getting to OSP Obtain a CSE account Recommend xming to remote log in from USF Website

Embed Size (px)

Citation preview

OSP TutorialOSP TutorialAn IntroductionAn Introduction

Getting to OSPGetting to OSP

Obtain a CSE accountObtain a CSE account

Recommend xming to remote log in from USF Recommend xming to remote log in from USF WebsiteWebsite https://rc.usf.edu/trac/doc/wiki/XmingInstall

Log Into gradLog Into grad grad.cse.usf.edugrad.cse.usf.edu

Getting to Know OSPGetting to Know OSP

Manual is Your Friend!!!!Manual is Your Friend!!!!

Read OSP Manual 1.1-1.4 to gain an Read OSP Manual 1.1-1.4 to gain an understanding of programming in OSPunderstanding of programming in OSP

Read subsequent sections in 1 for an Read subsequent sections in 1 for an understanding of specific modules in OSPunderstanding of specific modules in OSP

Guide for First AssignmentGuide for First Assignment

Log into grad.cse.usf.edu serverLog into grad.cse.usf.edu server Copy necessary files from Copy necessary files from

/home/csee1/ospuser/HW109.solaris /home/csee1/ospuser/HW109.solaris

Guide for First AssignmentGuide for First Assignment

Copy necessary files to your computer or Copy necessary files to your computer or to a working directory:to a working directory:

MakefileMakefile inter.cinter.c timeint.ctimeint.c dialog.cdialog.c inter.ointer.o

Guide for First AssignmentGuide for First Assignment

Follow directions on assignment handout Follow directions on assignment handout for modifying the Makefilefor modifying the Makefile

Use knowledge from other modules in Use knowledge from other modules in OSP to edit timeint.cOSP to edit timeint.c

Use favorite C editor to edit the file or pico Use favorite C editor to edit the file or pico under Unix.under Unix.

Guide for First AssignmentGuide for First Assignment

Guide for First AssignmentGuide for First Assignment

When finished editing timeint.c file, upload When finished editing timeint.c file, upload files to directory on grad if necessaryfiles to directory on grad if necessary

On grad, in the directory where your files On grad, in the directory where your files are located type “make” to compile the are located type “make” to compile the programprogram

Type OSP to run the simulator (See 2.2 Type OSP to run the simulator (See 2.2 and 2.3 in manual)and 2.3 in manual)

Guide for First AssignmentGuide for First Assignment

Compile OSP (ignoring warning messages):Compile OSP (ignoring warning messages):

234 grad: make234 grad: make

cc -c -g dialog.ccc -c -g dialog.c

cc -c -g inter.c cc -c -g inter.c

cc -c -g timeint.c cc -c -g timeint.c cc /home/csee1/ospuser/HW109.solaris/osp.o dialog.o inter.o timeint.o -lm cc /home/csee1/ospuser/HW109.solaris/osp.o dialog.o inter.o timeint.o -lm

-g –o OSP-g –o OSP

235 grad: OSP –d par.high235 grad: OSP –d par.high

... output is redirected to 'simulation.run' ... wait ...... output is redirected to 'simulation.run' ... wait ...

FINITAFINITA

Guide for First AssignmentGuide for First Assignment

Table 2.1 shows simulator parametersTable 2.1 shows simulator parameters Recommended Interactive and Trace Recommended Interactive and Trace

modes to view simulation stepsmodes to view simulation steps

Guide for First AssignmentGuide for First Assignment

Example of step in OSPExample of step in OSP

Guide for First AssignmentGuide for First Assignment

Can put numbers in a file for parameters Can put numbers in a file for parameters and load this file using and load this file using

OSP “your_parameter_filename” OSP “your_parameter_filename”

(see pg77)(see pg77) Tips for debugging:Tips for debugging:

OSP –d enters debugging modeOSP –d enters debugging mode View simulator results using a text editor in View simulator results using a text editor in

simulation.run (ex. PICO)simulation.run (ex. PICO)

Guide for First AssignmentGuide for First Assignment

Successful Simulator Run:Successful Simulator Run:

Guide for First AssignmentGuide for First Assignment

Once timeint.c completed, go on to inter.cOnce timeint.c completed, go on to inter.c

Once inter.c is completed, time to hand in!Once inter.c is completed, time to hand in!

Hand-In (See pg. 82 in manual)Hand-In (See pg. 82 in manual) Run the hand_in script located in the OSP Run the hand_in script located in the OSP

directory from the directory with your filesdirectory from the directory with your files

Guide for First AssignmentGuide for First Assignment

Guide for First AssignmentGuide for First Assignment

Pick the compiler (here gcc, you use cc)Pick the compiler (here gcc, you use cc)

Guide for First AssignmentGuide for First Assignment

Enter the parameter file nameEnter the parameter file name There are two parameter files, one is less There are two parameter files, one is less

intense than the other. First run the par.trace intense than the other. First run the par.trace file.file.

Guide for First AssignmentGuide for First Assignment

Enter any necessary comments in the Enter any necessary comments in the comments fieldcomments field

Hopefully all runs well!Hopefully all runs well!

Guide for First AssignmentGuide for First Assignment

Now enter the next parameter file par.highNow enter the next parameter file par.high

Guide for First AssignmentGuide for First Assignment

Again enter any necessary commentsAgain enter any necessary comments

Guide for First AssignmentGuide for First Assignment

If you see this, you pat yourself on the If you see this, you pat yourself on the back!back!

Guide for First AssignmentGuide for First Assignment

Press enter to closePress enter to close

Verify your submission worked by lookingVerify your submission worked by looking

at simulation.runat simulation.run

Guide for First AssignmentGuide for First Assignment

Debugging Mode:Debugging Mode:

Guide for First AssignmentGuide for First Assignment

For your result comparison with the For your result comparison with the simulators’ results, use the run.high simulators’ results, use the run.high parameter file.parameter file.

Section 2.4 talks about interpreting the Section 2.4 talks about interpreting the results.results.

Questions?Questions?