sun microsystem and scientific research - sunstudio, sun...

61
Sun Microsystem and Scientific Research - SunStudio, Sun Performance Library and StarOffice NJ Governor's School 2007 Dr. Joseph J. Trout, Ph.D. Senior Systems Engineer, Sun Microsystems Solaris Adoption Team Adjunct Professor, Physics, Drexel University

Upload: doxuyen

Post on 22-Apr-2019

223 views

Category:

Documents


0 download

TRANSCRIPT

Sun Microsystem and Scientific Research - SunStudio, Sun Performance Library and StarOfficeNJ Governor's School 2007Dr. Joseph J. Trout, Ph.D.Senior Systems Engineer, Sun MicrosystemsSolaris Adoption TeamAdjunct Professor, Physics, Drexel University

Sun Proprietary/Confidential: Internal Use Only

Agenda

• StarOffice 8 Overview• SunStudio Overview• Sun Performance Overview• StarOffice Spreadsheet and Data Modeling• Fast Fourier Transform – Performance Library• Wavelets – Sun Studio

Sun Proprietary/Confidential: Internal Use Only

StarOffice Quick Description • Full featured office suite –

Spreadsheet, Word Processor, Presentation

• Read, edit, and create MS Office files

• Lower cost than alternatives> No Cost Licensing for Education

and Research.• Familiar and easy to use• Create PDF, Flash and HTML• Multi-platform: runs on Solaris,

Linux and Windows• Available in 15 languages• Based on OpenOffice.org open

source project• Excellent Equation Editor

Sun Proprietary/Confidential: Internal Use Only

StarOffice Downloading

• How to Get StarOffice 8> Students, Researchers, and Faculty can download StarOffice for Free!> Register and download for Windows, Linux, Solaris.> Web Site:

http://www.sun.com/products-n-solutions/edu/solutions/staroffice.html

Sun Proprietary/Confidential: Internal Use Only

Equation Editor:

Sun Proprietary/Confidential: Internal Use Only

Equation Editor:

Sun Proprietary/Confidential: Internal Use Only

Sun Studio Software Overview

• Record-setting parallelizing C/C++/Fortran Compilers> Improved GCC compatibility

• NetBeans-based IDE

• Stable, Scriptable, Multilingual Debugger (dbx)

• Memory Debugger- leak, access, usage (RTC)

• Application Profiling Tools (Performance Analyzer)

• Multi-core Optimizations, Multithreaded High Performance Libraries

• OpenMP v2.5 API Support

• Multithreading Tools

• SPARC (Solaris OS) , x86/x64 (Solaris & Linux OSs)

FREE

Sun Proprietary/Confidential: Internal Use Only

Take the Next Step

http://developers.sun.com/sunstudio

Download your FREE unrestricted copy of Sun Studio 12 today

Downloads, forums, technical articles, code samples, and more...

Sun Proprietary/Confidential: Internal Use Only

Sun Studio

Sun Proprietary/Confidential: Internal Use Only

Sun Performance Library

About the Sun Performance Library:

●Also available on several Linux operating environments. ●Sun Performance Library is a set of optimized, high-speed mathematical subroutines for solving linear algebra and other numerically intensive problems. ●Sun Performance Library is based on a collection of public domain subroutines available from Netlib at http://www.netlib.org. ●Sun has enhanced these public domain subroutines and bundled them as the Sun Performance Library.

Sun Proprietary/Confidential: Internal Use Only

Sun Performance LibrarySun Performance Library contains enhanced versions of the following standard libraries:

●LAPACK version 3.0 ● for solving linear algebra problems.

●BLAS1 (Basic Linear Algebra Subprograms) ● for performing vector-vector operations.

●BLAS2 ● for performing matrix-vector operations.

●BLAS3 ● for performing matrix-matrix operations.

Sun Proprietary/Confidential: Internal Use Only

Sun Performance Library

Sun Performance Library includes the following additional routines:

●Fast Fourier transform (FFT) routines ●Direct Sparse Solver routines ●Interval BLAS routines

Sun Proprietary/Confidential: Internal Use Only

Using StarOffice Spreadsheet to Model Data

Sun Proprietary/Confidential: Internal Use Only

Using StarOffice Spreadsheet to Model Data

Sun Proprietary/Confidential: Internal Use Only

Using StarOffice Spreadsheet to Model Data

Sun Proprietary/Confidential: Internal Use Only

Using StarOffice Spreadsheet to Model Data

Sun Proprietary/Confidential: Internal Use Only

Using StarOffice Spreadsheet to Model Data

Sun Proprietary/Confidential: Internal Use Only

Using StarOffice Spreadsheet to Model Data

Sun Proprietary/Confidential: Internal Use Only

Using StarOffice Spreadsheet to Model Data

Sun Proprietary/Confidential: Internal Use Only

Using StarOffice Spreadsheet to Model Data

Sun Proprietary/Confidential: Internal Use Only

Using StarOffice Spreadsheet to Model Data

Sun Proprietary/Confidential: Internal Use Only

0 50 100 150 200 250 300 350 40010

20

30

40

50

60

70

80

90

100

Average Temperature Vs. Day

Fit

Avg

1995

1996

1997

1998

1999

2000

2001

2002

2003

2004

2005

Time ( Day )

Tem

pera

ture

( o

F )

Sun Proprietary/Confidential: Internal Use Only

Using StarOffice Spreadsheet to Model Data

StarOffice has data analysis functions and trig functions such as average, standard deviation, sin, cos, tan, etc.

Sun Proprietary/Confidential: Internal Use Only

Using StarOffice Spreadsheet to Model Data

StarOffice has data analysis functions and trig functions such as average, standard deviation, sin, cos, tan, etc.

Sun Proprietary/Confidential: Internal Use Only

0 50 100 150 200 250 300 350 40010

20

30

40

50

60

70

80

90

100

Average Temperature Vs. Day

Fit

Avg

1995

1996

1997

1998

1999

2000

2001

2002

2003

2004

2005

Time ( Day )

Tem

pera

ture

( o

F )

Sun Proprietary/Confidential: Internal Use Only

Using StarOffice Spreadsheet to Model Data

We can use StarOffice to fit a model to the data.

y t =A sin 2T tT F t =T F aveT F amplitude sin 2T t

T F=Average Temperature of the DayT F ave=Yearly Temperature Average

T Famplitude=AmplitudeT=Period= phase shift

t=Time In day of the year

Sun Proprietary/Confidential: Internal Use Only

Using StarOffice Spreadsheet to Model Data

We can use StarOffice to fit a model to the data.

T F t =T F aveT F amplitude sin 2T tT F t =55.82oF24oF sin 2

365.25dayst−1.9

Sun Proprietary/Confidential: Internal Use Only

0 50 100 150 200 250 300 350 40010

20

30

40

50

60

70

80

90

100

Average Temperature Vs. Day

Fit

Avg

1995

1996

1997

1998

1999

2000

2001

2002

2003

2004

2005

Time ( Day )

Tem

pera

ture

( o

F )

Sun Proprietary/Confidential: Internal Use Only

Using StarOffice Spreadsheet to Model Data

Let's see how we did. Let's predict today's average temperature.

Today is July 18, 2007 and is the 199th day of the year.

T F t =T F aveT F amplitudesin 2T tT F t =55.82o F24oF sin 2

365.25dayst−1.9

T F t =55.82oF24o F sin 2365.25days

199days−1.9=79.82o F

Sun Proprietary/Confidential: Internal Use Only

Using StarOffice Spreadsheet to Model Data

Just for the record:

●This was a simplified example of the process.●We did not really “worry” about the leap years.●You would not just “eye” the graph to construct the model.

This simplified example was to give you an idea of how StarOffice can be useful to you.

Sun Proprietary/Confidential: Internal Use Only

Fourier SeriesJean Baptiste Joseph FourierBorn: 21 March 1768 in Auxerre, Bourgogne, FranceDied: 16 May 1830 in Paris, France

According to Fourier, ANY periodic function can be represented as a sum of sine and cosine terms.

y t =∑n[An sin 2 f n t Bncos 2 f n t ]

Sun Proprietary/Confidential: Internal Use Only

Fourier Series – Square Wave

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-1

-0.75

-0.5

-0.25

0

0.25

0.5

0.75

1

Square Wave

Square

time(s)

y(t)

Sun Proprietary/Confidential: Internal Use Only

Fourier Series – Square Wave

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-1

-0.75

-0.5

-0.25

0

0.25

0.5

0.75

1

Fourier Series

Square

Fo

3Fo

5Fo

7Fo

9Fo

11Fo

13Fo

15Fo

17Fo

19Fo

21Fo

23Fo

Fourier

time(s)

y(t)

Sun Proprietary/Confidential: Internal Use Only

Fourier Series – Square Wave

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-1

-0.75

-0.5

-0.25

0

0.25

0.5

0.75

1

Fourier Series

Square

Fo

3Fo

5Fo

7Fo

9Fo

11Fo

13Fo

15Fo

17Fo

19Fo

21Fo

23Fo

Fourier

time(s)

y(t)

Sun Proprietary/Confidential: Internal Use Only

Fourier Series – Square Wave

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-1

-0.75

-0.5

-0.25

0

0.25

0.5

0.75

1

Fourier Series

Square

Fo

3Fo

5Fo

7Fo

9Fo

11Fo

13Fo

15Fo

17Fo

19Fo

21Fo

23Fo

Fourier

time(s)

y(t)

Sun Proprietary/Confidential: Internal Use Only

Fourier Series – Square Wave

0 0.25 0.5 0.75 1 1.25 1.5 1.75 2-1

-0.75

-0.5

-0.25

0

0.25

0.5

0.75

1

Fourier SeriesSquare

Fo

3Fo

5Fo

7Fo

9Fo

11Fo

13Fo

15Fo

17Fo

19Fo

21Fo

23Fo

25Fo

27Fo

29Fo

31Fo

33Fo

35Fo

37Fo

39Fo

41Fo

42Fo

45Fo

47Fo

49Fo

51Fo

53Fo

55Fo

Fourier

time(s)

y(t)

Sun Proprietary/Confidential: Internal Use Only

We can also use Fourier Analysis to find out what frequencies make up a Wave or Signal.

Sun Proprietary/Confidential: Internal Use Only

We can also use Fourier Analysis to find out what frequencies make up a Wave or Signal.

Sun Proprietary/Confidential: Internal Use Only

Hourly Average Temperature

Sun Proprietary/Confidential: Internal Use Only

#include <sunperf.h>... ezffti(n, wsave); ezfftf(n, r, azero, a, b, wsave);...

cc test_fft_perf_file.c -lm -v -xlic_lib=sunperf -o test_fft_perf_file

Temperature – Power Spectrum

Sun Proprietary/Confidential: Internal Use Only

n (input) Number of Data Points.

r (input) A real array of length n containing the sequence to be transformed. On exit, r is unchanged.

azero (output) On exit, the sum from i=1 to i=n of r(i)/n, i.e. The average of the signal. a (input/output)

On entry, arrays that contain the remaining Fourier coefficients. The amplitude of the cosine waves.

b (input/output) On entry, arrays that contain the remaining Fourier coefficients. The Amplitude of the sine

waves.

wsave (input) On entry, an array with dimension of at least (3 *N + 15), initialized by EZFFTI. A working array.

Temperature – Power Spectrum

Sun Proprietary/Confidential: Internal Use Only

First, lets to some test, to make sure our FFT works.

Temperature – Power Spectrum

Sun Proprietary/Confidential: Internal Use Only

Two Frequency Test – Power Spectrum

y t =11.0 sin 21.0 s−1 t 2.0 sin 2365.25 s−1 t

Sun Proprietary/Confidential: Internal Use Only

Two Frequency Test – Power Spectrum

azero: 16.999989i= 28 f= 1.00 a= 0.000003 b= 11.000760 A= 11.000760 i= 10227 f= 365.25 a= -0.000081 b= 2.000098 A= 2.000098

Sun Proprietary/Confidential: Internal Use Only

Three Frequency Test – Power Spectrum

y t =11.0sin 21.0 s−1 t 2.0 sin 2365.25 s−1 t 5.0 sin 20.5 s−1 t

Sun Proprietary/Confidential: Internal Use Only

azero: 16.999989 i= 14 f= 0.50 a= 0.000004 b= 5.000147 A= 5.000147 i= 28 f= 1.00 a= 0.000003 b= 11.000760 A= 11.000760 i= 10227 f= 365.25 a= -0.000081 b= 2.000098 A= 2.000098

Three Frequency Test – Power Spectrum

Sun Proprietary/Confidential: Internal Use Only

Three Frequency Test – Power Spectrum

Sun Proprietary/Confidential: Internal Use Only

azero: 17.0000 i= 13 f= 0.464286 a= -1.650544 b= -0.000019 A= 1.650544 i= 14 f= 0.500000 a= 0.000134 b= 2.500073 A= 2.500073 i= 15 f= 0.535714 a= 1.536705 b= -0.000030 A= 1.536705 i= 28 f= 1.000000 a= 0.000122 b= 11.000760 A= 11.000760

i= 10227 f= 365.250000 a= -0.000020 b= 1.000049 A= 1.000049

Three Frequency Test – Power Spectrum

Sun Proprietary/Confidential: Internal Use Only

Three Frequency Test – Problem With FFT

Sun Proprietary/Confidential: Internal Use Only

Temperature – Power Spectrum

Sun Proprietary/Confidential: Internal Use Only

Temperature – Power Spectrum

Sun Proprietary/Confidential: Internal Use Only

Temperature – Power Spectrumazero = 17.724915 i= 21 f= 0.750000 a= -0.472239 b= 1.007747 A= 1.112908 i= 22 f= 0.785714 a= -0.073951 b= 1.434289 A= 1.436194 i= 23 f= 0.821429 a= 0.190072 b= 1.979196 A= 1.988302 i= 24 f= 0.857143 a= 1.106927 b= 1.899358 A= 2.198374 i= 25 f= 0.892857 a= 1.640487 b= 1.510557 A= 2.230018 i= 26 f= 0.928571 a= 2.265698 b= 0.372863 A= 2.296174 i= 27 f= 0.964286 a= 2.217068 b= -0.963278 A= 2.417291 i= 28 f= 1.000000 a= -8.963787 b= 1.290257 A= 9.056171 i= 29 f= 1.035714 a= 0.669938 b= -2.489800 A= 2.578356 i= 30 f= 1.071429 a= 0.745567 b= -1.862980 A= 2.006630 i= 31 f= 1.107143 a= 0.381943 b= -1.296685 A= 1.351766 i= 32 f= 1.142857 a= 0.065296 b= -0.882051 A= 0.884465 i= 10215 f= 364.821442 a= 0.222982 b= 0.833274 A= 0.862593 i= 10216 f= 364.857147 a= 0.079152 b= -0.833938 A= 0.837686 i= 10217 f= 364.892853 a= -0.447426 b= 1.263199 A= 1.340098 i= 10218 f= 364.928589 a= -0.205658 b= -1.456414 A= 1.470863 i= 10219 f= 364.964294 a= 0.776877 b= 0.367377 A= 0.859362 i= 10220 f= 365.000000 a= -0.343463 b= 0.867783 A= 0.933281

Sun Proprietary/Confidential: Internal Use Only

Three Frequency Test – Problem With FFT

Sun Proprietary/Confidential: Internal Use Only

Enter Wavelets ....

Daub 20

Sun Proprietary/Confidential: Internal Use Only

Enter Wavelets .... Some Applications of Wavelets:Some Applications of Wavelets:

●Jean Morlet (1984), a geologist analyzing seismic signals, developed what are now known as 'Morlet wavelets”.

●Wavelets are central to the new JPEG-2000 digital image standard.

●WSQ method that the FBI uses to compress its fingerprint database.

●De-noising data.

●Image Compression.

●Data Analysis

Sun Proprietary/Confidential: Internal Use Only

Enter Wavelets .... Some Wavelets:Some Wavelets:

Haar Wavelet

Sinc Wavelet

Daubechies Wavelet daub4

Sun Proprietary/Confidential: Internal Use Only

Enter Wavelets ....

Sun Proprietary/Confidential: Internal Use Only

Enter Wavelets ....

Sun Proprietary/Confidential: Internal Use Only

Temperature – Power Spectrum

Sun Proprietary/Confidential: Internal Use Only

Temperature – Wavelets

Sun Microsystem and Scientific Research - SunStudio, Sun Performance Library and StarOffice

Joe [email protected]