📄 50.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> body { font-family: Verdana, Arial, Helvetica, sans-serif;} a.at-term { font-style: italic; } </style> <title>Memory Mapping</title> <meta name="Generator" content="ATutor"> <meta name="Keywords" content=""></head><body> <p>Important to the concept of sending data with MPI is understanding how the data to be transferred is specified. When sending data, the user will specify the following:</p>
<ul>
<li>
a starting address for the data</li>
<li>
the number of elements to send</li>
<li>
what is the MPI datatype of the data</li>
</ul>
<p>This basically specifies a vector of memory addresses that will be copied to a communications buffer or sent directly over the interconnect network.</p>
<p>The concept of memory address and the size of a given variable is not new to either Fortran or C programmers. The concept of referencing
variables by a memory address and offset is, however, new to many Fortran programmers.</p>
<p>Therefore, it is important to review how arrays are stored in memory. It is common in scientific programs to want to send an array of values, rather than just a single value, as one message. Depending on how
values are aligned in memory, sending a row could be a one line subroutine call or it could be very complicated.</p>
<h3>Fortran</h3>
<p>Fortran stores array elements in memory column wise. As you go down a column in a Fortran array, each successive element is stored sequentially in memory.</p>
<img SRC="memmap1.gif" height=362 width=632>
<h3>C</h3>
<p>C stores array elements in memory row wise. As you go across a row in a C array, each successive element is stored sequentially in memory.</p>
<img SRC="memmap2.gif" height=362 width=632></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -