About Parallelization

Parallelization Tests

Bezier Surfaces

Results over 20 runs with:

1 procminavgmax
serial3.8172364.3024504.587352
parallel 13.8031094.2299244.662597
parallel 23.8139494.2318624.651251
parallel 33.8133114.2746164.871468
10 procminavgmax
serial3.8397194.6093006.655391
parallel 13.8262934.5418005.381051
parallel 23.8436354.5173715.319194
parallel 33.8349004.4521385.040315

the test made are:

Result over 50 runs with:

1 procaverage
serial4.44101856
parallel 14.45837448
parallel 24.47456267
parallel 34.43402378
––––––––––––––
10 procaverage
serial4.61977279
parallel 14.60410667
parallel 24.55359172
parallel 34.51270721

The Code

The initialisation of the calculus:

begin
    npts = 50
    mpts = 50
    udpts = 2500
    wdpts = 2500
    bplus = zeros(3, npts * mpts)

    for i = 1 : npts
        ki = i/2
        for j = 1 : mpts
            kj = j /2
            r = sqrt((ki)^2+(kj)^2)
            if (r == 0)
                r = 0.000001
            end
            ij = (i-1)*npts + j
            bplus[1,ij] = i
            bplus[2,ij] = j# + i/10
            bplus[3,ij] = i+j
        end
    end
end

and the execution:

begin
	minor = 10.0
	medium = 0.0 
	major = 0.0
	for i = 1 : 20
	    x = @elapsed bezsurf(npts, mpts, bplus, 1000, 1000)
	    if (x < minor)
	        minor = x
	    end
	    if (x > major)
	        major = x
	    end
	    medium += x
	end
	medium /= 20
	println("minimum = $(minor)")
	println("average = $(medium)")
	println("maximum = $(major)")
end

Conclusions

New tests have been made on small and medium data sets.

All of them have enhanced the same results: over "not so big" data sets no particular changes have been discovered.

At this state of art Julia parallelism seems to be the best choice as manage memory allocation of Activation Registers in the most efficient way. Usually Julia's default parallelization seems to be a little slowler. However this virtual time cost is totally overcome by the smaller amount of memory leack that, in user parallelizations, come at the cost of a high number of Garbage Collector calls.

More test should be made in order to have a precise results sets but it seems useless at the current state of art to waste time over its analysis.