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

Multi threading support for Fortran Compiler Version11.

sms2gryahoo_com
Beginner
1,005 Views

Hi,

We planned to use Intel Fortran compiler version 11 on windows 2008.Presently our application is running

in single threaded mode and now we planned to run in multi threaded mode.

Please let us know the following information:

1. Does Intel Fortran compiler 11 support for building multi threaded applications ?

2. If so, could you provide us the necessary steps to follow?

Thanks,

Rajender.

0 Kudos
3 Replies
onkelhotte
New Contributor II
1,005 Views

Hi Rajendet,

it is possible to create multi threaded applications. In the compiler help, (online version http://www.intel.com/software/products/compilers/docs/fmac/doc_files/index.htm) read the chapter "Optimizing applications -> Overview of Parallelism Methods".

You simply parallise loop with the /QParallel compiler flag. For example

[bash]do i=1,10000
  result(i) = number(i)*factor(i)
end do[/bash]

would be executed in parallel because result(2) is indepent from result(1) and so on.IIRC this compiler flag was first available in IVF 10.

Markus

0 Kudos
Steven_L_Intel1
Employee
1,005 Views

Auto-parallel (/Qparallel) has been available for many versions - even before 8.0. However, while it is the easiest method, it is not always the best. The compiler is conservative about which loops can be parallelized. If you choose this option, be sure to enable optimization reports so that you can see where the compiler can and cannot figure it out.

For computational parallelism, OpenMP is preferred. It requires more work on your part and requires adding directives to code, but you can get much more parallelism out of it.

Then there's using the Win32 API to create threads - this is the best option if you want to have a UI and computation run in separate threads.

0 Kudos
ZlamalJakub
New Contributor III
1,005 Views

If you mean by multithreaded - possibility to run application in more independent threads. It is possible (I speak about windows). You should use standard win32 thread api. I think there is not native support for threads in fortran (except of parallelization of code).

I can give you some simple example if you are interested in this kind of multithreading.

Jakub

0 Kudos
Reply