Open Multi-Processing Functionality

In EFDC+ the EFDC code has been upgraded to support multi-threading capabilities and provide vastly improved model run times. Open Multi-Processing (OMP) is an API designed to facilitate the use of multi-threaded programming. It does this by creating and synchronizing threads automatically at the users command. OMP is an unofficial standard for FORTRAN, and is supported by IBM and Intel among others. Both Microsoft and Intel's most recent compilers provide excellent support.  With OMP the compiler is informed that a section of code may be parallelized through use of certain directives. The compiler is then able to generate an application that consists of a single thread, which forks into several threads for a parallel region; these threads are then synchronized and all but one terminate at the end of the parallel region as the program execution reverts to a single master thread.  Depending on the machine topology, application, and operating system, thread affinity can have a dramatic effect on the application speed.  Both the Two Time Level (2TL) and Three Time Level (3TL) solutions subroutines in EFDC+ have been updated to allow for Open Multi-processing, thereby providing significant speed up in model run time for users running with either of these solutions.

The OMP capability of the EFDCPlus/EFDC_Explorer was formerly an optional extra for users. From EE8 and EFDC+ it is the default option. In order to use it effectively it is important to note the following features. The OMP option is only required to be set when the user runs the model. In the Run Options frame shown in Figure 1 below, the user is able to set the number of OMP threads for the model run. This will rewrite the EFDC.INP file.  The user should set the number of threads to less than or equal to half the maximum number of threads available. In this case the user can set to 1 or 2 as the maximum number of threads is 4.  Setting the number of threads to more than half the maximum number of threads will result in diminished performance as computations will need to complete one complete cycle before handling any threads more than half the maximum.


Figure 1 Run Options for OpenMP model runs.