comsol 3.4 - Agenda Catania

Transcript

comsol 3.4 - Agenda Catania
Consorzio COMETA “Progetto PI2S2”
UNIONE EUROPEA
Parallel Computing in COMSOL Multiphysics
Grid Open Days alla Sezione di Catania dell'INGV
April 2nd 2008
Dr. Valerio Marra, COMSOL S.r.l.
martedi 8 novembre
2005
Consorzio COMETA “Progetto PI2S2”
Agenda
●
What is Multiphysics?
●
Parallel Computing
●
Benchmarking COMSOL Multiphysics
●
COMSOL in Italy
martedi 8 novembre
2005
UNIONE EUROPEA
Consorzio COMETA “Progetto PI2S2”
What is Multiphysics?
martedi 8 novembre
2005
Example 1: Specific Absorption Rate (SAR),
Electromagnetic Waves and Heat Transfer
UNIONE EUROPEA
Consorzio COMETA “Progetto PI2S2”
What is Multiphysics?
martedi 8 novembre
2005
Example 2: Baffled Mixer, Fluid Flow and Chemical
Reactions
UNIONE EUROPEA
Consorzio COMETA “Progetto PI2S2”
What is Multiphysics?
Example 3: Surface-mounted Package, ElectroThermal Effects
martedi 8 novembre
2005
UNIONE EUROPEA
Consorzio COMETA “Progetto PI2S2”
What is Multiphysics?
martedi 8 novembre
2005
Example 4: Surface Acoustic Wave (SAW) Sensor,
Fluid-Structure Interaction (FSI)
UNIONE EUROPEA
Consorzio COMETA “Progetto PI2S2”
What is Multiphysics?
martedi 8 novembre
2005
Example 5: Maglev Train, Electrical Current and
Mechanical Force
UNIONE EUROPEA
Consorzio COMETA “Progetto PI2S2”
UNIONE EUROPEA
Challenge of Engineering Simulation Today
●
Today’s engineer demands high definition simulation for designs
●
High definition means accounting for all physical effects
●
Simulation tools must take the right approach
●
Decreasing solving time
martedi 8 novembre
2005
Consorzio COMETA “Progetto PI2S2”
The Multiphysics Approach
martedi 8 novembre
2005
UNIONE EUROPEA
Consorzio COMETA “Progetto PI2S2”
UNIONE EUROPEA
Solver Technology
●
CG - Conjugate Gradient
GE - Gaussian Elimination
GS - Gauss-Seidel
MG - Multigrid
SOR - Successive Over Relaxation
●
●
Simulation was
significantly restricted by
computational resources
in the past
Hardware and software
has advanced
exponentially for 35 years
These advances make
multiphysics simulation
widely accessible
Source: PITAC Report to
the President 2005
martedi 8 novembre
2005
Consorzio COMETA “Progetto PI2S2”
UNIONE EUROPEA
Parallelization
Shared memory parallelization - multicore Distributed parallelization
Processor chip
Processor chip
…
core
core
core
core
Network, advanced switch
Memory
COMSOL 3.4
OpenMP (MPI)
SGI-Altix (N=2-1024?)
martedi 8 novembre
Intel/AMD (Windows, Linux)
2005
COMSOL 4
MPI
“Cluster”
Linux (not very often Windows)
“Supercomputer”
“Blue Gene”
Consorzio COMETA “Progetto PI2S2”
UNIONE EUROPEA
What is it to COMSOL 3.4 users?
●
●
Get yourself a multicore processor machine
The solvers, assembly, and meshing in COMSOL Multiphysics and
the linear algebra functions in COMSOL Script benefit from
parallelism. COMSOL Supports the shared memory model.
–
Windows: COMSOL uses env. variable
NUMBER_OF_PROCESSORS. If you have a parallel machine that
COMSOL supports, you can override the default with the switch
-np <number of processors>. Or set the env. variable
COMSOL_NUM_THREADS
Linux and Sun: COMSOL uses one processor per default. Use
the env. variable COMSOL_NUM_THREADS to override. Or
comsol –np 2 as start command.
martedi 8 novembre
–
2005
–
Mac: Parallel support in version 3.5
Consorzio COMETA “Progetto PI2S2”
UNIONE EUROPEA
Speedup
●
●
The speedup depends on the processor load
More than one COMSOL process competing for the same core
slows things down considerably
–
Example: your system has 8 cores, and 5 of them are used by
other active programs. Do not set the -np switch to a number
greater than 3. The programs will then compete for the same
resources, which slows all of them considerably.
martedi 8 novembre
2005
Consorzio COMETA “Progetto PI2S2”
UNIONE EUROPEA
Speedup, cont.
●
Some speedup through parallel BLAS (Basic Linear Algrebra
Subprogram).
–
●
●
Hardware manufacturers ship tailored BLAS, you can switch.
Example: Included with COMSOL installation is MKL (Math
Kernel Library), optimized for Intel processors. For AMD,
download ACML.
Direct linear solvers
–
On Linux and Windows, use parallel sparse direct linear solver
PARDISO: uses own built-in parallelization independently of
BLAS libraries (good speedup).
–
Direct solvers UMFPACK and TAUCS both benefit from
underlying BLAS
(limited speedup).
Iterative solvers
–
All solvers and smoothers except Incomplete LU have built-in
Blocked version smoothers are usually more
parallel than the nonblocked versions. Matrix assembly stage
also runs in parallel. Usually the speedup depends on the
martedi 8 novembre
parallelization.
2005
Consorzio COMETA “Progetto PI2S2”
UNIONE EUROPEA
Speedup, cont.
●
Optimizing processor usage
–
Depending on load, you can control how COMSOL uses the
available processors.
–
In addition to default mode there are three modes of operation
that you control with the switch -mpmode <multiprocessor
mode>.
●
●
●
–
throughput mode (-mpmode throughput) is expected to give
the best performance when several different processes are
running actively concurrently with COMSOL.
turnaround mode (-mpmode turnaround) and
owner mode (-mpmode owner). Both typically provide the
better performance when no other processes than COMSOL
are active. The owner mode provides the highest
performance in most cases.
The above alternatives need to experimented with on each
to find an optimum.
martedi 8 novembre
platform
2005
Note: You can set the environment variable COMSOL_MP_MODE
Consorzio COMETA “Progetto PI2S2”
UNIONE EUROPEA
Vista experiments
No. of cores
4
2
1
20
60
80
Time (s)
●
Intel Core 2 Quadro, Memory 4GB, Windows Vista Business (64bit)
martedi 8 novembre
2005
●
Steady Laminar Flow (100,000 DOFs)
Consorzio COMETA “Progetto PI2S2”
UNIONE EUROPEA
Micromixer (235,196 DOFs)
No. of cores
4
2
1
200
300
300
Time (s)
martedi 8 novembre
2005
400
500
Consorzio COMETA “Progetto PI2S2”
Speedup, cont.
2 x quad core machine
PARDISO
Poisson eqn in cube
#CPUs
Mesh refine
1
2
4
8
4
1
1.77
2.9
2.69
martedi 8 novembre
2005
UNIONE EUROPEA
Consorzio COMETA “Progetto PI2S2”
Speedup, cont.
2 x quad core machine
GMG
Turbulent reactor
#CPUs
Mesh refine
1
2
4
8
1
1
1.54
1.96
1.59
2
1
1.72
1.91
2.24
martedi 8 novembre
2005
UNIONE EUROPEA
Consorzio COMETA “Progetto PI2S2”
UNIONE EUROPEA
COMSOL 3.4 Multicore Speedup, summary
1 core
martedi 8 novembre
2005
2 cores
4 cores
100k DOF 1
problem
1­2
2
1M DOF problem
1­2
2­4
1
Consorzio COMETA “Progetto PI2S2”
UNIONE EUROPEA
Looking in the crystal ball
●
From Int’l workshop PARA'06: State-of-the-Art in Scientific and
Parallel Computing
–
Because of heat we are moving towards multicore, away from
increased clock frequencies
–
Around 2010, a commodity processor will consist of 128 cores
–
A sweetspot cluster will have 500-1000 processors
martedi 8 novembre
2005
Consorzio COMETA “Progetto PI2S2”
UNIONE EUROPEA
Benchmarking COMSOL
Four cases were examined to compare COMSOL 3.4 with results
from other codes
1. Fluid-structure interaction
2. Fully coupled electronic current conduction with thermal and
structural analysis
3. Electromagnetic wave propagation
4. Electric generator
The complete report can be downloaded from femcodes.nscee.edu
http://femcodes.nscee.edu/src/Benchmark.pdf
martedi 8 novembre
2005
Consorzio COMETA “Progetto PI2S2”
UNIONE EUROPEA
Benchmark environment and criteria
●
Benchmark environment
–
Hardware: Pentium(R) D CPU 2.8GHz, 4.0GB
–
Operation system: Windows XP
–
Software:
●
COMSOL Multiphysics® 3.4
●
ANSYS® CFX® 11.0
●
ANSYS® 11.0
●
HFSS™ v10
●
MAXWELL® 3D v11
●
CST MWS version 2006
martedi 8 novembre
2005
Consorzio COMETA “Progetto PI2S2”
UNIONE EUROPEA
Summary of Comparisons
Benchmark
Software
Number
of
elements
Memory
cost (MB)
CPU
time (s)
case
Used
3407
245
1537
6602
267
3342
9728
308
5300
14,265
6,649
349
N/A
8475
1546
14,848
N/A
2809
5,032
220
5
13
3.065µm
9,635
312
11
11
3.069µm
Case 2:
15,774
520
22
26
3.066µm
Actuator
5,153
122
68
3.067µm
9,368
233
130
3.067µm
24,911
759
600
3.065µm
9,067
19,398
173
376
127
360
5
0.825
HFSS 10.0
CST2006B
COMSOL 3.4
7,431
16,342
38,440
139
380
303
609
297
77
5
MAXWELL 3D
11.0
24,055
93.9
375
COMSOL 3.4
Case 1:
FSI
ANSYS CFX
11.0
COMSOL 3.4
ANSYS 11.0
COMSOL 3.4
Case 3:
Circulator
Case 4:
Generator
martedi 8 novembre
2005
Factor
(X)
Compared values
0.2543µm
0.46
0.2572µm
0.2550µm
0.33
0.2604µm
0.2798µm
0.2909µm
reflection, isolation
and insertion loss
Bmax=1.225T
Bmax=1.421T
Consorzio COMETA “Progetto PI2S2”
The COMSOL Product Line
martedi 8 novembre
2005
UNIONE EUROPEA
Consorzio COMETA “Progetto PI2S2”
Eventi COMSOL
●
●
●
Workshops (~ 30 / anno)
–
http://www.it.comsol.com/events
–
Generali o specifici
Corsi di formazione (Brescia)
–
8-9 aprile, Analisi Strutturale
–
6 maggio, Corso Introduttivo
–
7-8 maggio, Corso Avanzato
–
http://www.it.comsol.com/training
COMSOL Conference/User meetings
martedi 8 novembre
2005
UNIONE EUROPEA
Consorzio COMETA “Progetto PI2S2”
UNIONE EUROPEA
Chi usa COMSOL Multiphysics in
Italia?
•
•
All technical universities
CNR – many different
sections
•
ENEA
•
Selex Communications
•
ENI
•
SensorDynamics
•
IGEA
•
Silicon Biosystems
•
Alstom
•
Joint Research Centre
•
SKF
•
Alta
•
Marposs
•
S.O.G.I.N.
•
Ansaldo
•
Metelli
•
SIPE
•
Barilla
•
Microgate
•
STMicroelectronics
•
CESI
•
•
Tecna
•
CIRA
•
Thales Alenia Spazio
•
C.R.F.
•
Nestlé Waters Levissima
•
Telecom Italia
•
Concast Technologies
•
OLMI
•
Whirlpool
•
Dalmine
•
Pet Engineering
•
Danieli
•
Pirelli Labs
•
De Nora
•
Procter & Gamble
•
Edison
•
SAES Getters
•
martedi
8 Electrolux
novembre
2005 •
Elettromedia
•
Elsag
NATO Undersea
Research Centre
Consorzio COMETA “Progetto PI2S2”
Licenza
CPU-Locked Single User License
Floating Network License
•
La licenza d’uso è perpetua
•
Il primo anno include il supporto tecnico e gli aggiornamenti
Dopo il primo anno la licenza può essere rinnovata al costo
del 20% del prezzo corrente della licenza
martedi 8 novembre
•
2005
UNIONE EUROPEA
Consorzio COMETA “Progetto PI2S2”
Contatti
●
●
●
●
Daniel Ericsson, Managing Director
Tel: +39-030-3793801
[email protected]
Gian Luigi Zanotelli, Technical Manager
Tel: +39-030-3793802
[email protected]
Valerio Marra, Application Specialist
Tel: +39-030-3793803
[email protected]
Cesare Tozzo, Application Specialist
Tel: +39-030-3793804
[email protected]
COMSOL S.r.l.
Via Vittorio Emanuele II, 22
25122 Brescia
www.it.comsol.com
Tel: +39-030-3793800
martedi 8 novembre
Fax: +39-030-3793899
2005
●
UNIONE EUROPEA