Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

parallel calculation using a DLL

LRaim
New Contributor I
435 Views

I have searched, with no success, an example of parallel computation  where a called fundamental function is implemented in a DLL.

I.e. the basic structure to be parallelized is:

DO I=1,N,1

CALL SUB1(ZPARM1(I),ZPARM2(I), ..., OUTVAL1(I))

ENDDO

with SUB1 implemented as a DLL.

Does anybody knows some example ?

Regards

0 Kudos
2 Replies
Steven_L_Intel1
Employee
435 Views

There's nothing special about a DLL here - conceptually it's no different than calling a procedure linked in directly. The same issues apply regarding parallelism in making sure you build thread-safe code.

0 Kudos
jimdempseyatthecove
Honored Contributor III
435 Views

In case you may have misunderstood Steve's response. Your DLL must also be thread-safe. You can compile it with -openmp even though it may not directly have any OpenMP statements. Alternatively you can add the -recursive and/or reentrant options.

Jim Dempsey

0 Kudos
Reply