presentation - Purdue University :: Computer Science

Download Report

Transcript presentation - Purdue University :: Computer Science

Problem Solving Environements

WebPDELab
Online Problem Solving Environment for Partial
Differential Equations Applications: a Web Server for
the PELLPACK PSE

GasTurbnLab
Multidisciplinary Agent-based Problem Solving
Environment for the Distributed Network Simulation
of Gas Turbine Engines
PELLPACK
A Problem Solving Environment for PDE Applications



Sophisticated, comprehensive system for modeling physical
objects described by Partial Differential Equations
Used by hundreds of students and faculty at Purdue University,
nationally and internationally over the past decade
Applications include physics, liquid crystal droplets, proton flux
propagation, thermal field analysis, fluid dynamics,
semiconductors, geophysical research, electromagnetic field
analysis, thermo-elasticity, structural analysis, and many other
scientific and engineering areas
PELLPACK
The Layered
Structure
PELLPACK
The Complexity of System Installation
PELLPACK
Component
Programming
Languages
Lines
of Code
Size
Description
C, C++, Tcl/Tk,
Mac, Flex, Bison
172,000
non-static:
6.3MB
static: 22.3MB
programs for building,
executing & visualizing
PDE problems
Fortran, C,
custom parser
255,000
sequential: 3MB
parallel : 8MB
Language processing,
PELLPACK solvers,
“foreign” interfaces
Public Domain
& Copyrighted
Software
C, C++, Fortran,
Lisp, Mac
~1.5
million
System
Software
various
Graphical
User
Interface
Infrastructure
& Numerical
Libraries
Maxima,Cadsol,Fidisol,
Vecfem,Linpack,Pdecol,
Nsc2ke, Pdeone,Nspcg,
Sparskit, Geompack,
Qmg, mpi, pvm
X-Windows & OSF/Motif
libraries, Fortran/C
compilers, Tcl/Tk,
PERL, f2c
WebPDELab
Online PELLPACK Problem Solving Environment




Complete Internet-based support for sequential & parallel PDE
computing from any Java-enabled browser
Backed by 16 CPU Intel cluster connected through an Intel
Express510t switch with Intel Ether Express Pro 100NICs at
100MB
Users define, solve and analyze PDE problems supported by an
interactive GUI for problem definition & visualization, with full
access to the PELLPACK libraries of PDE solvers
Implemented using VNC remote display for the PELLPACK Xwindows programs compiled on an i86pc SunOS 5.6 machine
WebPDELab
Usage Statistics for Server Access
WebPDELab user acces by Month
(Dec1999-Aug2000)
120
102
100
86
# users
80
70
56
60
42
40
40
40
26
20
8
0
Dec
Jan
Feb
Mar
Apr
Month
May
Jun
Jul
Aug
WebPDELab
Server Security Wrapper
Two 16 CPU i86pc Clusters
Implementation of an Online PDE PSE
WebPDELab Manager
WebPDELab - VNC interface
VNC Server
PELLPACK Security Wrapper
PELLPACK
CGI
HTTP
Java
enabled
browser
VNC
viewer
USER
WebPDELab
The Network Scenario
User’s Web Browser
Start with user PDE Problem
Upload: geometry data
Interactively: define & solve problem
Download: solution & graphics files
secure
cross-network
sequential & parallel computing across the grid
WebPDELab
server
PDELab
GUI
File Upload
File Download
data file handler
on server machine
VNC
server
Intel cluster for sequential and
parallel program execution
Gas Turbine Engine Simulation
GasTurbnLab




Multi-disciplinary Problem Solving Environment
Geometric decomposition of target simulation object defines a
network of PDE problems
Specialized PDE solvers (legacy code) model the physics on each
geometric domain
Domain interfaces are handled by mediators
Goal: generalize framework & templates for an agentbased distributed network implementation of an MPSE
GasTurbnLab
The Network Scenario
Region Registry
Cross-network
ControlAgent : socket://128.10.8.55:7020/Agency1
LegacyAgent : socket://128.10.8.55:7020/Agency2
MediatorAgent: socket://128.10.8.55:7020/Agency3
Region
…
Agencies distributed across the Computational Grid
ControlAgent
at Agency1
Mediated
Data Object
LegacyAgent
at Agency8
Mobile
FileAgent
Mediated
Data Object
Mobile
FileAgent
Mediated
Data Object
MediatorAgent
at Agency3
LegacyAgent
at Agency2
GasTurbnLab
Simulation ControlAgent
LegacyAgent
LegacyAgent
LegacyAgent
LegacyAgent
LegacyAgent
LegacyAgent
MediatorAgent
MediatorAgent
MediatorAgent
MediatorAgent
MediatorAgent
Computational
Agents
DatabaseAgent
VisualizerAgent Iris Explorer Platform
ResourceAgent
Graphical
User
Interface
ModelingAgent
Service
Agents
Grasshopper Platform
The Agent-based Infrastructure
GasTurbnLab
Prototype Results from the VisualizerAgent
GasTurbnLab
Java Agent
Wrapper
Java-C data
transfer for
mediated data
C data
across JNI
interface
Fortran
Legacy
Code
Fortran --- C
I/O Transfer
Java
data
object
to/from
network
simulation
controller
C Wrapper
Framework for Implementing the LegacyAgent
Fortran-C data transfer
for mediated data
GasTurbnLab
Template for the Java Agent Wrapper
// TEMPLATE: Java Agent Wrapper for C-wrapped Legacy Code
public class LegacyAgent extends MobileAgent implements ILegacyAgent
{ int startup, ret, render;
SerialData sData;
// Load library containing legacy code, C wrapper, legacy-wrapper data interface
static { System.loadLibrary(“LegacyWrapper”); )
public native int LegacyWrapper(int startup, int render, <legacy specific parameters>);
// IO iteration Java-To-C interface
public SerialData requestConfirmation( int domain, SerialData sd, int Render,
<legacy specific parameters>) throws agentException
{ int startup=1; ret=1; Render=0;
// create Java data object at every IO iteration
ret=LegacyWrapper(startup,Render, <legacy specific parameters>); // call C wrapper
if (startup > 1) { copyData (sd); }
dp {} while (ret==1); startup++;
}
public void CopyData( SerialData sd) { <legacy code specific>}
}
// C data -> Java object
GasTurbnLab
C Wrapper Template for the Legacy Code
// TEMPLATE: C Wrapper for Legacy Code
struct {int wrapperSleep; int legacySleep; }
struct { <legacy code specific>}
static void CopyData(jenv, this, start, type, render)
{ <legacy code specific>}
// execution control
// legacy mediator data
// C struct to Java object at return to agent
// Java object to C struct on return from agent
JNIEXPORT jint JNICALL Java_LegacyAgent_LegacyWrapper
(JNIEnv *env, jobject this, jint startup, jint render, <legacy code specific>) {}}}
int i, ret;
thread_t thr;
if (startup == 1) {
{
if ( ret == thr_create( NULL, 0, thread, NULL, THR_DETACHED, &thr)) != 0)
exit(1);
} else { CopyData(jenv, this JavaToC ); }
control.wrapperSleep=1; control.legacySleep=0;
while (control.wrapperSleep) (sleep(1));
CopyData (jenv, this, startup, CToJava, render);
return(0);
}
// start legacy thread
// copy mediated data from Java to C
// wrapper sleeps while legacy code executes
// copy mediated data from C to Java and
// return to agent
GasTurbnLab
Template for the Data Transfer: Fortran
C
// TEMPLATE: C code for transfer of I/O data from Fortran to C
extern struct {int wrapperSleep; int legacySleep; }
extern struct { <legacy code specific>}
// execution control
// legacy mediator data
/* called from inside Fortran legacy code at I/O iteration location
where mediated data is needed */
void legacyDataIO (<legacy code specific>)
{
// copy Fortran data to C struct
control.legacySleep=1; control.wrapperSleep=0; // wake wrapper and
while (control.legacySleep) {sleep(1) }
// resume at return from agent
CopyC2Fortran (<legacy code specific>);
// copy C struct to Fortran
CopyFortran2C (<legacy code specific>);
}
GasTurbnLab
Template for Legacy Code Modifications
From a Fortran executable…




The Fortran “main” is changed to a subroutine with arguments
passed as parameters
This subroutine is started as a “thread” from the C wrapper
A call to the I/O data transfer routine is inserted into the Fortran
iteration loop
The Fortran code, C routine for I/O transfer, and the C wrapper
are compiled together as a library & loaded into the Java agent
To a C-wrapped Legacy Code Library
GasTurbnLab
Agents and the MPSE Simulation



Completed: AleAgent for simulating rotor and stator
domains, KivaAgent for simulating combustor domain
& two MediatorAgents for interface data interpolation
of rotor-stator and stator-combustor
Completed: SCA to control total simulation process for
any number and type of domains & VisualizerAgent to
view intermediate and final results
Verified: mediated stator-rotor simulation, mediated
stator-combustor simulation