180 likes | 320 Vues
Explore the overloading of operators in the FEMA System for efficient matrix operations, reducing disk and memory space requirements, and improving computational speed in civil engineering lightweight structures. Learn about the parallelization of multiplying matrices, comparisons of computer systems, modeling algorithms into computer programs, and a proposed approach for optimizing matrix operations.
E N D
LIGHTWEIGHT STRUCTURES in CIVIL ENGINEERINGINTERNATIONAL SEMINAR of IASS POLISH CHAPTEROrganized by Polish Chapter ofInternational Association for Shell and Spatial StructuresWarsaw-Częstochowa, 3 December, 2004OVERLOADING OF OPERATORS IN FEMA SYSTEMW. PRZYBYŁO 1 and M. MAŹNIEWSKI 21Professor, Częstochowa University of Technology, ul. Akademicka 3, 42-200 Częstochowa, POLAND2PhD. student, Częstochowa University of Technology, ul. Akademicka 3, 42-200 Częstochowa, POLAND
FEM (Finite Elements Method) • Constructions are divided into many elements • Elements are described with matrices • Hypermatrix - matrix of matrices • Problems associated with matrices: • high requirements of disk and memory space • high requirements of computational power • costly and time-consuming calculations
Characteristics of matrix operations • Problems' solutions are constructed as a set of subtasks • Subtasks are executed one by another • Some subtasks are repeated many times with different data-sets • Some subtasks are independent one of another • Subtasks can be executed simultaneously
Comparison of computer systems • Single computer – one CPU • Symetric Multiprocessor(SMP) • Parallel computer • many processors in one box • one processor – one task • Clusters – set of computers jointed with network • Saving money by using owned hardware • Big computational power with low cost • Easy enlarging • Reliable calculations • Fail-safe system
Speeding-up calculations • Simultaneous subtasks' execution • Computer programs' parallelization • Building clustered systems • Requirements: • Synchronization of data • Interprocess communication • Network communication
Modelling algorithms into computer programs • Algorithm – description of problem solution • Algorithms are constructed with cooperation of specialists • Computer program – representation of algorithm • different syntax of programming languages • Only programmers understand source code • Mathematic operations replaced with programming operations
Overloading of operators • Arithmetic operators – works only with basic data-types(char, integer value, real value...) • Defining own data-types – Objective Programming • Matrix operations • Definition of object: MATRIX • Overloading operators – allowing them work with user-defined data-types • Problems with matrices operations • Large matrices need large disk and memory spaces • Assignment of matrices – copying one matrix to another
Overloading of operators cont. • Classic mode • a:=1, b:= 2 – integer values • c := a + b, c = 3 – integer value • Overloading operators • A – matrix, dimension: n x n • B – matrix, dimension: n x n • C : = A + B - matrix, dimension n x n • D : = A * B – matrix, dimension n x n
FEMA System • Designed for matrices and hypermatrices operations • Modular system for modular operations(parallelization enabled) • Maximum dimension of data sets, minimum time of processing
Proposed approach • Overloading matrix operations • Replacing copying of matrices – with commands from FEMA system • Dividing task into subtasks • Writing steering files for every subtask • Sending steering files to nodes of clusters • Processing calculations in professional system(FEMA) • Aggregation of calculations' results
Example • Adding matrices: • in source code: C = A + B • in result : PHAH A B C • Multiplying matrices: • in source code: C = A * B • in result : PHMH A B C
Appendix: Parallel example • Steering file is read by master-program • Worker-program is invoked • Master-program sends steering file to worker • Worker-program writes steering file to hard-disk • Worker-program invokes FEMA system • FEMA system read task-definition and input data • FEMA system executes operations and writes results to hard-disk
Steering file example (fema.CIN) • DDEX • DEX-BAT • DDEX7 • 2 • 3 • Y • Y • N • N • END • END
Console output • [1:t40005] Master process..262149..[ bind and ready to distribute tasks ].. • [1:t40005] Master [262149]..Checking steering-file [/tmp/fema.CIN] structure...OK • [1:t40005] Worker-process..ID...262150: [ ready to execute tasks ] • [1:t40005] Process: [262149] ready to send steering file.. • [1:t40006] Process: [262150] ready to get steering file.. • [1:t40005] [262149]..We've read: • [1:t40005] DDEX • [1:t40005] DEX-BAT • [1:t40005] DDEX7 • [1:t40005] 2 • [1:t40005] 3 • [1:t40005] Y • [1:t40005] Y • [1:t40005] N • [1:t40005] N • [1:t40005] END • [1:t40005] END • [1:t40005] END • [1:t40005] Process [262149]..sending steering file to worker(s).. • [1:t40006] Process: [262150] retrieved cmd: • [1:t40006] ..DDEX • [1:t40006] DEX-BAT • [1:t40006] DDEX7 • [1:t40006] 2 • [1:t40006] 3 • [1:t40006] Y • [1:t40006] Y • [1:t40006] N • [1:t40006] N
[1:t40006] END • [1:t40006] END • [1:t40006] END • [1:t40005] Process: [262149] - retrieved confirmation.. • [1:t40005] Process: [262149] exiting.. • [1:t40005] EOF • [1:t40006] ....confirmation sent to master.. • [1:t40006] Process: [262150]..Attempting to write steering file [/home/pvm3/bin/LINUX/FEMA/task/fema.CIN].. • [1:t40006] Process: [262150] - [ OK ] file has been written • [1:t40006] Process: [262150]..Attempting to run FEMA system.. • [1:t40006] Process: [262150]..checking for task-definition file.. • [1:t40006] Process: [262150] - [ OK ] task-definition file is proper.. • [1:t40006] Process: [262150]..running FEMA system.. • [1:t40006] sh: CLS: command not found • [1:t40006] sh: PAUSE: command not found • [1:t40006] sh: CLS: command not found • [1:t40006] sh: CLS: command not found • [1:t40006] sh: CLS: command not found • [1:t40006] [34;1m******************************************************************************** • [1:t40006] WELCOME TO FEMA DATABASE MADE BY FEMA ENGINEERING LTD • [1:t40006] YOU HAVE SELECTED /home/pvm3/bin/LINUX/f88.exe, • [1:t40006] WITH /home/pvm3/bin/LINUX/FEMA/task/fema.INP AS ARGUMENT • [1:t40006] ******************************************************************************** • [1:t40006] [0m**************************************************************************** • [1:t40006] EOF