Title: MATLAB AND PARALLEL MATLABS CSCI585 Dr. Sameh
 1MATLAB ANDPARALLEL MATLABSCSCI585Dr. 
Sameh 
 2WHAT IS MATLAB
- MATLAB is a high-performance language for 
 technical computing.
- It integrates computation, visualization, and 
 programming in an easy-to-use environment where
 problems and solutions are expressed in familiar
 mathematical notation.
3Typical uses include
- Math and computation 
- Algorithm development 
- Modeling, simulation, and prototyping 
- Data analysis, exploration, and visualization 
- Scientific and engineering graphics 
- Application development, including graphical user 
 interface building
4The MATLAB system consists of five main parts
- Development Environment. 
-  This is the set of tools and facilities that 
 help you use MATLAB functions and files. Many of
 these tools are graphical user interfaces. It
 includes the MATLAB desktop and Command Window, a
 command history,and browsers for viewing help,
 the workspace, files, and the search path.
5Enter MATLAB functions.
Expand to view documentation, demos, and tools 
for your products.
View or change current directory.
Click to move window outside of desktop.
Close window
Get help
View or use previously run functions.
Use tabs to go to Workspace browser or Current 
Directory browser.
Drag the separator bar to resize windows. 
 6- The MATLAB Mathematical Function Library. 
-  This is a vast collection of computational 
 algorithms ranging from elementary functions like
 sum, sine, cosine, and complex arithmetic, to
 more sophisticated functions like matrix inverse,
 matrix eigenvalues, Bessel functions, and fast
 Fourier transforms.
7- The MATLAB Language. 
-  This is a high-level matrix/array language 
 with control flow statements, functions, data
 structures, input/output, and object-oriented
 programming features..
8Examples
- Variables declaration 
-  num_students  25 
- Numbers 
-  3 -99 0.0001 
 9.6397238 1.60210e-20
-  6.02252e23 1i -3.14159j 3e5i 
- Operators  
-  Addition 
- - Subtraction 
-  Multiplication 
- / Division 
- \ Left division (described in 
 MatricesAlgebra in Using MATLAB)
-  Power 
- ' Complex conjugate transpose 
- ( ) Specify evaluation order
9Examples Continue
- Functions 
- MATLAB provides a large number of standard 
 elementary mathematical
- functions, including abs, sqrt, exp, and sin. 
- Several special functions provide values of 
 useful constants.
- pi 3.14159265 
- i Imaginary unit, Ö-1 
- j Same as i 
- eps Floating-point relative 
 precision, 2-52
- realmin Smallest floating-point number, 
 2-1022
- realmax Largest floating-point number, 
 (2-e)21023
- Inf Infinity 
- NaN Not-a-number
10Examples Continue
- rho  (1sqrt(5))/2 
- rho  
- 1.6180 
- a  abs(34i) 
- a  
- 5 
- z  sqrt(besselk(4/3,rho-i)) 
- z  
- 0.3730 0.3214i 
- huge  exp(log(realmax)) 
- huge  
- 1.7977e308 
- toobig  pihuge 
- toobig  
- Inf 
- 0pi/4pi  
- 0 0.7854 
 1.5708 2.3562
 3.1416
11Examples Continue
- Working with Matrices 
- MATLAB provides four functions that generate 
 basic matrices.
- zeros All zeros 
- ones All ones 
- rand Uniformly distributed random elements 
- Randn Normally distributed random elements 
- Z  zeros(2,4) 
- Z  
- 0 0 0 0 
- 0 0 0 0 
- F  5ones(3,3) 
- F  
- 5 5 5 
- 5 5 5 
- 5 5 5 
- N  fix(10rand(1,10)) 
- N  
- 4 9 4 4 8 5 2 6 8 0
12- Handle Graphics. 
-  This is the MATLAB graphics system. It 
 includes high-level commands for two-dimensional
 and three-dimensional data visualization, image
 processing, animation, and presentation graphics.
 It also includes low-level commands that allow
 you to fully customize the appearance of graphics
 as well as to build complete graphical user
 interfaces on your MATLAB applications.
13Example of Handle Graphics
- x  0pi/1002pi 
- y  sin(x) 
- plot(x,y) 
- xlabel('x  02\pi') 
- ylabel('Sine of x') 
- title('Plot of the Sine Function','FontSize',12) 
14- The MATLAB Application Program Interface (API). 
-  This is a library that allows you to write C 
 and Fortran programs that interact with MATLAB.
 It include facilities for calling routines from
 MATLAB (dynamic linking), calling MATLAB as a
 computational engine, and for reading and writing
 MAT-files.
15Example of .M file
- function r  rank(A, tol) 
-  RANK Matrix rank. 
-  RANK(A) provides an estimate of the number of 
 linearly
-  independent rows or columns of a matrix A. 
-  RANK(A,tol) is the number of singular values of 
 A
-  that are larger than tol. 
-  RANK(A) uses the default tol  max(size(A))  
 norm(A)  eps.
- s  svd(A) 
- if nargin1 
- tol  max(size(A)')  max(s)  eps 
- end 
- r  sum(s gt tol) 
-  
- The first line of a function M-file starts with 
 the keyword function. It gives the
- function name and order of arguments. In this 
 case, there are up to two input
- arguments and one output argument. 
16PARALLEL MATLABS 
 17First Parallel Matlab- Intel iPSC
- It had up to 128 nodeseach a separate single 
 board computer with an Intel microprocessor and
 maybe half a megabyte of memory.
-  In principle, 
-  each node could execute a different program. 
- Each node could send messages directly to its 
 nearest neighbors
- Each node could send messages indirectly to all 
 the other nodes.
- The whole machine was controlled by a front-end 
 host, which initiated tasks, collected results,
 and handled all I/O.
18NOW, there are mainly 4 approaches to providing 
parallel functionalities to Matlab 
- Provide communication routines (MPI/PVM) in 
 Matlab.
- Provide routines to split up work among multiple 
 Matlab sessions.
- Provide parallel backend to Matlab. 
- Compile Matlab scripts into native parallel code. 
 Translate Matlab scripts into C code, then
 compile and link with parallel numerical
 libraries.
19Parallel Matlabs Information
-  Message Passing 
- MultiMATLAB 
- Cornell Multitasking Toolbox for Matlab 
- DP-Toolbox 
- MPITB/PVMTB 
- MATmarks 
- Parallel Toolbox for MATLAB 
- MatlabMPI 
- Note Requires Multiple Matlab Clients.
20- Embarrassingly Parallel 
- MULTI Toolbox 
- Paralize 
- PMI 
- PLab 
- Parmatlab 
- MATLAB Parallelization Toolkit 
- DistributePP 
- Note Requires Multiple Matlab Clients. 
21- Backend Support 
- Netsolve 
- DLab 
- Matpar 
- PLAPACK 
- Paramat 
- MATLABP 
- Note Requires only one Matlab Clients. Data is 
 passed back and forth from MATLAB to the backend
 server. This approach uses MATLAB as a front-end
 all parallel computations are done elsewhere.
22- Compilation 
- Otter 
- TExpress 
- ParAL 
- FALCON 
- CONLAB Compiler 
- MATCH 
- Menhir 
- Note Requires only one or zero Matlab Clients. 
 Translate Matlab scripts into high level code (c,
 fortron ), then compile and link with parallel
 numerical libraries.
23- MultiMATLABhttp//www.cs.cornell.edu/Info/People/
 lnt/multimatlab.htmlStatus dormant Matlab
 sessions required multiple Platform UNIX
- "Using short, MATLAB-style commands like Eval, 
 Send, Recv, Bcast, Min, and Sum, the user
 operating within one MATLAB session can start
 MATLAB processes on other machines and then pass
 commands and data between between these various
 processes ..."
- Cornell Multitasking Toolbox for Matlab 
 http//www.tc.cornell.edu/Services/Software/CMTM/
 Status active Matlab sessions required
 multiple Platform UNIX, Windows
- enables MPI calls inside Matlab 
- included in the Microsoft parallel programming 
 software developer toolkit
24- Distributed and Parallel Application Toolbox 
 (DP-Toolbox) http//www-at.e-technik.uni-rostock.
 de/dp/ Status active Matlab sessions required
 multiple Platform UNIX, Windows
- PVM-based 
- similar to CMTM 
- available on both UNIX and Windows 
- active 
- MPI/PVM Toolbox for Matlab (MPITB/PVMTB) 
 http//atc.ugr.es/javier-bin/mpitb_enghttp//atc
 .ugr.es/javier-bin/pvmtb_engStatus seems active
 Matlab sessions required multiple Platform
 UNIX
- similar to CMTM 
- source not yet available 
25- MATmarkshttp//polaris.cs.uiuc.edu/matmarks/Stat
 us seems active Matlab sessions required
 multiplePlatform currently unavailable because
 of licensing problem
- "MATmarks is an environment that allows users to 
 run several MATLAB programs in parallel using
 the shared memory programming style. The
 environment extends the Matlab language with
 several primitives to enable shared variables and
 synchronization primitives. "
- Parallel Toolbox for MATLAB Web page unknown 
 Status dormant Matlab sessions required
 multiple Platform unknown
- This is a project found cited by several parallel 
 MATLAB papers. However the webpage has been
 scrapped. We are trying to contact the authors to
 obtain more information about the project.
26- MatlabMPIhttp//arXiv.org/abs/astro-ph/0107406 
 Status active Matlab sessions required
 multiple Platform various
- Simulate MPI in MATLAB using a common file system 
 
- pure m-file 
27Embarrassingly Parallel 
- MULTI Toolbox http//shay.ecn.purdue.edu/postal/
 commsim.htmlStatus seems dormant Matlab
 sessions required multiple Platform UNIX
- "Multi is a set of tools for starting MATLAB 
 processes on remote machines, managing a list of
 processes, executing MATLAB statements in a
 non-blocking fashion on those remote machines,
 and passing MATLAB arrays back and forth"
- pure m-files 
- Paralize ftp//ftp.mathworks.com/pub/contrib/v5/t
 ools/paralize/paralize.htmlStatus unknown
 Matlab sessions required multiple Platform
 unknown
- "Parallelization function for the heterogeneous 
 computer network with a common file system"
- takes a 3D matrix, splits up the 3rd dimension 
 and hand off to different Matlab processes
- makes use of a common file system for 
 communication
28- PMI ftp//ftp.mathworks.com/pub/contrib/v5/tools/
 PMIStatus unknown Matlab sessions required
 multiple Platform unknown
- similar to MULTI 
- no info about status 
- requires multiple Matlab client 
- PLab http//bond.imm.dtu.dk/plab/Status seems 
 activeMatlab sessions required
 multiplePlatform UNIX
- simple parallelization approach (without much 
 coordination), similar to MULTI
- can do for loop parallelization 
29- Parmatlab ftp//ftp.mathworks.com/pub/contrib/v5/
 tools/parmatlab/ Status active Matlab sessions
 required multiple Platform UNIX, windows
- "This toolbox distributes processes over matlab 
 workers available over the intranet/internet.
 These workers must be running a matlab daemon to
 be accessed. "
- TCP/IP based communication 
- Matlab Parallelization Toolkit http//hem.passage
 n.se/einar_heiberg/index.html Status active
 Matlab sessions required multiple Platform
 UNIX
- "Several high level commands are available such 
 as parallelized for-loops, eval, profiler and
 debugging"
- based on PMI (above) 
30- DistributePP http//www.essrl.wustl.edu/mdd2/Dis
 tributePP/ Status active Matlab sessions
 required multiple Platform UNIX
- "DistributePP is a parallel processing package 
 for MATLAB which is intended to support coarse
 granularity parallelism across a heterogeneous
 computing network with access to a shared file
 system. "
- "At this time, the routine to be executed by a 
 server process must return exactly one return
 value or an error will result"
31Backend Support 
- Netsolve http//www.cs.utk.edu/netsolve/Status 
 activeMatlab sessions required one Platform
 UNIX, Windows
- similar to MATLABP 
- RPC-based 
- interface available for C, f77, Java, Matlab 
- generates more data traffic than MATLABP since 
 matrices are stored locally
- Matparhttp//www-hpc.jpl.nasa.gov/PS/MATPAR/Stat
 us active Matlab sessions required 1Platform
 some UNIX flavors
- similar to MATLABP 
- requires learning a set of functions e.g. p_qr() 
 instead of qr()
- PVM based 
32- DLab http//www.cse.uiuc.edu/radenska/dlab/state
 ment.ps Status dormant Matlab sessions
 required one Platform UNIX
- similar to MATLABP 
- transparent like MATLABP 
- client-server based like MATLABP 
- provide internal scheduling mechanism 
- multi-user support 
- lazy evaluation - i.e. non-blocking server side 
 eval
- client-side matrices, more data traffic than 
 MATLABP
- only ScaLAPACK available on backend. less 
 extensible than MATLABP.
- PLAPACKhttp//www.cs.utexas.edu/users/plapack/St
 atus activeMatlab sessions required one
 Platform UNIX
- mainly a parallel numerical package, but provides 
 interface to Matlab
- claims better than ScaLAPACK performance 
- similar to Matpar 
33- Paramat http//www.alphadata.co.uk/dsheet/paramat
 .htmlStatus seems dormantMatlab sessions
 required onePlatform NT for alpha
- not too much details given, but seems to provide 
 functions for the parallel processing
- therefore not transparent 
- commercial 
- MATLABP / PPServer http//supertech.lcs.mit.edu/
 cly/matlabp.htmlStatus activeMatlab sessions
 required onePlatform UNIX
- matrices stored on server to reduce data traffic 
- makes use of overloading so existing serial 
 scripts can be parallelized with minimal effort
- easily extensible via packages - so far 
 ScaLAPACK, PARPACK, Aztec, S3L, PetSc has been
 ported
- being actively worked on 
- Runs on Beowulf 
- Supports embarrassingly parallel operations (if 
 multiple MATLABs are available)
- Supports MPI through MatlabMPI 
34Compilation 
- Otterhttp//www.cs.orst.edu/quinn/papers/hpdc7.p
 sStatus seems dormantMatlab sessions required
 onePlatform UNIX
- compiled approach 
- translate Matlab scripts into C code, then 
 compile and link with parallel numerical
 libraries.
- RTExpresshttp//www.rtexpress.com/Status 
 activeMatlab sessions required onePlatform
 Mercury hardware (PPC), CSPI, SPARC, Linux x86
- similar to Otter 
- commercial 
- compiles code for embedded systems 
- thanks to Rob Ostrander for the information 
35- ParALhttp//www.sedal.usyd.edu.au/igor/paral/St
 atus seems dormantMatlab sessions required one
 Platform BLACS based
- similar to Otter 
- BLACS based 
- limited functionality, need high level (i.e. 
 vectorized) Matlab scripts
- FALCONhttp//www.csrd.uiuc.edu/falcon/falcon.html
 Status seems dormant Matlab sessions required
 one Platform F90 based
- basically a Matlab to F90 translator with 
 parallelization directives
- suggest that it only works on SMP system (?) 
36- CONLAB Compiler http//www.cs.umu.se/research/con
 lab/Status seems active Matlab sessions
 required one Platform some flavors of UNIX,
 PVM based
- The compiler translates its input files into 
 C-language files to which it applies a suitable C
 compiler. In order to achieve high performance
 the computational kernels of executable code are
 built on level 1-2-3 BLAS (Basic Linear Algebra
 Subprograms) and LAPACK (Linerar Algebra
 Package). Communication via explicit message
 passing is performed by PVM
- MATCHhttp//www.accelchip.com Status active 
 Matlab sessions required one Platform DSP
- Originally a project funded by DARPA at NWU, now 
 a product of a startup.
- Compilers that take MATLAB and Simulink code and 
 generates RTL VHDL and Verilog code that maps
 into FPGA, QuickDSP, or ASIC devices.
37- Menhirhttp//www.irisa.fr/caps/PROJECTS/Menhir/me
 nhir/orap/ (in French) Status unknown Matlab
 sessions required one Platform unknown
- This is a widely cited MATLAB compiler. However 
 we failed to locate the project webpage, and we
 are trying to decipher the above webpage (which
 appears to be a talk on Menhir in French)
38Difficulties
- Memory model 
- There are no declarations or allocationsit is 
 all handled automatically.
- The key question is Where are the matrices 
 stored? It is still true today that any matrix
 that fits into the host memory should probably
 stay there.
- Granularity 
- MATLAB should run on only one other processors, 
 while other tasks, like X  Windows server, use
 the other processor. In typical use, MATLAB
 spends only a small portion of its time in
 routines that can be parallelized, like the ones
 in the math library. It spends much more time in
 places like the parser, the interpreter, and the
 graphics routines, where any parallelism is
 difficult to find.
39- Business situation 
- It doesnt make good business sense for us to 
 undertake fundamental changes in MATLABs
 architecture. There are not enough potential
 customers with parallel machines.
40MATLAB-MPI Performance Result
Speedup Parallel Speedup. Speed increase on the 
SGI Origin2000 of a parallel image altering 
application as a function of the number of 
processors.  Reference Parallel Programming 
with MatlabMPI, Jeremy Kepner (kepner_at_ll.mit.edu) 
MIT Lincoln Laboratory, December 11, 2001. 
 41Demos for mpimatlab
- function demoplowlevel 
- DEMOPLOWLEVEL Demo of low level communication 
 using MPI toolkit.
- M 
- Einar Heiberg 
- Run and display the file in a nicer way. 
- demophelper(which(mfilename)) 
- return 
- Start 
- ------------------------------------------------ 
- This demo contains some examples on low level 
- communication between one master matlab process 
- and matlab slaves 
- ------------------------------------------------ 
- Pause 
- Start two process on current machine 
42- Evaluate command on slave 1. 
- status is 0 if ok 
- res is the result of the operation 
- slave  1 which slave to communicate with 
- status,res  MPI_Eval(slave,'pwd') 
- Pause 
- Transfer variables to and from slaves. 
- x  12 on master 
- ok  MPI_Send(1,'x') 
- x  14 on master node 
- x  MPI_Recv(1,'x') 
- Pause 
- More advanced example force the slaves to be at 
 the same directory as the master
- More advanced example force the slavesto be at 
 the same directory as the master This is often
 useful to do everytime you start up your
 processes.
- Build string to send 
- stri  sprintf('cd s',pwd) 
43Commands
-  High level routines. 
-  pconfig - Reads configuration file 
-  pdebug - Enable/Disable debug info. 
-  peval - Parallel eval 
-  pfor - Parallel implementation of 
 for-loops.
-  pprofile - Parallel performance 
 profiler.
-  pstatus - Status of machines. 
-  pwhos - Whos on remote slave. 
-  makeMPI - Function to compile all .c 
 files.
-  Job managment. 
-  batchjob - Start batchjob(s) at specified 
 time(s).
44- Matlab Parallel Interface functions 
-  MPI_Data - Storage for current MPI 
 slaves.
-  MPI_Init - Start parallel Matlab 
 processes.
-  MPI_Finalize - Close parallel Matlab 
 processes.
-  
-  MPI_Size - Returns number of active 
 processes.
-  
-  MPI_Send - Send matrices to specific 
 process.
-  MPI_Recv - Receive matrices from 
 specific process.
-  MPI_Bcast - Broadcast matrices to all 
 processes.
-  
-  MPI_Eval - Execute string on a remote 
 process.
-  MPI_IEval - Non-blocking call on a 
 remote process.
-  MPI_BEval - Broadcast non-blocking call 
 to all slaves.
-  
-  MPI_Scatter - Split matrix and send to 
 remote slaves.
-  MPI_Gather - Get matrices from processes 
 and concatenate.
-  MPI_Reduce - Combine matrix from 
 different slaves with op.
45-  Low-level MEX engine routines, that the MPI 
 functions uses.
-  engOpen - Start a Matlab engine 
 session (slaves).
-  engClose - Quit a Matlab engine session 
 (slaves).
-  engGetArray - Copy var. from a Matlab 
 slaves workspace.
-  engPutArray - Put var. into a Matlab 
 slaves workspace.
-  engEvalString - Evaluate expression in 
 string.
-  engIEvalString - Non-blocking evaluation of 
 string.
- Note This parallel matlab was installed in 
 reconfig cluster. If you would like to use, you
 should add the path of the installed directory
 while matlab session or create startup.m file in
 your home directory.
46MATLABP
- The structure of system uses a client-server 
 architecture.
47- SERVER 
- The server is responsible for storing and 
 managing the data, maintaining the packages, and
 making calls to the packages to perform the
 actual computations. The server is a distributed
 application, meaning a copy of the server resides
 on each node of the parallel computer.
 Coordination between the copies is through MPI
- CLIENT 
- The client is responsible for communication 
 between MATLAB and the server. The client consist
 of MATLAB scripts which defines a new matrix
 class for the server matrices, and a C program
 using the MEX interface which is responsible for
 packing and unpacking messages to and from the
 server. The client communication with the server
 through TCP socket.
- Packages 
- Packages are where the actual computations are 
 performed. They are interfaces to routines in
 parallel libraries like ScaLAPACK. Besides making
 the appropriate function calls, packages are also
 responsible for converting the matrices into
 formats appropriate for the underlying libraries.
 Users can write their own packages which can be
 dynamically loaded by the server.
48- Client Manager 
- It is responsible for communication with the 
 client. It provides functions for reading
 commands and arguments from the client and
 sending to results back to client. It is only
 used in the head server process.
- Server Manager 
- Server manager takes care of communication 
 between server processes. It mainly controls
 broadcasting of commands and arguments from head
 server process to the slave processes, and
 collection of results and error codes. Also it
 provides rank and size information to the
 processes.
- Package Manager 
- It is responsible for maintaining a list of 
 available packages and functions provided by
 them. When initiated by the server process.
 Package Manager will also perform the actual call
 to the functions.
- Matrix Manager 
- It contains all functions needed to create, 
 delete and change the matrices on the server
 processes. It maintains a mapping from the
 client-side matrix identifiers to actual matrices
 on the server. It is also responsible for
 performing garbage collection.
49Examples
- gtgt  Example 2 
- gtgt a  rand(100, 100p) 
- gtgt b  rand(100, 100p) 
- gtgt c  mm(plus, a,b) 
- This example creates two column distributed 
 matrices of size 100X100, adds them, and puts the
 result in another matrix.
- Result  mm(fname, arg1, arg2, .)- calls Matlab 
 function fname on all the nodes and put the
 result in a distributed matrix. At least one
 argument should be distributed and all the
 distributed arrays must be the same size. The
 result is the same size as the arrays.
- gtgt  Example 2 
- gtgt piaprrox  mmmpi(cpi, 100) 
- This example calls cpi.m with 100. This calls a 
 MATLAB version of the popular pi-finding routine
 distributed with MPICH, cpi.c.
- Result  mmmpi(fname, arg1, arg2, .)- calls 
 MatlabMPI function fname on all the nodes and
 return the result.
50- -The two-language approach for rapid development 
 of parallel applications in PPSEs still applies
 here since any front end (other than Matlab) is
- Still possible like maple, mathematica, 
 statistica, pdelab, Matrixx,Python,Perl, Tcl/TK
 and Java (we are currently unable to do high
 performance computing using any of these script
 languages) can drive the backend server. And
 similar mpi and openmp Implementation using any
 of the script languages still possible (similar
 to matlab)
- -Husbands is the developer of the PPEngine 
 extension to matlabP which allowed Multi-Matlab
 and MatlabMPI like functionalities in MatlabP.
- This an implementation of a multimatlab-like, 
 distributed matlab package in matlabP. It is a
 package. With this pkg and asociated m-files, one
 
- Can run multiple matlab processes on the 
 background and evaluate matalab functions in
 parallel. Ex a
- -mmatlab() calles the backend pkgs, mpimatlab() 
 called the PPEngine , openmpmatlab() called the
 openmp shared memory multi-matlab
- Sessions (use matlab as implementation language 
 to implement openmp same at the mpi ones).
- -Parallel computing should be peer-to-peer or can 
 it be client-server model?
- -client-server parallel computing vs. 
 client-server distributed computing The system
 is introduced based on the hybrid structure of
 computers, composed of various models, including
 single-server single-client (SSSC), single-server
 multi-clients (SSMC), multi-servers single-client
 (MSSC), and multi-servers multi-clients (MSMC).
 The system can be used with either internet
 computing as a component of GRID, or intranet
 computing as a local computing facility. LINUX
 based server clusters are needed to perform
 massive and parallel computing, as well as to
 queue scientific information in high performance
 databases. Each server cluster contains multiple
 servers and each server performs specific
 computing tasks. Some servers are used to
 communicate to other servers and clients using
 Java JINI, Java servlets or JSP. Others are
 dedicated to internal parallel computing with
 Java programming. This is performed directly
 through Java's socket communication or Java
 Native Interface (JNI) to access existing message
 passing libraries such as MPI and PETSc in
 C//C.
- openmp matlab is feasable since Matalab 
 Paralleliation toolkit provides constructs that
 simulates a parallel for-loop.
- -mpimatlab  openmp-matlab are appealing to 
 programmers, while the backend is appealing for
 non-programmers. Compiled matalab is appealing to
 embedded systems. Can we combine all of them.
- -MatlabP v.1 (Husbands ph.d. thesis) the server 
 is a distributed application, that means a copy
 of the server resides on each node of the
 parallel machine (it was a cluster) .
 Coordination between the copies is through MPI.
 How such setup be done on SGI parallel machine?
51-MatalabP v2.0 is writtten in C -Currently, 
the server processes communicate using MPI. Can 
we write them to communicate using DSM or 
SH? -MatlabP v.2 supports block cyclic 
distribution of matrices.Complex number support. 
A visualization Pkg (bizes, surfaces, curves, 
mesh)- this uses the mesa opengl library -In the 
following examples, I do not see the start(5), 
send(0, Recv(), get(), put(), bcast(), Eval(), 
min() comands of the multi-matlab? There is 
no Exampes of them. The following is just the 
Support for data parallel- Embarassingly parallel 
operations -Usage of the PPEngine Pkg?with this 
pkg and associated m-files, we can run multiple 
matlab processses on the backend and evaluate 
matalab funs in parallel. The system works by 
starting up matalab engine instances on each node 
theough calls to the matlab engine interface. 
From that point on, matalab commands can be 
relayed (passed) to the matalab engine.Ex1 a 1 
100p b mm(chi2rnd, a) - this will create 
a distributde matrix of length 100, then fill it 
with randon values from the chi-squares through 
calls to the fun chi2rnd from matlab statistics 
toolbox. So mm(0 Calls the data parallel 
embarassingly parallel mpi. -Ex2- data parallel 
embarassingly parallel a  rand(100,100P) b 
rand(100,100p) c  mm(plus,a,b) This 
creates two column distributed Matrices of size 
100X100, adds them using the data parallel 
embrassingly parallel mpi. Another faster way is 
a  a b (the later uses the Server pkg to do 
that) -mpi-like functionalities (send, get, put, 
recv, etc.) are added by making use of the 
matlabmpi pkg. This pkg has the advatage of being 
written In pure matlab code (100 lines of Jermey 
file-io), so integrating simply means making 
calls to this pkg through PPEngine. Ex3 
 Piapprox  mmmpi(cpi, 100) this calls a 
matlab version of the popular pi-finding routine 
distributed with MPICH, cpi.c All the MPI calls 
are Simulated within matlab through 
matlabmpi. -Conclusion small size problems use 
the normal Matlab. Larger sizes use 
matabp -Scalpack is better in performance than 
matlabP due to clinet server message overhead  
As the matlab call yields Multiple calls to the 
server, this messaging overhead is multiplied. Q 
did u measure this overhead through null calls? 
 52- Although weve been told that matlabp calls 
 scalpack. But when solving the linear sys,
 scalapack overwrites the input matrix. In
 matlabp, in
- Order to mimic standard Matlab behaviour, the I/p 
 matrix is copied into another matrix which is
 used in the scalapack call. This incurred
- Additional overhead. 
- -For portability, there have been discussion of 
 porting matlabP to a purely matlab script code
 base, using matlabmpi as the underlying
 communication layer.
- -A proxy is needed when a firewall exists between 
 the client and the server.
- - ones(1000p,100p) matrix distribution is 2d 
 block cyclic. When u put p1, we should get the
 same normal matlab performance. P is the block
 size that u can setup from the scalapack. P is a
 symbolic tage- the var is backend var.
- -people should develop their ideas on cluster, 
 then when they work move them to a supercomuter
 SGI machine.
- -The hilb(n), when called by hilb(8000p)  this 
 will propagate the parallelizem through the code.
- -Example 3, mm2() multi-matlab, p again.