12.07.2015 Views

LF95 Linux User's Guide - Lahey Computer Systems

LF95 Linux User's Guide - Lahey Computer Systems

LF95 Linux User's Guide - Lahey Computer Systems

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Hardware for Multi-ProcessingHardware for Multi-ProcessingA computer environment with two CPUs that operate independently and simultaneously isnecessary to save elapsed time by multi-processing. A multi-processing program can be executedon hardware with only a single CPU; however, the elapsed time will not be less thanthe execution time for a comparable program written without multi-processing features.Automatic ParallelizationWith automatic parallelization, DO loops and array operations are parallelized without theprogrammer making any modifications to the program. This makes it easy to migrate sourceprograms to other processing systems as long as the program conforms with the Fortranstandard.Examples of Compilation and Executionlfc --info --parallel --ocl test1.f./a.outIn example above, automatic parallelization and optimization control lines (OCLs) are ineffect during compilation. This program is executed using all active CPUs on the machine.lfc --parallel test2.f5001-i: "test2.f", line 2: DO loop with index i parallelized.setenv PARALLEL 2./a.outsetenv PARALLEL 4./a.outIn this second example, the environment variable PARALLEL is set to 2 and the programexecutes with two CPUs. Next, the environment variable PARALLEL is set to 4 and the programexecutes with four CPUs.Details of Multi-ProcessingThis section describes multi-processing in more detail.Targets for Automatic ParallelizationTarget statements of the automatic parallelization are DO loops (including nested DO loops)and array operations (array expressions and array assignments).Loop SlicingAutomatic parallelization may slice a DO loop into several pieces. The elapsed executiontime is reduced by executing the sliced DO loops in parallel.<strong>Lahey</strong>/Fujitsu <strong>Linux</strong>64 Fortran User’s <strong>Guide</strong> 89

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

Saved successfully!

Ooh no, something went wrong!