MPI: Difference between revisions

96 bytes added ,  2 years ago
Marked this version for translation
(Marked this version for translation)
Line 1,072: Line 1,072:
Note that many frequently-occurring communication patterns have been captured in the [http://www.mcs.anl.gov/research/projects/mpi/mpi-standard/mpi-report-1.1/node64.htm#Node64 collective communication] functions of MPI. If there is a collective function that matches the communication pattern you need, you should use it instead of implementing it yourself with <tt>MPI_Send</tt> and <tt>MPI_Recv</tt>.
Note that many frequently-occurring communication patterns have been captured in the [http://www.mcs.anl.gov/research/projects/mpi/mpi-standard/mpi-report-1.1/node64.htm#Node64 collective communication] functions of MPI. If there is a collective function that matches the communication pattern you need, you should use it instead of implementing it yourself with <tt>MPI_Send</tt> and <tt>MPI_Recv</tt>.


== MPI compiler-wrappers ==
== MPI compiler-wrappers == <!--T:54-->


<!--T:55-->
The packages of MPI libraries typically provide so called "wrappers" for compilers.
The packages of MPI libraries typically provide so called "wrappers" for compilers.
These are not compilers themselves but call other compilers and at the same time make sure to pass MPI-specific compiler flags to the compiler (i.e. they are a "thin" wrapper around the compiler).
These are not compilers themselves but call other compilers and at the same time make sure to pass MPI-specific compiler flags to the compiler (i.e. they are a "thin" wrapper around the compiler).


<!--T:56-->
Typically they are called (this list does not attempt to be complete):
Typically they are called (this list does not attempt to be complete):


<!--T:57-->
* <code>mpicc</code> for C
* <code>mpicc</code> for C
* <code>mpicxx</code> for C++
* <code>mpicxx</code> for C++
* <code>mpifort</code> and/or <code>mpif77</code> and/or <code>mpif90</code> for Fortran
* <code>mpifort</code> and/or <code>mpif77</code> and/or <code>mpif90</code> for Fortran


<!--T:58-->
With Open&nbsp;MPI, these wrappers have the option <code>--showme</code> that will print which compiler will be called, and which compiler-options will be added.
With Open&nbsp;MPI, these wrappers have the option <code>--showme</code> that will print which compiler will be called, and which compiler-options will be added.


<!--T:59-->
'''Note''' that the Compute Canada software stack contains several modules of the same Open&nbsp;MPI package (e.g. <code>openmpi/4.0.3</code>) that have been compiled with different compilers and without to with CUDA support.  The MPI compiler-wrappers will always use those compilers and versions that have been loaded with a module (i.e. <code>intel</code> or <code>gcc</code>).
'''Note''' that the Compute Canada software stack contains several modules of the same Open&nbsp;MPI package (e.g. <code>openmpi/4.0.3</code>) that have been compiled with different compilers and without to with CUDA support.  The MPI compiler-wrappers will always use those compilers and versions that have been loaded with a module (i.e. <code>intel</code> or <code>gcc</code>).


<!--T:60-->
For example with loaded <code>intel/2020.1.217</code> and <code>openmpi/4.0.3</code> modules:
For example with loaded <code>intel/2020.1.217</code> and <code>openmpi/4.0.3</code> modules:
{{Command
{{Command
Line 1,094: Line 1,100:
}}
}}


<!--T:61-->
and with loaded <code>gcc/9.3.0</code> and <code>openmpi/4.0.3</code> modules:
and with loaded <code>gcc/9.3.0</code> and <code>openmpi/4.0.3</code> modules:
{{Command
{{Command
rsnt_translations
56,420

edits