The MPI F08 binding interface, defined in a module named
mpi_f08, has several big improvements over its ancestors.
The most important one is that choice buffers are now declared
as assumed-type, assumed-rank dummy arguments,
that is, of type type(*), dimension(..), which is defined
in TS 29113. The actual argument for an assumed-type,
assumed-rank dummy can be of any type and can be a scalar,
an array, or an array section (i.e., subarray). The subarray
can even be noncontiguous by using Fortran subscript
triplets, for example, a(2:10:2), where a is a 1-d array and
the subarray contains a(2) to a(10) with a stride of 2.
The F08 binding further improves type safety in various
aspects. MPI handles in the F77/F90 bindings all have type
integer, making them indistinguishable to compilers. In
the F08 binding, handles are defined as Fortran bind(C) derived
types that consist of only one element, integer ::
MPI_VAL. The internal handle value is identical to the Fortran
integer value used in the F77/F90 bindings. Operators
such as == and /= are overloaded to allow the comparison
of these handles. An MPI Status variable in the F77/F90
bindings is an integer array, for example, integer :: status(MPI_STATUS_SIZE).
In the F08 binding, it has a Fortran
bind(C) derived type with three public integer components,
MPI_SOURCE, MPI_TAG and MPI_ERROR, which are identical to
the Fortran integer value used in the F77/F90 bindings. Additionally,
the F08 binding defines interfaces for MPI userdefined
callback functions. Dummy arguments that are a
procedure (similar to function pointers in C) are declared
by using Fortran’s procedure keyword. Listing 1 shows some
types defined in the F08 binding.
type , bind (C) :: MPI_Comm
integer :: MPI_VAL
end type MPI_Comm
type , bind (C) :: MPI_Status
integer :: MPI_SOURCE
integer :: MPI_TAG
integer :: MPI_ERROR
... ! Implementation - dependant private components
end type MPI_Status
Listing 1: MPI F08 type examples
The F08 binding also declares the ierror argument in
all Fortran subroutines except user-defined and predefined
callbacks as optional, so that a programmer can omit that
argument. Additionally, choice buffers in nonblocking communications
now have an asynchronous attribute. In Fortran
2003/2008, this attribute could be used only to protect
buffers of Fortran asynchronous I/O. With TS 29113, this
attribute now also covers asynchronous communication occurring
within library routines.
The MPI F08 binding interface, defined in a module namedmpi_f08, has several big improvements over its ancestors.The most important one is that choice buffers are now declaredas assumed-type, assumed-rank dummy arguments,that is, of type type(*), dimension(..), which is definedin TS 29113. The actual argument for an assumed-type,assumed-rank dummy can be of any type and can be a scalar,an array, or an array section (i.e., subarray). The subarraycan even be noncontiguous by using Fortran subscripttriplets, for example, a(2:10:2), where a is a 1-d array andthe subarray contains a(2) to a(10) with a stride of 2.The F08 binding further improves type safety in variousaspects. MPI handles in the F77/F90 bindings all have typeinteger, making them indistinguishable to compilers. Inthe F08 binding, handles are defined as Fortran bind(C) derivedtypes that consist of only one element, integer ::MPI_VAL. The internal handle value is identical to the Fortraninteger value used in the F77/F90 bindings. Operatorssuch as == and /= are overloaded to allow the comparisonof these handles. An MPI Status variable in the F77/F90bindings is an integer array, for example, integer :: status(MPI_STATUS_SIZE).In the F08 binding, it has a Fortranbind(C) derived type with three public integer components,MPI_SOURCE, MPI_TAG and MPI_ERROR, which are identical tothe Fortran integer value used in the F77/F90 bindings. Additionally,the F08 binding defines interfaces for MPI userdefined
callback functions. Dummy arguments that are a
procedure (similar to function pointers in C) are declared
by using Fortran’s procedure keyword. Listing 1 shows some
types defined in the F08 binding.
type , bind (C) :: MPI_Comm
integer :: MPI_VAL
end type MPI_Comm
type , bind (C) :: MPI_Status
integer :: MPI_SOURCE
integer :: MPI_TAG
integer :: MPI_ERROR
... ! Implementation - dependant private components
end type MPI_Status
Listing 1: MPI F08 type examples
The F08 binding also declares the ierror argument in
all Fortran subroutines except user-defined and predefined
callbacks as optional, so that a programmer can omit that
argument. Additionally, choice buffers in nonblocking communications
now have an asynchronous attribute. In Fortran
2003/2008, this attribute could be used only to protect
buffers of Fortran asynchronous I/O. With TS 29113, this
attribute now also covers asynchronous communication occurring
within library routines.
การแปล กรุณารอสักครู่..

MPI F08 ผูกอินเตอร์เฟซที่กำหนดไว้ในโมดูลที่ชื่อ
mpi_f08 มีการปรับปรุงใหญ่หลายกว่าบรรพบุรุษของมัน .
ที่สำคัญที่สุดคือบัฟเฟอร์เลือกตอนนี้ประกาศ
นามสมมติ ประเภท ถือว่าอาร์กิวเมนต์หุ่นอันดับ
นั่นคือประเภทประเภท ( * ) , ขนาด ( . . . ) , ซึ่งถูกกำหนด
TS 29113 . เหตุผลที่แท้จริงสำหรับสันนิษฐานชนิด
ถือว่าโง่อันดับสามารถเป็นชนิดใด และสามารถเป็นสเกลาร์
,อาร์เรย์ หรือ เรย์ ส่วน ( เช่น subarray ) การ subarray
สามารถเป็นขบวนการที่เกิดในเซลล์โดยใช้ภาษาฟอร์แทรนตัวห้อย
แฝด , ตัวอย่างเช่น , ( 2:10:2 ) ที่เป็นภายในและ subarray ประกอบด้วยอาร์เรย์
( 2 ) ( 10 ) กับกางเกง 2 .
F08 ผูกพันเพิ่มเติมเพิ่มความปลอดภัยประเภทในแง่มุมต่าง ๆ
สำหรับจัดการใน f77 / f90 ผูกทั้งหมดมีชนิด
จำนวนเต็ม ทำให้พวกเขาไม่ต้องพูด .ใน
F08 ผูก จับมัด เช่นภาษาฟอร์แทรน ( C ) ได้มา
ประเภทที่ประกอบด้วยเพียงหนึ่งธาตุ จำนวนเต็ม : :
mpi_val ค่าจัดการภายในเหมือนกันกับภาษาฟอร์แทรน
ค่าจำนวนเต็มที่ใช้ใน f77 / f90 ผูก . ผู้ประกอบการ
เช่น = = / = มากเกินไปเพื่อให้เปรียบเทียบ
จับเหล่านี้ เป็น MPI สถานะตัวแปรใน f77 / f90
ผูกเป็นจำนวนเต็ม อาร์เรย์ ตัวอย่างโดย : : สถานะ ( mpi_status_size ) .
ใน F08 ผูก มี c
ผูก ( C ) ได้มาประเภทที่มีสามองค์ประกอบ จำนวนเต็มสาธารณะ
mpi_source mpi_tag mpi_error , และที่เหมือนกัน
c ค่าจำนวนเต็มที่ใช้ใน f77 / f90 ผูก . นอกจากนี้ การกำหนดอินเทอร์เฟซสำหรับ F08
หน้า userdefined จากฟังก์ชัน อาร์กิวเมนต์ที่เป็น
หุ่นขั้นตอน ( คล้ายกับฟังก์ชันตัวชี้ใน C ) มีประกาศ
โดยใช้ภาษาฟอร์แทรนเป็นขั้นตอนคำหลัก รายการที่ 1 แสดงบางประเภทที่ระบุใน F08 ผูกพัน
.
ชนิดผูก ( C ) : :
: : mpi_comm จำนวนเต็ม mpi_val สิ้นสุดประเภท mpi_comm
ชนิดผูก ( C ) : :
: : mpi_source mpi_status จำนวนเต็มจำนวนเต็ม : : : : mpi_error จำนวนเต็ม mpi_tag
. . . . . . . ! การพึ่งพาเอกชน - ส่วนประกอบ
จบประเภท mpi_status รายการ 1MPI F08 ประเภทตัวอย่าง
F08 ผูกยังประกาศ 1 อาร์กิวเมนต์
ทั้งหมดยกเว้นผู้ใช้โปรแกรมปลีกย่อยล่วงหน้า
คัดตัวเป็นทางเลือกเพื่อให้โปรแกรมเมอร์สามารถละเว้นที่
อาร์กิวเมนต์ นอกจากนี้ การเลือกบัฟเฟอร์ใน nonblocking การสื่อสาร
ตอนนี้มีคุณลักษณะไม่ตรงกัน ในภาษาฟอร์แทรน
2003 / 2008 , คุณลักษณะนี้สามารถใช้เพื่อปกป้อง
บัฟเฟอร์ของภาษาฟอร์แทรนแบบฉัน / O กับ TS 29113 นี้
คุณลักษณะตอนนี้ยังครอบคลุมไม่ตรงกันการสื่อสารที่เกิดขึ้นตามปกติ
ภายในห้องสมุด
การแปล กรุณารอสักครู่..
