ECMWF 1 Com Intro training course - 2004 Compiling environment Compiling Environment – ecgate Dominique Lucas User Support.

Slides:



Advertisements
Similar presentations
2017/3/25 Test Case Upgrade from “Test Case-Training Material v1.4.ppt” of Testing basics Authors: NganVK Version: 1.4 Last Update: Dec-2005.
Advertisements

IS 6116 Introduction – 10 Jan Lecturer Details Aonghus Sugrue Website: aonghussugrue.wordpress.com
Zhongxing Telecom Pakistan (Pvt.) Ltd
1 Copyright © 2002 Pearson Education, Inc.. 2 Chapter 1 Introduction to Perl and CGI.
Chapter 7 Constructors and Other Tools. Copyright © 2006 Pearson Addison-Wesley. All rights reserved. 7-2 Learning Objectives Constructors Definitions.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 15 Introduction to Rails.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 12 Introduction to ASP.NET.
Chapter 11 Introduction to Programming in C
Copyright © 2013 Elsevier Inc. All rights reserved.
CSE 105 Structured Programming Language (C)
Credit hours: 4 Contact hours: 50 (30 Theory, 20 Lab) Prerequisite: TB143 Introduction to Personal Computers.
Credit hours: 4 Contact hours: 50 (30 Theory, 20 Lab) Prerequisite: TB143 Introduction to Personal Computers.
6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.
17 Copyright © 2005, Oracle. All rights reserved. Deploying Applications by Using Java Web Start.
Introduction to Metview
ECMWF 1 COM INTRO 2004: Introduction to file systems Introduction to File Systems Computer User Training Course 2004 Carsten Maaß User Support.
BUFR decoding Dominique Lucas – Milan Dragosavac
View-Based Application Development Lecture 1 1. Flows of Lecture 1 Before Lab Introduction to the Game to be developed in this workshop Comparison between.
Excel Functions. Part 1. Introduction 2 An Excel function is a formula or a procedure that is performed in the Visual Basic environment, outside the.
Teacher/Mentor Institute Using the Cortex Chuck Powell.
Chapter 7 Memory Management
Intel VTune Yukai Hong Department of Mathematics National Taiwan University July 24, 2008.
Suite Suite 2 TPF Software – Overview Binary Editor Remote Scripts zTREX Add-Ins & Project Integration with Source Control Manager.
Accelerated Linear Algebra Libraries James Wynne III NCCS User Assistance.
SE-292: High Performance Computing
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 24.1 Test-Driving the Ticket Information Application.
Exercise 1: Install PC Software & NXT Firmware
Trap Diagnostic Facility Todays Software Diagnostic Tool with innovative features for the z/OS software developer Arney Computer Systems.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 23 – ASP.NET Outline 23.1 Introduction 23.2.NET Overview NET Framework ASP (Active.
Fixed-point and floating-point numbers CS370 Fall 2003.
ECMWF 1 COM HPCF 2004: High performance file I/O High performance file I/O Computer User Training Course 2004 Carsten Maaß User Support.
Overview of programming in C C is a fast, efficient, flexible programming language Paradigm: C is procedural (like Fortran, Pascal), not object oriented.
Part IV: Memory Management
Macromedia Dreamweaver MX 2004 – Design Professional Dreamweaver GETTING STARTED WITH.
2004 EBSCO Publishing Presentation on EBSCOadmin.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 10 – Enhancing the Wage Calculator Application:
Chapter 9 Interactive Multimedia Authoring with Flash Introduction to Programming 1.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 1 v3.1 Module 9 TCP/IP Protocol Suite and IP Addressing.
14-1 Bard, Gerstlauer, Valvano, Yerraballi EE 319K Introduction to Embedded Systems Lecture 14: Gaming Engines, Coding Style, Floating Point.
Chapter 16 Java Virtual Machine. To compile a java program in Simple.java, enter javac Simple.java javac outputs Simple.class, a file that contains bytecode.
Introduction to Programming G51PRG University of Nottingham Revision 1
Chapter 8 Improving the User Interface
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER 1 Mixed Language Programming on Seaborg Mark Durst NERSC User Services.
Binghamton University CS-220 Spring 2015 Binghamton University CS-220 Spring 2015 Object Code.
NUG Meeting 1 File and Data Conversion Jonathan Carter NERSC User Services
C6713 DSK Diagnostic Utility included with DSK....
Chapter 2 Software Tools and Assembly Language Syntax.
F13 Forensic tool analysis Dr. John P. Abraham Professor UTPA.
Intro. to Game Programming Want to program a game?
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training course describes how to configure the the C/C++ compiler options.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training module provides an overview of optimization techniques used in.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER 1 Porting from the Cray T3E to the IBM SP Jonathan Carter NERSC User Services.
Linking and Loading Linker collects procedures and links them together object modules into one executable program. Why isn't everything written as just.
CIS-165 C++ Programming I CIS-165 C++ Programming I Bergen Community College Prof. Faisal Aljamal.
Replay Compilation: Improving Debuggability of a Just-in Time Complier Presenter: Jun Tao.
® IBM Software Group © 2006 IBM Corporation PurifyPlus on Linux / Unix Vinay Kumar H S.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
Chapter 13 : Symbol Management in Linking
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course explains how to use section setting and memory.
CSc 352 Debugging Tools Saumya Debray Dept. of Computer Science The University of Arizona, Tucson
LECTURE 3 Translation. PROCESS MEMORY There are four general areas of memory in a process. The text area contains the instructions for the application.
INTRODUCTION TO PROGRAMING System Development Mansoura October 2015.
Lecture 3 Translation.
Debugging with gdb gdb is the GNU debugger on our CS machines.
Computer Organization & Compilation Process
Compilers Introduction.
Computer Organization & Compilation Process
SPL – PS1 Introduction to C++.
Presentation transcript:

ECMWF 1 Com Intro training course Compiling environment Compiling Environment – ecgate Dominique Lucas User Support

ECMWF 2 Com Intro training course Compiling environment Content Introduction Fortran Compiler Compiler Options Word Lengths Fortran I/O Linking Libraries Debugging Profiling Practical session

ECMWF 3 Com Intro training course Compiling environment Introduction Why compiling at ECMWF? decoding of (MARS) data model runs Which platforms available? Unix IBM server (ecgate) IBM Supercomputers (hpca) Which compilers? Fortran (77/90/95) C/C++ Which platform to use? High Performance Computing Facility (HPCF) for computing intensive work, including any // work. IBM server for decoding or I/O bound work.

ECMWF 4 Com Intro training course Compiling environment Compilers IBM compilers: xlf[90|95] for Fortran xlc for C xlC for C++ Which version do I use? lslpp –l xlf* lslpp –l xlC* How to select a different version of a Compiler? If a different version is available, this can be set with a ECMWF local utility called use, e.g.: use xlf_8113

ECMWF 5 Com Intro training course Compiling environment Compilers File suffixes for fortran.f or.F to run the C preprocessor.f90 with -qsuffix=f=f90.F90 with –qsuffix=f=f90:cpp=F90

ECMWF 6 Com Intro training course Compiling environment Compilers Common file suffixes and files.o :object file.a : archive file (library).so:share object (library).s: assembler listing.list: source listing.mod:fortran 90 module files a.out:default name of executable

ECMWF 7 Com Intro training course Compiling environment Fortran source code format Fixed with xlf Free with xlf[90|95] Format can be given with options –qfixed or -qfree A few examples $ xlf prog.f # fixed f77 $ xlf prog.F # fixed f77 via cpp $ xlf90 –qsuffix=f=f90 prog.f90# free f90 $ xlf90 prog.F# free f90 via cpp Fortran compiler

ECMWF 8 Com Intro training course Compiling environment Setting options – given by increasing precedence In the configuration file – system wide less /etc/xlf.cfg At the command line – used for all the file xlf –qfixed prog.f As a directive in the source code – for the next unit. head FIXED Fortran Compiler options

ECMWF 9 Com Intro training course Compiling environment Fortran 77 / f90 -ccompilation only, no linking -qsource listing -qrealsize=8 64bit real variables -O optimisation -g debugging -v verbose -help display usage Defaults: underscores (-qextname) and 32-bit addressing mode (-q32) Well over 100 options. See man page for full list of options. Fortran Compiler common options

ECMWF 10 Com Intro training course Compiling environment 32bit reals and integer by default The option –qrealsize=8 promotes real variables to 64bit Integer*8 and 128bit floating point computation available and slightly slower than integer*4 or real*8 computation. When using a library, check its precision, e.g. for EMOSLIB. Word lengths – precision

ECMWF 11 Com Intro training course Compiling environment Unit numbers: Units 0, 5 and 6 reserved, respectively for STD error, input and output. Connecting files to Units: open (1,file="data",...) ln -s data fort.1 Fortran record types: formatted/unformatted read (1)length list-directed write(*,*)'lenght=',length Namelist read(5,NML=name_l) Fortran I/O

ECMWF 12 Com Intro training course Compiling environment Access method: sequential access direct access record length - in bytes IEEE format - big-endian real*4 bit 31: sign bits 30-23: exponent bits 22-0: mantissa real*8 bit 63: sign bits 62-52: exponent bits 51-0: mantissa Fortran I/O – data representation

ECMWF 13 Com Intro training course Compiling environment Use xlf to link, eg. $ xlf -o prog prog.f $EMOSLIB duplicated entries. Static vs. dynamic linking: Option –bdynamic or –bstatic Default: -bdynamic Loadmap useful to identify duplicated entries or unresolved symbols $ xlf –bloadmap:map –o prog prog.f $EMOSLIB $ less map Linking

ECMWF 14 Com Intro training course Compiling environment Static and shared/dynamic libraries Use "ar" to build static libraries, eg. $ ar -vr libmy.a *.o Use xlc" to build shared/dynamic libraries, $ cc -G *.o –o libmy.a $ xlf -o prog prog.f -L. –lmy $ export LIBPATH=${LIBPATH}:. $./prog Alternatively, see Building libraries

ECMWF 15 Com Intro training course Compiling environment checking: argument checking: -qextchk xlf –qextchk prog.f –o prog checking done at compilation/linking array bounds checking: -C xlf –C prog.f –o prog./prog checking done at runtime undefined reference checking xlf –qinitauto=FF –qflttrap prog.f –o prog checking done at runtime Debugging

ECMWF 16 Com Intro training course Compiling environment nothing generated on floating point exception. Floating point trapping % xlf –qflttrap=overflow:invalid:zerodivide:enable \ –qsigtrap prog.f –o prog %./prog... interactive window based debugger: - totalview Core files – how to get a traceback % dbx./prog core <<eof where eof Debugging – floating point exceptions

ECMWF 17 Com Intro training course Compiling environment timex - command timer $ timex [-ops] a.out -O and other options at compilation for faster execution. See man page. other AIX applications, like prof, gprof $ xlf –p prog.f $ a.out $ prof Profiling - tuning