Compilers Introduction.

Slides:



Advertisements
Similar presentations
Technotronics GCECT '091 Decode C This is a C Programming event, where you will be given problems to solve using C only. You will be given a Linux system.
Advertisements

Introduction to C++ An object-oriented language Unit - 01.
C++ Development on Linux Agenda Introduction Editors Debuggers GUI IDEs Make Automake Exploring further.
ECMWF 1 Com Intro training course Compiling environment Compiling Environment – ecgate Dominique Lucas User Support.
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER 1 Mixed Language Programming on Seaborg Mark Durst NERSC User Services.
Online Resources Introducing F.W. Davison’s New Online Customer Resource Center.
Guide To UNIX Using Linux Third Edition
PHP Scripting Language. Introduction “PHP” is an acronym for “PHP: Hypertext Preprocessor.” It is an interpreted, server-side scripting language. Originally.
NDT Tools Tutorial: How-To setup your own NDT server Rich Carlson Summer 04 Joint Tech July 19, 2004.
7/17/2009 rwjBROOKDALE COMMUNITY COLLEGE1 Unix Comp-145 C HAPTER 2.
Building with MPC Charles Calkins Principal Software Engineer Object Computing, Inc.
1 uClinux course Day 3 of 5 The uclinux toolchain, elf format and ripping a “hello world”
Lesson 4 Computer Software
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
Executing OpenMP Programs Mitesh Meswani. Presentation Outline Introduction to OpenMP Machine Architectures Shared Memory (SMP) Distributed Memory MPI.
Enabling the ARM Learning in INDIA ARM DEVELOPMENT TOOL SETUP.
DIFFERENCE BETWEEN ORCAD AND LABVIEW
Introduction to Interactive Media Interactive Media Tools: Software.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
Crossing The Line: Distributed Computing Across Network and Filesystem Boundaries.
Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
Old Chapter 10: Programming Tools A Developer’s Candy Store.
Engineering Computing I Chapter 1 – Part A A Tutorial Introduction.
Editing & Compiling: UNIX vs. IDE and an Intro to Architecture.
Experiences with the Globus Toolkit on AIX and deploying the Large Scale Air Pollution Model as a grid service Ashish Thandavan Advanced Computing and.
Programming with Visual Studio 2005.NET A short review of the process.
Programming with Visual Studio.NET A short review of the process.
Bit-DSP-MicrocontrollerTMS320F2812 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH)
1 Qualifying ExamWei Chen Unified Parallel C (UPC) and the Berkeley UPC Compiler Wei Chen the Berkeley UPC Group 3/11/07.
Introduction on WRF-Var Regression Test Ruifang Li MMM Phone:
© 2005 IBM Essential Overview Louisiana Tech University Ruston, Louisiana Charles Grassl IBM January, 2006.
More Unix Naomi Altman. Directories Directory = folder mkdir - makes a new directory rmdir - removes an empty directory cd mydirectory - moves you into.
Department of Electronic & Electrical Engineering Introduction to C - The Development cycle. Why C? The development cycle. Using Visual Studio ? A simple.
Open project in Microsoft Visual Studio → build program in “Release” mode.
Program Libraries 1. What is a program library? A library is a collection of implementations of behavior, written in terms of a language, that has a well-defined.
UNIX/AIX COURSE OUTLINES AND SYLLABUS Document Version: 1.0 Created on: 09/19/2014 Author: Walter Takang Confirmed by: Walter Takang.
C Programming Lecture 3 : C Introduction 1 Lecture notes : courtesy of Woo Kyun and Chang Byung-Mo.
1 Visual Studio 2005 Options for Debug Mode: C++, Fortran, Linker December 8, 2009 Intel Compiler Version
김민수 Cortex-M4 Processor - Getting Started with the GNU Compiler Collection(gcc)
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني Computer Software.
 CSC 215 : Procedural Programming with C C Compilers.
Welcome to IBC233 Cindy Laurin And Russ Pangborn.
Software development tools
*DT Project Model Leo Treggiari Intel Corp. Dec, 2005.
1 CS 192 Lecture 4 Winter 2003 December 8-9, 2003 Dr. Shafay Shamail.
Procedures Procedures are very important for writing reusable and maintainable code in assembly and high-level languages. How are they implemented? Application.
Computer System Structures
CSC 215 : Procedural Programming with C
Development Environment
Connect:Direct for UNIX v4.2.x Silent Installation
COSC 350 System Programming
A technical look at new capabilities and features
CE-105 Spring 2007 Engr. Faisal ur Rehman
Introduction to Operating System (OS)
CMPE 152: Compiler Design ANTLR 4 and C++
Introduction of Week 3 Assignment Discussion
Quick Start Guide for Visual Studio 2010
C Programming Lecture Series
IBM Cognos Analytics (R12) Overview
Computer Science I CSC 135.
Unreal Engine and C++ We’re finally at a point where we can start working in C++ with Unreal Engine To get everything set up for this properly, we’re going.
University of Texas Rio Grande Valley Systems Administration CSCI 6175
Visual Studio 2005 Options for Release Mode: C++, Fortran, Linker
Review of Previous Lesson
1.3.7 High- and low-level languages and their translators
Java Coding Environment Installation & Execution guide
Presentation transcript:

Compilers Introduction

Agenda Documentation Compiler naming and default setting

XLF Fortran Documentation 1.Installation Guide - XL Fortran Enterprise Edition V10.1 for AIX 2. Getting Started - XL Fortran Enterprise Edition V10.1 for AIX 3. Language Reference - XL Fortran Enterprise Edition V10.1 for AIX 4. Compiler Reference - XL Fortran Enterprise Edition V10.1 for AIX 5. Optimization and Programming Guide - XL Fortran Enterprise Edition V10.1 for AIX 6. Readme File - XL Fortran Enterprise Edition V10.1 for AIX 7. Readme updates for XL Fortran Enterprise Edition V10.1 for AIX (and many similar volumes for C, C++, and Linux)

IBM XL compiler architecture IPA Objects Other Objects System Linker Optimized Objects EXE DLL Partitions TOBEY TPO C FE C++ FE FORTRAN FE Compile Step Optimization Libraries PDF info Link Step Wcode+ Wcode Instrumented runs

Compiler Document on Your Systems Document location C /usr/vac/pdf/en_US C++ /usr/vacpp/pdf/en_US xlf /usr/lpp/xlf/pdf C C++ xlf Language Reference language.pdf lg.pdf Compiler Reference compiler.pdf ug.pdf Debugging debug.pdf The “man” page $ man xlf – this one works! $ man xlC – I did not find man page

Compiler document on the Internet www.software.ibm.com/ Products A-Z X XLFORTRAN XLC/C++ Editions: Linux on pSeries AIX MAC OS X Blue Gene Many IBM customers place IBM document on line and it’s often easier to find those www.google.com

IBM Compiler Names Compiler Command Name C xlc xlc and Visual Age C (vac) C++ xlC xlC and Visual Age C++ (vacpp) FORTRAN xlf, xlf90, xlf95 XL FORTRAN There are a lot more, including fort77, cc99_128, xlc128_r7…

AIX Compiler Versions C C++ Fortran Versions 6.0, 7.0, 8.0 8.1, 9.1, 10.1 Standards Extended ANSI C ANSI C++ Fortran 77 Fortran 90 Fortran 95 Latest Release 2006 Installations /usr/vac /usr/vacpp /usr/lpp/xlf How to identify the compiler version? $ lslpp –l | grep xlf $ lslpp –l grep xlC

C Compiler Invocations Language Sequential Reentrant (for SMP) Message Passing ANSI C++ xlC xlC_r mpCC ANSI C xlc xlc_r mpcc Extended cc cc_r Two C compilers: C and C++ C is a subset of C++

Fortran Compiler Invocations Language Sequential Reentrant (for SMP) Message Passing Fortran 77 xlf xlf_r mpxlf Fortran 90 xlf90 xlf90_r mpxlf90 Fortran 95 xlf95 xlf95_r mpxlf95 One fortran compiler. Multiple invocations.

xlf_r and mpxlf Example: Hello, World program hello print *, ‘Hello, World’ end % xlf_r hello.f –l hello <<< using xlf_r % hello Hello, World % mpxlf hello.f –l hello <<<< using mpxlf % hello ERROR: 0031-808 Hostfile or pool must be used to request nodes % hello –procs 4 –hostfile hostfile Hello, World mpxlf will enable the binary to run in SPMD mode across multiple CPUs

Fortran Compiler Configuration File /etc/xlf.cfg ... * Fortran 90 compiler xlf90: use = DEFLT libraries = -lxlf90,-lxlopt,-lxlf,-lxlomp_ser,-lm,-lc proflibs = -L/lib/profiled,-L/usr/lib/profiled options = -qxlf90=noautodealloc:nosignedzero,-qfree=f90 * Alias for original Fortran compiler f77: use = DEFLT .. options = -qnozerosize,-qsave,-qalias=intptr,-qposition=appendold,- qxlf90=noautodealloc:nosignedzero,-qxlf77=intarg:intxor:persistent:noleadzero:ge dit77:noblankpad:oldboz:softeof

C Compiler Configuration File /etc/vac.cfg ... * ANSI C compiler, UNIX header files xlc: use = DEFLT crt = /lib/crt0.o mcrt = /lib/mcrt0.o gcrt = /lib/gcrt0.o libraries = -L/usr/lpp/xlopt,-lxlopt,-lc proflibs = -L/lib/profiled,-L/usr/lib/profiled options = -qansialias * C compiler, extended mode cc: use = DEFLT … options = -qlanglvl=extended,-qnoro,-qnoroconst...

Environment Variables LANG=en_US NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat For AIX Libxlf90.a should be at /usr/lib or set the path: LIBPATH = /my_xlf90_lib_path:/usr/lib Fox Linux, the path should be LD_LIBRARY_PATH=/usr/lib You may also need LD_RUN_PATH= runtime library search path

Fortran Compiler Defaults Options Source Format Storage $(FC) $(FFLAGS) -q{fixed|free} -q{save|nosave} xlf77 -qnoopt -qfixed -qsave xlf90 -qfree -qnosave Many compiler options have prefix “-q”

xlf Version 10.1 New allowable extensions: Traditional allowable extentions: .f .F (will pass through cpp before compiling)