Introduction to IMSL and VNI Welcome to OIT’s seminar on IMSL Numerical Libraries Sam Gordji, Weir...
-
Upload
marcus-young -
Category
Documents
-
view
236 -
download
1
description
Transcript of Introduction to IMSL and VNI Welcome to OIT’s seminar on IMSL Numerical Libraries Sam Gordji, Weir...
Introduction to IMSL and VNI
Welcome to OIT’s seminar on IMSL Numerical Libraries
Sam Gordji, [email protected]
Weir 107
List of VNI PackagesIMSL
IMSL for Fortran is a comprehensive package containing Math, stat., and special functions
IMSL for C++ is a comprehensive package containing Math, stat., and special functions
IMSL is available only on sweetgum
IMSL is a set of subroutines called by a Fortran, Python, or C program
Accessing Fortran on sweetgum sweetgum is a Unix
server housed in the data center building
sweetgum is primarily used by researchers that have large number crunching programs
Limited knowledge of Unix system is needed to run Fortran and IMSL
Accessing Fortran on sweetgum
Fortran and IMSL may be accessed from the network.
Steps to access sweetgum from a Windows PC
– Request a sweetgum account from [email protected]
– Download/Install SSH Secure Shell Client from http://www.mcsr.olemiss.edu/appssubpage.php?pagename=ssh2.inc
– Click “Secure Shell Client”
Accessing Fortran on sweetgum
sweetgum is ready to execute Fortran jobs
A Few Useful Unix Commands
cat --- for displaying a file cd --- change directory cd 1--- to move to sub-directory 1 & so
on cp --- for copying files rm --- remove a file pico --- a Unix editor
A Few Useful Unix Commands “pwd” to print working directory
“ls” to list files in working directory
To view a program, enter “cat file-name.f”
To launch a Fortran program, enter “f90 file-name.f”
To attend a Unix seminar, please contact [email protected]
Running IMSL on a PC
IMSL PC version is available for C
Users need to have their own copy of C
Topics of the Day Creating a simple Fortran Program
Running a few Fortran Program w/ and w/o IMSL (nonlin.f, mcsr.f, and test.f)
Looking at some aspects of Fortran & IMSL
Download Fortran programs from sweetgum: /usr/local/appl/examples
Importing a Fortran Program into sweetgum
Download your Fortran program to your desktop
In sweetgum enter “ vi mcsr.f ” Press “ enter ” Enter “ i ” Copy and paste your Fortran program from
your desktop Enter “ : ” Enter “ wq ” and press enter to save your
program which you named “ mcsr.f ”
Text copy of mcsr.f• PARAMETER (IPATH=1, LDA=3, N=3)• REAL A(LDA,LDA), B(N), X(N)• c This is a comment line. Above 2 lines define the parameters needed for matrix
inversion• c Set values for A and B• c• c A = ( 33.0 16.0 72.0)• c (-24.0 -10.0 -57.0)• c ( 18.0 -11.0 7.0)• c Above is the Matrix A and below is the vector B• c B = (129.0 -96.0 8.5)• c• DATA A/33.0, -24.0, 18.0, 16.0, -10.0, -11.0, 72.0, -57.0, 7.0/• DATA B/129.0, -96.0, 8.5/• c Below subroutine LSLRG is called to solve the 3 by 3 equation• CALL LSLRG (N, A, LDA, B, IPATH, X)• c Print results • CALL WRRRN ('X', 1, N, X, 1, 0)• END
Running Fortran on sweetgum To create an executable on sweetgum enter
f90 $F90FLAGS –o mcsr mcsr.f $LINK_F90
To run a script called “mcsr", simply enter
mcsr
Please note that the executable in this case is called “mcsr"
Output of mcsr.f The solution for the 3 by 3 system of
equations is:
X
1 2 3
1.000 1.500 1.000
General Information
IT staff will assist users to access these packages. We also assist users to find the proper procedure to analyze their data. If you need assistance please send an email to Sam Gordji at [email protected],[email protected] , [email protected]
General Information
Email contact– [email protected]
To download this and other materials visit: http://www.mcsr.olemiss.edu/educationsubpage.php?pagename=febcamp09.inc
Please fill out the performance report and leave your email address so we may contact you for follow up questions