Status of LHCb applications on 64-bit platforms Rosa M. Garcia - - PowerPoint PPT Presentation

status of lhcb applications on 64 bit platforms
SMART_READER_LITE
LIVE PREVIEW

Status of LHCb applications on 64-bit platforms Rosa M. Garcia - - PowerPoint PPT Presentation

Status of LHCb applications on 64-bit platforms Rosa M. Garcia Rioja Openlab Contents 64-bit platforms Source Code issues LHCb applications Global status Issues found Future problems, actions and solutions


slide-1
SLIDE 1

Status of LHCb applications

  • n 64-bit platforms

Rosa M. Garcia Rioja Openlab

slide-2
SLIDE 2

Status of LHCb applications on 64-bit architectures 2

Contents

  • 64-bit platforms

– Source Code issues

  • LHCb applications

– Global status – Issues found – Future problems, actions and solutions

  • Conclusions
slide-3
SLIDE 3

Status of LHCb applications on 64-bit architectures 3

Data size

16 32 128

short Int, float long, double size_t,pointer long double long l; int i; long generateNumber(); l=generateNumber(); i = l + +;

64 l 32 i 64

slide-4
SLIDE 4

Status of LHCb applications on 64-bit architectures 4

Data size

  • Do not assign long or pointers to

int

  • size_t, time_t, and ptrdiff_t are

64-bit Do not assume they are interchangeable with integer

  • Use ANSI const instead of #def

hexadecimal variables 32 OS 64 OS

#define OFFSET1 0xFFFFFFFF -1 4,294,967,295 #define OFFSET2 0x100000000 0 4,294,967,296 const signed int OFFSET1 = 0xFFFFFFFF;

slide-5
SLIDE 5

Status of LHCb applications on 64-bit architectures 5

Pointers

  • Pointer sizes

– Pointer size is 64 bit. – Wrong cast  Value of the pointer will be truncated – Problems with int (linux) and long and int (windows)

int int

0x00000C5BFF45111F

pointer

0xFF45111F

int int pointer

235.6 hello “a” “b” 7 Step 0 Step 1 char p=“a”; (&p= 0x00000C5BFF45111F) int i= &p (*i= 0xFF45111F)

slide-6
SLIDE 6

Status of LHCb applications on 64-bit architectures 6

Pointers

  • Do not code with native C types that

change in 64-bit OS.

  • Use Macros or type definitions
  • Use polymorphic types

Linux

long, size_t, ssize_t counting numbers intptr_t, uintptr_t type-cast pointer

Windows

int3264, SIZE_T, SSIZE_T Windows\ 2000 (64-bit) size_t, ssize_t ANSI counting numbers LPARAM, WPARAM, LRESULT, INT_PTR, UINT_PTR, DWORD_PTR, LONG_PTR, ULONG_PTR Windows 2000 (64-bit) intptr_t, uintptr_t ANSI type-cast pointer

slide-7
SLIDE 7

Status of LHCb applications on 64-bit architectures 7

Some tips

  • Do not mix different data models
  • Use define types or macros to

isolate the code from the architecture

  • Use pre-processor flags for different

architectures implementations: __LP64__, __M_IA64 ,__WIN64 , __WIN32

  • Use specific functions to access data

sizes and system parameters

slide-8
SLIDE 8

LHCb applications

slide-9
SLIDE 9

Status of LHCb applications on 64-bit architectures 9

LHCb applications

CORAL POOL COOL GAUDI EULER MOORE GAUSS RELAX ROOT SEAL

SCRAM CMT

Simulation Data Mgmt. Core External Dependencies …

slide-10
SLIDE 10

Status of LHCb applications on 64-bit architectures 10

SEAL

  • SEAL Software infrastructure,

basic framework libraries and tools for LHC experiments

  • Merge to ROOT 5.0.8

– Packages: Dictionary & Reflection – Maintain those packages for previous versions

  • Neither update, nor change or

port

slide-11
SLIDE 11

Status of LHCb applications on 64-bit architectures 11

MathLib

SEAL packages

SealUtil SealZip SealIOTools PluginManager

Foundation Framework Dictionary Scripting

SealBase SealKernel SealIServices LcgDict Reflex Cintex Reflexion Dictionary PyROOT PyBus PyLcgDict Minuit MathCore FML

RELAX ROOT

slide-12
SLIDE 12

Status of LHCb applications on 64-bit architectures 12

SEAL

  • External libraries:

– afs (careful with the right architecture) – Local (rebuild them & keep directory structure)

  • Properly initialize environment

variables

  • scram

– eval `scram runtime –sh` – scram b release-reset-arch – Scram build – qmtest run testsuitName

slide-13
SLIDE 13

Status of LHCb applications on 64-bit architectures 13

POOL & CORAL

  • Provides a general persistency

store for the LHC experiment to store events and associated metadata.

  • Partially ported

– 64 bit clean at end of March

  • New application CORAL

– Allow access to different Data structures in a transparent way. – 64 bit clean

slide-14
SLIDE 14

Status of LHCb applications on 64-bit architectures 14

GAUDI

  • Framework of simulation

– Event Modeling – Persistency is crucial – Only one package depends on POOL  the critical one – Not clean

slide-15
SLIDE 15

Status of LHCb applications on 64-bit architectures 15

GAUDI object diagram

Tr a ns i e nt Ev e nt St

  • r

e

Co nv e r t e r Al g

  • r

i t h m

Ev e n t Da t a Se r v i c e Pe r s i s t e nc y Se r v i c e

Da t a Fi l e s Al g

  • r

i t h m

Al g

  • r

i t h m De t e c . Da t a Se r v i c e Pe r s i s t e nc y Se r v i c e

Da t a Fi l e s

Tr a ns i e nt De t e c t

  • r

St

  • r

e M e s s a g e Se r v i c e J

  • b

Op t i

  • ns

Se r v i c e Pa r t i c l e Pr

  • p

. Se r v i c e Ot h e r Se r v i c e s Hi s t

  • g

r a m Se r v i c e Pe r s i s t e nc y Se r v i c e

Da t a Fi l e s

Tr a ns i e nt Hi s t

  • g

r a m St

  • r

e Ap p l i c a t i

  • n

M a na g e r

Co nv e r t e r

Co nv e r t e r Ev e nt Se l e c t

  • r

POOL dependency

Image from:http://lhcb-comp.web.cern.ch/lhcb-comp/Frameworks/Gaudi/GaudiTutorial.htm

slide-16
SLIDE 16

Status of LHCb applications on 64-bit architectures 16

GAUDI

  • Pool is not yet clean  Main

external dependency

  • Build with cmt
  • Set environment
  • Cmt broadcast gmake
  • Packages not using POOL

can run on 64-bit architectures

slide-17
SLIDE 17

Status of LHCb applications on 64-bit architectures 17

Some external dependencies

  • Some tests failing or patches

needed:

– GSl, Python, gccxml, Swig,Anaphe

  • CLHEP includes –fPIC in makefile
  • Boost
  • ROOT
slide-18
SLIDE 18

Status of LHCb applications on 64-bit architectures 18

Global Status

CORAL POOL COOL GAUDI RELAX ROOT SEAL External Dependencies

Not clean for 64 bits

slide-19
SLIDE 19

Status of LHCb applications on 64-bit architectures 19

Issues found

  • External dependencies:

– Some adapted by CERN and available only for 32-bit archs. – No tests to verify they really work on 64 bit archs.

  • No homogeneous build tools

– Autoconfig, make, scram and CMT

  • Debuggers /memory tracers tools

for 64-bit or complex applications using different languages together.

slide-20
SLIDE 20

Status of LHCb applications on 64-bit architectures 20

Issues found

  • Typical problems porting code

from 32 to 64 bit architectures

– Pointers, int, long … – Assembler code inside the C++ code – Specific architectural parameters defined as constants

  • Patches unapplied
slide-21
SLIDE 21

Status of LHCb applications on 64-bit architectures 21

To be solved

  • Check client and server

architectures

  • Typedefs
  • A class mapping the types and

architectures  discuss in Architects Forum

Buffer 4*long (32 bits) Buffer 4*long (64 bits)

slide-22
SLIDE 22

Status of LHCb applications on 64-bit architectures 22

Conclusions

  • Now 64 bit architectures are

being considered inside the developer community

  • Most of the LHCb stack is ready
  • There is some expertise on

porting

  • Some problems still need to be

solved.

slide-23
SLIDE 23

Status of LHCb applications on 64-bit architectures 23