10.06.2016 Views

eldo_user

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

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

Eldo Control Language<br />

Parallel Operation<br />

Parallel Operation<br />

This section is divided into the following:<br />

• General Settings for Parallelism in ECL<br />

• Parallel Construct<br />

• Parallel Loops<br />

• Extended Simulation Functions<br />

• Launching ECL Simulations on Different Machines<br />

General Settings for Parallelism in ECL<br />

Parallelism in ECL means that ECL code will be executed inside different execution threads at<br />

the same time. These threads belong to the main Eldo process, so they will always be run on the<br />

computer that executes the ECL netlist.<br />

The parallelizable ECL code specified by the <strong>user</strong> is split by ECL into jobs. The threads will<br />

execute these jobs in parallel. There can be more jobs than threads; in that case a thread will<br />

execute another job when it has finished its first job. When there is no parallelism, there is only<br />

one thread, the main thread, which executes all these jobs sequentially.<br />

It is usually interesting to run simulations inside these jobs so that they are executed in parallel.<br />

Simulations are launched by ECL on other Eldo processes (they can be even launched on<br />

different machines when using the .ELDO_CL_MPRUN command). It is important to<br />

understand that parallelism is done at the level of the threads executing ECL jobs, not at the<br />

level of the Eldo processes running simulations; the Eldo processes will be run in parallel only if<br />

the jobs executing the simulation commands are executed by different threads.<br />

The maximum number of threads used for parallelism can be set using the option<br />

set_<strong>eldo</strong>_cl_max_para=val. The default value corresponds to the number of processors of the<br />

computer. If threads are used to run simulations on the same computer, it is not advised to<br />

increase this number (having more threads than processors to execute heavy jobs is not<br />

efficient).<br />

Concurrency Issues<br />

ECL is very strict about what can be parallelized to avoid concurrency issues (variables having<br />

different values depending on the order of execution of the jobs) and will output errors if the<br />

code is not thread safe. The best way to write correct parallel code is to store any result inside<br />

arrays indexed by the index of the current job and to perform any post-processing inside<br />

sequential code.<br />

Eldo® User's Manual, 15.3 1039

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

Saved successfully!

Ooh no, something went wrong!