1 / 18

Babel F2003 Wrap-up

Babel F2003 Wrap-up. Stefan Muszala*, Tom Epperly(LLNL), Nanbor Wang*. Funded by DOE (TASCS) Grant No DE-FC02-07ER25805, DOE Grant No DE-FG02-04ER84099 and Tech-X. FACETS+Babel Update. Stefan Muszala*, Scott Kruger*, Srinath Vadlamani*. Funded by DOE (TASCS) Grant No DE-FC02-07ER25805

raiden
Download Presentation

Babel F2003 Wrap-up

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Babel F2003 Wrap-up Stefan Muszala*, Tom Epperly(LLNL), Nanbor Wang* Funded by DOE (TASCS) Grant No DE-FC02-07ER25805, DOE Grant No DE-FG02-04ER84099 and Tech-X FACETS+Babel Update Stefan Muszala*, Scott Kruger*, Srinath Vadlamani* Funded by DOE (TASCS) Grant No DE-FC02-07ER25805 and Tech-X CCA Ecloud Intro Stefan Muszala*, Jim Amundson (FNAL), Paul Lebrun (FNAL), Lois Curfman McInnes (ANL) Boyana Norris (ANL), Peter Stoltz* DOE Grant No DE-FG02-08ER85152 * Tech-X

  2. Babel now has a functioning Fortran 2003 Bindingthat supports Structured Data Types. F03 F77 C F90 C++ Python Java

  3. Babel F2003 functionality supportsthe following SIDL struct definitions. struct Hard { array<double,1,row-major> d_array; } struct HardRarray { int d_int; rarray<double,1> d_rarrayRaw(d_int); rarray<double,1> d_rarrayFix(3); } struct Combined { Simple d_simple; Hard d_hard; } struct CombRarray { Simple d_simple; HardRarray d_hardRarray; } enum Color { red, blue, green } struct Empty { bool d_bool; } struct Simple { bool d_bool; char d_char; dcomplex d_dcomplex; double d_double; fcomplex d_fcomplex; float d_float; int d_int; long d_long; opaque d_opaque; Color d_enum; }

  4. Babel F2003 functionality supports the following SIDL function declarations. Type = {Empty,Simple,Hard,Combined} <Type> return<Type> (); bool passin<Type>(in <Type> s); bool passout<Type>(out <Type> s); bool passinout<Type>(inout <Type> s); <Type> passeverywhere<Type>(in <Type> s1, out <Type> s2, inout <Type> s3); TypeR = {HardRarray,CombRarray} bool passin<TypeR>(in <TypeR> s); bool passinout<TypeR>(inout <TypeR> s); bool passeverywhere<TypeR> (in <TypeR> s1, inout <TypeR> s2);

  5. The Babel F2003 binding generates trueFortran functions for scalar types (bool,int,long,float,double,fcomplex,dcomplex) • function s_StructTest_passinEmpty_mi(self, s, exception) • … • logical :: s_StructTest_passinEmpty_mi • ! out • … • s_StructTest_passinEmpty_mi=.true. • … • end function s_StructTest_passinEmpty_mi • complex (kind=sidl_dcomplex) :: func_checkReturn_retDcomplex_mi • ! Out • … • ! DO-NOT-DELETE splicer.begin(func.checkReturn.retDcomplex) • DcomplexVar=DcomplexVar*2.0 • DcomplexVar=conjg(DcomplexVar) • func_checkReturn_retDcomplex_mi=DcomplexVar

  6. Tying up loose ends for the F03 Binding(Outstanding issues) • Some regression tests breaking or failing on non-Tech-X build systems. • Failing on Jaguar • runC2C • runCxx2C • Broken on LLNL build box • runCxx2C • runCxx2Cxx • Adding Tech-X build to Gantlet results. • This is on hold until our new build system is online.

  7. Babel F2003 Wrap-up Stefan Muszala*, Tom Epperly(LLNL), Nanbor Wang* Funded by DOE (TASCS) Grant No DE-FC02-07ER25805, DOE Grant No DE-FG02-04ER84099 and Tech-X FACETS+Babel Update Stefan Muszala*, Scott Kruger*, Srinath Vadlamani* Funded by DOE (TASCS) Grant No DE-FC02-07ER25805 and Tech-X CCA Ecloud Intro Stefan Muszala*, Jim Amundson (FNAL), Paul Lebrun (FNAL), Lois Curfman McInnes (ANL) Boyana Norris (ANL), Peter Stoltz* DOE Grant No DE-FG02-08ER85152 * Tech-X

  8. FACETS-Integrated Fusion simulation (core, edge and wall). Tokamak: Produce Fusion Energy FACETS: Fusion Simulation, Wall to Core

  9. Babel is being used to integrate legacy Fortran codes into FACETS. • One of the driving forces for the F2003 Babel binding is the integration of legacy codes into the FACETS* project! • FACETS is a C++ framework that will call FORTRAN77, Fortran90/95, Fortran 2003, Python and C codes. • * FACETS-(Framework Application for Core-Edge Transport Simulations) is a SCIDAC project led by Tech-X which aims to integrate core, edge and wall fusion simulations.

  10. The current approach to C++/Fortran structured data type interoperability relies on pre-F2003 features.

  11. The Babel approach begins with a SIDL definition of existing Fortran derived types struct MmmFlags { int nroot; int npoints; int nprout; int lprint; int lsuper; int lreset; int nerr; int lswitch(8); rarray<double,1> cswitch(25); rarray<double,1> fig(4); rarray<double,1> frb(4); rarray<double,1> fkb(4); int UnitNum; } TYPE :: MmmFlags INTEGER :: nroot INTEGER :: npoints INTEGER :: nprout INTEGER :: lprint INTEGER :: lsuper INTEGER :: lreset INTEGER :: nerr INTEGER :: lswitch(8) REAL(kind=r8) :: cswitch(25) REAL(kind=r8) :: fig(4) REAL(kind=r8) :: frb(4) REAL(kind=r8) :: fkb(4) INTEGER :: UnitNum END TYPE MmmFlags

  12. The FACETS+Babel implementation simplifies the code structure and provides common interfaces.

  13. Recent work has involved refactoring FACETS Interfaces for increased usability • <model> ={Transport Type} = {Anomalous,Neoclassical,Gyrokinetic} • <Anomalous> = {GLF23,MMM95,TGLF*} • <Neoclassical>={NCLASS*,Kapisn*} • <Gyrokinetic> ={Gyro*} • Separating Fortran derived types into smaller units based on different transport types. • Calling structure basically remains the same as before. * currently under development

  14. Babel F2003 Wrap-up Stefan Muszala*, Tom Epperly(LLNL), Nanbor Wang* Funded by DOE (TASCS) Grant No DE-FC02-07ER25805, DOE Grant No DE-FG02-04ER84099 and Tech-X FACETS+Babel Update Stefan Muszala*, Scott Kruger*, Srinath Vadlamani* Funded by DOE (TASCS) Grant No DE-FC02-07ER25805 and Tech-X CCA Ecloud Intro Stefan Muszala*, Jim Amundson (FNAL), Paul Lebrun (FNAL), Lois Curfman McInnes (ANL) Boyana Norris (ANL), Peter Stoltz* DOE Grant No DE-FG02-08ER85152 * Tech-X

  15. CCA Ecloud is a new Tech-X project that models the Electron Cloud Effect (ECE) using CCA components. • Electrons bouncing off of beam walls causes the wall to emit more electrons through secondary emission and eventually build into a cloud. • The ECE is important to particle accelerator simulations since the cloud causes the proton beam to degrade.

  16. The CCA Ecloud applications are Synergia2 and POSINST/TxPhysics 1 2) Beam Dynamics (calculates x,y,z,v of simulated particles) 2 1 1) Electron Cloud Generation i. Number of secondary electrons produced in each impact. ii. Energy spectrum of those electrons.

  17. Prior Tech-X SBIR work with Synergia involved adding functionality: Python-based steering interface for Synergia operation. 2) Adding the functionality to merge diagnostics with steering. 3) Using items 1 and 2 to model an accelerator.

  18. Current work with Synergia involves modifying Synergia and TASCS collaboration. • Jim Amundson is refactoring the Synergia code base and providing a newly componentized model. • TASCS-COMPASS collaboration for providing • “high-performance components for accelerator modeling, with initial emphasis on particle tracking, beam optics, and solvers for space charge models.” • “selection and parameterization of accelerator components for CQoS work”

More Related