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

multiprocessors

Vostok
Beginner
447 Views
How do I get my program to use more than one processor? Is there an environment variable to set?
0 Kudos
3 Replies
TimP
Honored Contributor III
447 Views
Quoting - Vostok
How do I get my program to use more than one processor? Is there an environment variable to set?
The multi-processing options included in ifort are the auto-parallelization option -parallel, and -openmp (requiring insertion of OpenMP clauses). The number of threads under these options is controlled by OMP_NUM_THREADS, but defaults to all visible logical processors.
ifort also includes cluster openmp, an extension of OpenMP to multiple nodes. Intel MPI is a separate product, supporting several compilers, including ifort.
0 Kudos
rreis
New Contributor I
447 Views
Quoting - Vostok
How do I get my program to use more than one processor? Is there an environment variable to set?

For starting with OpenMP maybe you're interested in this link:

http://software.intel.com/en-us/articles/getting-started-with-openmp

OpenMP is for multicore, shared memory machiness (SMP).

MPI programming is for separated memory machines (like clusters) but it also works in SMP machines. For MPI you need to link to a MPI library (open source: MPICH, OpenMPI, LAM or if you're looking for vendor stuff you can check Intel implementation).

Performance and working in parallel is always more than just turning some "flags on". Stuff like memory, communication and work loads must be thought and it really depends on the type of problem you're trying to solve.

If you're interested in it another good resource (besides looking around here) is cluster monkey at http://www.clustermonkey.net/
0 Kudos
Vostok
Beginner
447 Views
Quoting - rreis

For starting with OpenMP maybe you're interested in this link:

http://software.intel.com/en-us/articles/getting-started-with-openmp

OpenMP is for multicore, shared memory machiness (SMP).

MPI programming is for separated memory machines (like clusters) but it also works in SMP machines. For MPI you need to link to a MPI library (open source: MPICH, OpenMPI, LAM or if you're looking for vendor stuff you can check Intel implementation).

Performance and working in parallel is always more than just turning some "flags on". Stuff like memory, communication and work loads must be thought and it really depends on the type of problem you're trying to solve.

If you're interested in it another good resource (besides looking around here) is cluster monkey at http://www.clustermonkey.net/
Thanks for the information in both replies. Yes, simple flagging does not do much for my program. I thought that as long as do-loops are independent, they can be automatically dispatched on several CPUs. It only seems to work for trivial loops.
0 Kudos
Reply