Title: Software Integration
1Software Integration
- R.Rook
- Scientific Computing Group
2Contents
- How to distribute your application
- Post processing (open discussion)
- Porting
3Integrating your application
4Function 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
5Submitting 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
6MeshVector 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
7Using 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
8Post 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)
10Reconsideration D4
merging
11Porting
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
12CODESTAR 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.
13Ports 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
14Installing 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
156-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)
16Motivation
- 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
17Conclusions
- 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.
18Reentrant 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)
19Example non-reentrant
20Comparing results
- The order of execution is fixed.
- Input is unaffected by application.
- Is a single-threaded process.
21Automatic 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
22Why 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
23mh-tree
update functions
get functions
modules
ports
set functions
sav.C-tree
instances
modules
connections
ports
24A CODESTAR result
include MXMLParser.hxx include
MMaxwellSolver.hxx int main()
MXMLParser obj1 MMaxwellSolver obj2
obj1.setXML() obj2.setGeometry(obj1.getGeometr
y()) obj2.update()