Software Integration - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

Software Integration

Description:

CODESTAR 2003. Meeting - Ghent - 24/04/2003. Software Integration. R.Rook ... gmake building system with mandatory targets all, install, check and clean ... – PowerPoint PPT presentation

Number of Views:70
Avg rating:3.0/5.0
Slides: 25
Provided by: MAE87
Category:

less

Transcript and Presenter's Notes

Title: Software Integration


1
Software Integration
  • R.Rook
  • Scientific Computing Group

2
Contents
  • How to distribute your application
  • Post processing (open discussion)
  • Porting

3
Integrating your application
4
Function supplied by contributor
solver.h
namespace tue int solver(const API_in ,
API_out )
solver.cc
include solver.h namespace tue int
solver(const API_in in, API_out out)
--do your app-thing here-- return 0 // Ok

5
Submitting a distribution
  • gmake building system with mandatory targets all,
    install, check and clean
  • No testing from stdin
  • Use relative paths ../lib etc.
  • Or just follow the GNU coding standards on
    Makefiles
  • (recommended) use the GNU autotools packages
  • gcc3.2.x compiler

6
MeshVector API
  • for storing solutions in VTK format, 3 different
    ways
  • file names (slow)
  • ASCII strings (one step from)
  • vtkDataSet or vtkDataSetCollection(API needs
    VTK4.n)
  • D4 is not specific about it

7
Using vtkDataSet API
  • extra 1) VTK4.n headers should be included and
    2) libraries linked when executed
  • always conversion from own data structure to vtk
    data structure (D4)
  • download vtk4.0 (current release 4.2 not tested)
  • http//www.vtk.org/files/release/4.0/vtk40Src.tar.
    gz

8
Post processing
  • vtk4.n (gcc3.2.x support)
  • data to be processed
  • needing creative ideas

Magnetic induction B (scalar at 6 cell
faces) Average magnetic induction B_av
(vector) Electric field E (scalar at each
link) Average electric field E_av
(vector) Current density J (scalar at each
link) Electric energy density U_elec
(scalar) Magnetic energy density U_magn
(scalar) Recombination rate recom (scalar at each
vertex) Generation rate generation (scalar at
each vertex) Electron mobility in semiconductors
mu_elec (scalar at each link) Hole mobility in
semiconductors mu_hole (scalar at each link)
9
(No Transcript)
10
Reconsideration D4
merging
11
Porting
Software comes with as many flavors as there are
contributors. What is relevant for CODESTAR or
what is to be installed and where?
  • CODESTAR file structure
  • original distribution
  • 6-step install sequence

12
CODESTAR file system
Structure is just like a Linux file system
/bin /doc /lib /include /ports
where is the path to the CODESTAR home
directory. All important binaries,
documentation, libraries and header files
are installed in these directories. Easy
accessible for the developer.
13
Ports collection
/ports/Makefile /ports/Mk/ /ports/distfiles/ /
ports/imec/xml/ /ports/tue/fdtda/ ...
/ports/tue/fdtda/Makefile /ports/tue/fdtda/files
/ /ports/tue/fdtda/work/
SUBDIR imec SUBDIR tue SUBDIR rug SUBDIR
lmn SUBDIR philips SUBDIR ams include
./Mk/codestar.port.subdir.mk
PORTNAME fdtda PORTVERSION
2.0 include ../../Mk/codestar.port.mk
14
Installing port
  • Place distribution (.tar.gz) in the
    /ports/distfiles/ directory
  • Change to the ports (sub)directory
  • gmake install for installing the package(s)
  • gmake clean for removing all intermediate files
  • gmake deinstall for uninstalling packages

15
6-step installation process
gmake install
  • fetching from medium (ftp, not implemented)
  • extracting from distribution file
  • patching (should be avoided!)
  • configuring (dependence platform)
  • building (compiling and linking)
  • installing (CODESTAR file structure)

16
Motivation
  • GNU autotools (libtool, automake, autoconf) is a
    platform independent way of building
    programshttp//www.gnu.org
  • Autotools are not a package system it cannot
    remove all created files
  • a package should be portedhttp//www.freebsd.org

17
Conclusions
  • All packages are installed from original
    distribution files
  • A contributor of applications supplies callback
    functions using CODESTAR APIs
  • Next step is to visualize data using VTK (still
    needs ideas)
  • Three ways of passing vtk data structures files,
    ASCII or vtkDataSet.

18
Reentrant function
  • A function does not keep static data over
    successive calls,
  • nor does it return pointers of static variables.
  • It should not call non-reentrant functions (this
    is the responsibility of the contributor of the
    applications and APIs).
  • (Thread-safe and parallel programming)

19
Example non-reentrant
20
Comparing results
  • The order of execution is fixed.
  • Input is unaffected by application.
  • Is a single-threaded process.

21
Automatic code generation
  • Building network using Numlab and
  • generate C code for stand-alone
  • programs (parser demo).
  • reading a vtk ASCII file
  • filtering data
  • rendering a plot

22
Why is it necessary
  • Numlab
  • stores networks in sav.C files
  • stores information on methods in modules in
    multiple (nested) mh files
  • all information should be gathered and stored in
    an easy accessible way

23
mh-tree
update functions
get functions
modules
ports
set functions
sav.C-tree
instances
modules
connections
ports
24
A CODESTAR result
include MXMLParser.hxx include
MMaxwellSolver.hxx int main()
MXMLParser obj1 MMaxwellSolver obj2
obj1.setXML() obj2.setGeometry(obj1.getGeometr
y()) obj2.update()
Write a Comment
User Comments (0)
About PowerShow.com