status of lhcb applications on 64 bit platforms
play

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


  1. Status of LHCb applications on 64-bit platforms Rosa M. Garcia Rioja Openlab

  2. Contents • 64-bit platforms – Source Code issues • LHCb applications – Global status – Issues found – Future problems, actions and solutions • Conclusions Status of LHCb applications on 64-bit architectures 2

  3. Data size short 16 Int, float 32 long, double size_t,pointer 64 long double 128 long l; int i; long generateNumber(); 64 l l=generateNumber(); 32 i i = l + +; Status of LHCb applications on 64-bit architectures 3

  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; Status of LHCb applications on 64-bit architectures 4

  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) char p=“a”; (&p= 0x00000C5BFF45111F) int i= &p (*i= 0xFF45111F) “a” hello 235.6 Step 0 0x00000C5BFF45111F int int pointer 7 Step 1 0xFF45111F int int pointer “b” Status of LHCb applications on 64-bit architectures 5

  6. Pointers • Do not code with native C types that change in 64-bit OS. • Use Macros or type definitions • Use polymorphic types Linux type-cast pointer intptr_t, uintptr_t counting numbers long, size_t, ssize_t ANSI intptr_t, uintptr_t LPARAM, WPARAM, LRESULT, type-cast Windows Windows INT_PTR, UINT_PTR, pointer 2000 (64-bit) DWORD_PTR, LONG_PTR, ULONG_PTR ANSI size_t, ssize_t counting Windows\ numbers int3264, SIZE_T, SSIZE_T 2000 (64-bit) Status of LHCb applications on 64-bit architectures 6

  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 Status of LHCb applications on 64-bit architectures 7

  8. LHCb applications

  9. LHCb applications Simulation GAUSS MOORE … EULER CMT GAUDI Data Mgmt . COOL POOL SCRAM CORAL RELAX Core SEAL ROOT External Dependencies Status of LHCb applications on 64-bit architectures 9

  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 Status of LHCb applications on 64-bit architectures 10

  11. SEAL packages MathLib Minuit FML MathCore Scripting PyROOT PyLcgDict PyBus LcgDict Cintex Reflex Dictionary Dictionary Reflexion Framework SealKernel SealIServices SealBase SealUtil SealZip Foundation SealIOTools PluginManager RELAX ROOT Status of LHCb applications on 64-bit architectures 11

  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 Status of LHCb applications on 64-bit architectures 12

  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 Status of LHCb applications on 64-bit architectures 13

  14. GAUDI • Framework of simulation – Event Modeling – Persistency is crucial – Only one package depends on POOL  the critical one – Not clean Status of LHCb applications on 64-bit architectures 14

  15. GAUDI object diagram POOL dependency Co nv e r t e r Ap p l i c a t i o n Co nv e r t e r Ev e nt Co nv e r t e r M a na g e r Se l e c t o r M e s s a g e Pe r s i s t e nc y Da t a Ev e n t Da t a Se r v i c e Se r v i c e Se r v i c e Fi l e s Tr a ns i e nt Ev e nt J o b Op t i o ns St o r e Al g o r i t h m Se r v i c e Al g o r i t h m Al g o r i t h m Tr a ns i e nt Pa r t i c l e Pr o p . Pe r s i s t e nc y Da t a De t e c . Da t a De t e c t o r Se r v i c e Se r v i c e Se r v i c e Fi l e s St o r e Ot h e r Se r v i c e s Pe r s i s t e nc y Da t a Hi s t o g r a m Tr a ns i e nt Se r v i c e Se r v i c e Fi l e s Hi s t o g r a m St o r e Image from:http://lhcb-comp.web.cern.ch/lhcb-comp/Frameworks/Gaudi/GaudiTutorial.htm Status of LHCb applications on 64-bit architectures 15

  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 Status of LHCb applications on 64-bit architectures 16

  17. Some external dependencies • Some tests failing or patches needed: – GSl, Python, gccxml, Swig,Anaphe • CLHEP includes –fPIC in makefile • Boost • ROOT Status of LHCb applications on 64-bit architectures 17

  18. Global Status GAUDI COOL POOL CORAL RELAX SEAL ROOT External Dependencies Not clean for 64 bits Status of LHCb applications on 64-bit architectures 18

  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. Status of LHCb applications on 64-bit architectures 19

  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 Status of LHCb applications on 64-bit architectures 20

  21. To be solved • Check client and server architectures Buffer 4*long (32 Buffer 4*long (64 bits) bits) • Typedefs • A class mapping the types and architectures  discuss in Architects Forum Status of LHCb applications on 64-bit architectures 21

  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. Status of LHCb applications on 64-bit architectures 22

  23. Status of LHCb applications on 64-bit architectures 23

Recommend


More recommend