AML Report Bricola-1
AML Report Bricola-1
AML Report Bricola-1
Andrea Bricola
January 2, 2023
Chapter 1
Report
Background on pi number
Figure 1.1
Pi computation
The computational problem regards dividing the integral in 101 0 intervals and calcu-
lating the Riemann sum to approximate the value of the integral with proper precision.
The method of Riemann sum consists of dividing the integral of a function in many
intervals, computing the area in each interval and finally approximating the integral
as the sum of all areas.
1
Figure 1.2
Figure 1.3
The idea to make the computation faster is distributing the intervals of Riemann sum
among processing units that work in parallel, so each processor obtains the sum of a
2
subset of intervals and finally a global sum is acquired as aggregation of subset sums.
In order to aggregate local sums I used the procedure MPI Reduce() so each process
sends a message to root process with its local sum and finally root process computes
the total integral
results
• 32 processes on one node: 239
• 64 processes on one node: 119 seconds
• 128 processes on one node: 61 seconds
• 256 processes on one node: 37 seconds
• 256 processi distribuiti nel cluster: 29 seconds
• 500 processi distributii nel cluster: 15.7 seconds
• 700 processi distribuiti nel cluster: 11.2
• 800 processi distribuiti: 10.9
• 900 processi 9.8
• 1000 processi 8.9
• 1200 processi: 14.9 secondi (cluster occupato?)
vedere se migliora mettendo piu di 64 processi con un nodo solo, e poi decidere
come organizzare i processi remoti
3
Experiments with MPI and OMP
precisione rilevata: 12 cifre decimali
• 2048 thread: 10
• 4096: 9 seconds
• 16384 thread: