29.11.2012 Views

Oasys LS-DYNA Environment 8.1 VOLUME 3 ... - Oasys Software

Oasys LS-DYNA Environment 8.1 VOLUME 3 ... - Oasys Software

Oasys LS-DYNA Environment 8.1 VOLUME 3 ... - Oasys Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Oasys</strong> <strong>LS</strong>-<strong>DYNA</strong> <strong>Environment</strong>: User Guide (Version <strong>8.1</strong>)<br />

differ by as much as 10%.<br />

Why do you get a difference ?<br />

When any calculation is performed the answer is subject to numerical roundoffs. Normally these<br />

roundoffs are not an issue but when calculations are performed over multiple CPU's the<br />

roundoffs change due to the operations being performed in a different order.<br />

Consider the following simple loop<br />

DO I=1,80000<br />

SUM = SUM + VAR(I)<br />

END DO<br />

One way to perform this loop in parallel on 4 CPU's is to break the problem done into 4 separate<br />

loops and then sum together the results from the four loops.<br />

(CPU 1) DO I=1,20000<br />

SUM1 = SUM1 + VAR(I)<br />

END DO<br />

(CPU 2) DO I=20001,40000<br />

SUM2 = SUM2 + VAR(I)<br />

END DO<br />

(CPU 3) DO I=40001,60000<br />

SUM3 = SUM3 + VAR(I)<br />

END DO<br />

(CPU 4) DO I=60001,80000<br />

SUM4 = SUM4 + VAR(I)<br />

END DO<br />

SUM = SUM1 + SUM2 + SUM3 +SUM4<br />

Due to the different operation sequence the value of SUM will differ between the single CPU and<br />

4 CPU calculations. If another variable, NORM, is now defined by subtracting SUM from a similar<br />

value the roundoff, that is insignificant compared to SUM, becomes more significant. If in turn<br />

NORM is used in another expression to divide another variable the results can be significantly<br />

affected.<br />

Page 2.2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!