UNIX/Linux Environment

Download Report

Transcript UNIX/Linux Environment

Introduction to C
Programming Language
AUBG ICoSCIS Team
Prof. Volin Karagiozov
February, 02 – 03, 2013
SWU, Blagoevgrad
Time Schedule
Saturday - Sunday, 02-03 February 2013
–10:00 – 10:45
–11:00 – 11:45
–12:00 – 12:45
Lunch Break (45’)
–13:30 – 14:15
–14:30 – 15:15
–15:30 – 16:15
Outline
• Overview – Supercomputers, GRID,
Applications, Programming Languages
• UNIX/Linux Environment
• Overview of C Programming Language
• C Language – statements …
– C Language – statements …
• C Language – statements …
– C Language – statements …
» C Language – statements …
High Performance
Computing
HPC
Supercomputers/GRID
Supercomputer architecture
From local parallelism towards massively parallel
systems( 1960’s – nowadays)
Cray-1 preserved at the
Deutsches Museum
The Blue Gene/P supercomputer at Argonne
National Lab runs over 250,000 processors
using normal data center air conditioning,
grouped in 72 racks/cabinets connected by a
high-speed optical network[1]
The world’s fastest computer
(currently) is (was ?)
At the time (2004 - 2008), the
world's fastest computer was
Blue Gene/L built by IBM and
placed at Lawrence Livermore
National Laboratory , that has
reached more than 136 trillion
operations a second (TFLOPS)
and plans to double that by
year's end.
“ This machines can be
used to answer questions
that literally will mean life
or death of humanity”, said
Peter A. Freeman,
assistant director at
National Science
Foundation.”
The world’s fastest computer
in 2011
Japan’s K Computer Tops 10
Petaflop/s to Stay Atop TOP500 List.
Installed at the RIKEN Advanced Institute
for Computational Science (AICS) in
Kobe, Japan, the K Computer it achieved
an impressive 10.51 Petaflop/s on the
Linpack benchmark using 705,024
SPARC64 processing cores.
In the second place is the Chinese
Tianhe-1A system with 2.57
Petaflop/s performance.
See www.top500.org
November 2012
General highlights from the TOP500 since
the last edition
• Already 46 percent of the systems use
processors with eight or more cores.
• Total combined performance of all 500
systems has grown to 162 Pflop/s, compared
to 123 Pflop/s six months ago and 74 Pflop/s
one year ago.
General highlights from the TOP500 since
the last edition
• A total of 379 systems (75.8 percent) are now
using Intel processors, about the same as in
the in the previous list 6 months ago.
• Intel is followed by the AMD Opteron family
with 61 systems (12.2 percent), down from 62
(12 percent) in the previous list 6 months ago.
• The share of IBM Power processors is at 53
systems (10.6 percent).
General highlights from the TOP500 since
the last edition
• IBM kept its lead in systems and has now 193
systems (38.6 percent) compared to HP with
146 systems (29.2 percent).
• IBM remains the clear leader in the TOP500
list in performance and has a considerably
lead with a share 41 percent of installed total
performance (down from 49.1 percent).
General highlights from the TOP500 since
the last edition
• HP is now only third even so it increased its
share to 11.4 percent up from 10.5 percent.
• Fujitsu follows closely in the 4th spot due to
the impressive performance of the No. 3 K
Computer with 8.5 percent down from 10.1
percent.
General highlights from the TOP500 since
the last edition
• The U.S. is clearly the leading consumer of HPC
systems with 250 of the 500 systems (252 last
time). The European share (105 systems – 106 last
time) is still lower than the Asian share (124
systems – 122 last time).
• Dominant countries in Asia are China with 72
systems (up from 68) and Japan with 31 systems
(down from 35).
• In Europe, UK, France, and Germany, are almost
equal with 24, 21, and 19 respectively.
First Commercially available SuperComputer
Compute Unified Device Architecture – Nvidia’s CUDA
Applications of Supercomputers
Operating Systems
http://www.top500.org
Programming Languages
TIOBE Programming Community Index for January 2013
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
GRID
http://grid.uni-sofia.bg/site/index.php/
What’s GRID Computing
Imagine several million computers from all over the world, and owned by thousands of different people. Imagine
they include desktops, laptops, supercomputers, data vaults, and instruments like mobile phones, meteorological
sensors and telescopes...
Now imagine that all of these computers can be connected to form a single, huge and super-powerful computer! This
huge, sprawling, global computer is what many people dream "The Grid" will be.
"The Grid" takes its name from an analogy with the electrical "power grid". The idea was that accessing computer
power from a computer grid would be as simple as accessing electrical power from an electrical grid".
HOW FAR CAN THIS "GRID" ANALOGY STRETCH?
Let's compare an electrical power grid with the dream "Grid":
Electrical power grid
You never worry about where the
electricity you are using comes from, if it
is from coal in Australia, from wind
power in the U.S. or from a nuclear plant
in France. You simply know that when
you plug your toaster in to the wall
socket, it will get the electrical power you
need to do the job.
The Grid
You would never worry about where the
computer power you are using comes
from, if it is from a supercomputer in
Germany, a computer farm in India or a
laptop in New Zealand. You simply know
that when you plug your computer in to
the Internet, it will get the computer
power you need to do the job.
http://www.gridcafe.org
UNIX/Linux
Environment
Introducing the UNIX and Linux
Operating Systems
• UNIX/Linux can be used on systems functioning as:
– Dedicated servers or client workstations in a serverbased network
– Client/server workstations connected to a peer-topeer network
– Stand-alone workstations not connected to a network
Introducing the UNIX and Linux
Operating Systems (continued)
• UNIX/Linux is a multi-user system
• UNIX/Linux is a multitasking system
– Can execute more than one program at a time
• UNIX/Linux is a portable operating system
– Used in many computing environments
UNIX Concepts
• Shell
– The interface between user and OS
• Hierarchical Structure
– Directory and subdirectory organization
• Layered components
– Layers of software surround the computer’s inner core
Linux and UNIX
• Linux is UNIX-like
– Not written from traditional UNIX code
• Linux is original code
– Includes POSIX standards
• Other Linux information
– Created by Linus Torvalds
– Offers all the complexity of UNIX
– Linux can coexist with other OSs
History of developing UNIX OS
• The original Bell Labs UNIX:
• 1969/70 Ken Thompson - UNiplexed Information and Computing
Service (the spelling of UNICS was later changed to UNIX)
• 1973 Ken Thompson and Dennis Ritchie (the author of C
language) rewrote the system in C
• The Berkeley Standard Distribution (late 70s):
• communication and networking functions, using communication
protocol TCP/IP
• one of the first full-screen editors - Vi (visual editors)
• CShell command interpreter
The Pioneers of UNIX
•
•
•
•
Dennis Ritchie (UNIX, C programming language)
Ken Thompson (UNIX)
Alfred Aho (AWK programming language)
Brian Kernighan (AWK programming language, many
C and UNIX programming books)
• Lorinda Cherry (many document processing tools)
Secure Shell (SSH)
• Developed for UNIX/Linux systems to provide authentication
security for TCP/IP applications, such as FTP and Telnet
• Can encrypt communications as they go across a network or
the Internet
• openSSH includes protocols and software for free distribution
on UNIX/Linux systems
Logging In to UNIX/Linux
What’s Next?
PRACTICE (Linux Environment)
Practice
• Login
– PuTTY IP address:
194.141.86.251
(192.168.0.151)
• Explore the environment – shell, home dir, etc.
• Basic UNIX command –
ls, pwd, mkdir, cd, nano-editor, man
cp, mv, rm
Input/output redirection
C-compiler - gcc