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
PELLPACKA 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
PELLPACKThe Layered
Structure
PELLPACK The Complexity of System Installation
X-Windows & OSF/Motif libraries,
Fortran/C compilers, Tcl/Tk, PERL, f2c
variousSystem Software
Maxima,Cadsol,Fidisol, Vecfem,Linpack,Pdecol,Nsc2ke, Pdeone,Nspcg,
Sparskit, Geompack, Qmg, mpi, pvm
~1.5million
C, C++, Fortran, Lisp, Mac
Public Domain & Copyrighted
Software
Language processing, PELLPACK solvers,
“foreign” interfaces
sequential: 3MBparallel : 8MB
255,000Fortran, C, custom parser
Infrastructure
& Numerical Libraries
programs for building, executing & visualizing
PDE problems
non-static: 6.3MB
static: 22.3MB
172,000C, C++, Tcl/Tk, Mac, Flex,
Bison
Graphical User
Interface
DescriptionSizeLines of Code
Programming Languages
PELLPACKComponent
WebPDELabOnline 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 X-windows programs compiled on an i86pc SunOS 5.6 machine
WebPDELab Usage Statistics for Server Access
WebPDELab user acces by Month (Dec1999-Aug2000)
8
40
102
26
86
42
56
70
40
0
20
40
60
80
100
120
Dec Jan Feb Mar Apr May Jun Jul Aug
Month
# u
se
rs
WebPDELab Implementation of an Online PDE PSE
PELLPACK
PELLPACK Security Wrapper
VNC Server
WebPDELab Manager
WebPDELab - VNC interface
USER
VNCviewer
Javaenabledbrowser
HTTP
CGI
Tw
o 1
6 C
PU
i8
6p
c C
lust
ers
Serv
er
Secu
rity
Wra
pp
er
WebPDELab The Network Scenario
Start with user PDE Problem Upload: geometry dataInteractively: define & solve problemDownload: solution & graphics files
User’s Web Browser
data file handleron server machine
PDELab GUI
sequential & parallel computing across the grid
File Download
VNC server
WebPDELab
server
Intel cluster for sequential and parallel program
execution
securecross-network
File Upload
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 agent-based distributed network implementation
of an MPSE
GasTurbnLabThe Network Scenario
Region RegistryControlAgent : socket://128.10.8.55:7020/Agency1LegacyAgent : socket://128.10.8.55:7020/Agency2MediatorAgent: socket://128.10.8.55:7020/Agency3
…
Region
ControlAgent at Agency1
LegacyAgentat Agency8 LegacyAgent
at Agency2
MediatorAgent at Agency3
Agencies distributed across the Computational Grid
MobileFileAgent
MediatedData Object
MobileFileAgent
MediatedData Object
MediatedData Object
Cross-network
GasTurbnLabThe Agent-based Infrastructure
Gra
sshopp
er
Pla
tformModelingAgent
Simulation ControlAgent
LegacyAgentLegacyAgentLegacyAgentLegacyAgentLegacyAgent
MediatorAgentMediatorAgentMediatorAgentMediatorAgentMediatorAgent
LegacyAgent
VisualizerAgentIris Explorer Platform
Reso
urc
eA
gent
Data
base
Agent
GraphicalUser
Interface
Computational Agents
Service Agents
GasTurbnLabPrototype Results from the VisualizerAgent
GasTurbnLabFramework for Implementing the LegacyAgent
Javadata objectto/fromnetworksimulatio
ncontrolle
r
C dataJava AgentWrapper
C
Wra
pp
er
FortranLegacyCode
Fort
ran
---
C
I/O
Tra
nsf
er
across JNIinterface
Fortran-C data transfer
for mediated data
Java-C data transfer for
mediated data
GasTurbnLabTemplate 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;
if (startup > 1) { copyData (sd); } // create Java data object at every IO iteration
ret=LegacyWrapper(startup,Render, <legacy specific parameters>); // call C wrapper dp {} while (ret==1); startup++; }
public void CopyData( SerialData sd) { <legacy code specific>} // C data -> Java object}
GasTurbnLabC Wrapper Template for the Legacy Code
// TEMPLATE: C Wrapper for Legacy Code
struct {int wrapperSleep; int legacySleep; } // execution control
struct { <legacy code specific>} // legacy mediator datastatic void CopyData(jenv, this, start, type, render) // C struct to Java object at return to agent{ <legacy code specific>} // 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) // start legacy thread exit(1);
} else { CopyData(jenv, this JavaToC ); } // copy mediated data from Java to C
control.wrapperSleep=1; control.legacySleep=0; // wrapper sleeps while legacy code executes while (control.wrapperSleep) (sleep(1));
CopyData (jenv, this, startup, CToJava, render); // copy mediated data from C to Java and
return(0); // return to agent }
// TEMPLATE: C code for transfer of I/O data from Fortran to C
extern struct {int wrapperSleep; int legacySleep; } // execution control
extern struct { <legacy code specific>} // legacy mediator data
/* called from inside Fortran legacy code at I/O iteration location where mediated data is needed */void legacyDataIO (<legacy code specific>){
CopyFortran2C (<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}
GasTurbnLabTemplate for the Data Transfer: Fortran C
GasTurbnLabTemplate 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
GasTurbnLabAgents 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