Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— 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 Binding that supports Structured Data Types. C C++ F77 F90 Python Java F03

3 Babel F2003 functionality supports the following SIDL struct definitions. 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; } struct Hard { array d_array; } struct HardRarray { int d_int; rarray d_rarrayRaw(d_int); rarray d_rarrayFix(3); } struct Combined { Simple d_simple; Hard d_hard; } struct CombRarray { Simple d_simple; HardRarray d_hardRarray; }

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

5 The Babel F2003 binding generates true Fortran 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 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 Stefan Muszala*, Scott Kruger*, Srinath Vadlamani*

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 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 struct MmmFlags { int nroot; int npoints; int nprout; int lprint; int lsuper; int lreset; int nerr; int lswitch(8); rarray cswitch(25); rarray fig(4); rarray frb(4); rarray fkb(4); int UnitNum; }

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

13 Recent work has involved refactoring FACETS Interfaces for increased usability ={Transport Type} = {Anomalous,Neoclassical,Gyrokinetic} – = {GLF23,MMM95,TGLF*} – ={NCLASS*,Kapisn*} – ={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 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 Stefan Muszala*, Scott Kruger*, Srinath Vadlamani*

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) Electron Cloud Generation i. Number of secondary electrons produced in each impact. ii. Energy spectrum of those electrons. 2) Beam Dynamics (calculates x,y,z,v of simulated particles) 2 1 1

17 Prior Tech-X SBIR work with Synergia involved adding functionality: 1)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. 1)Jim Amundson is refactoring the Synergia code base and providing a newly componentized model. 2)TASCS-COMPASS collaboration for providing 1) “high-performance components for accelerator modeling, with initial emphasis on particle tracking, beam optics, and solvers for space charge models.” 2) “selection and parameterization of accelerator components for CQoS work”


Download ppt "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."

Similar presentations


Ads by Google