We discussed the design and implementation of the MPI-
3.0 Fortran 2008 binding in MPICH. Our design targets a
Fortran 2008 + TS 29113–capable compiler. It is neat, ef-
ficient and portable since we limit the layers of wrappers,
avoid Fortran-specific initialization, avoid unnecessary runtime
overhead in wrappers, and rely only on standard Fortran
and C. Experiments show that the F08 binding is great
at catching compile time errors.
Being able to pass noncontiguous subarrays is a nice feature
of the new F08 binding. A potential use case is in
stencil computing, where one need to exchange noncontiguous
halos (e.g., border of a submatrix). To get performance,
programmers usually create MPI derived data types in advance
to describe such halos. With the new feature, such
data type creation can be hidden in C wrappers so that it
could be convenient for programmers. But since these MPI
calls are usually embedded in loops, creating and freeing
MPI data types in every loop iteration will incur significant
overhead compared with that of a manually optimized code.
An interesting question to ask is whether we can have the
convenience of subarrays without losing performance. Noticing
that the shape of halos is actually fixed in stencil codes,
we wonder whether we can take advantage of this fact to
cache MPI data types or use MPI persistent requests, in order
to avoid repeated data type creation and freeing. Also,
in our code, Fortran wrappers are outside of a module, thus
eliminating some advantages of using modern Fortran (e.g.,
inlining). Can they be put within a module without breaking
the MPI profiling interface in general? Answering those
questions is our future work.
We discussed the design and implementation of the MPI-3.0 Fortran 2008 binding in MPICH. Our design targets aFortran 2008 + TS 29113–capable compiler. It is neat, ef-ficient and portable since we limit the layers of wrappers,avoid Fortran-specific initialization, avoid unnecessary runtimeoverhead in wrappers, and rely only on standard Fortranand C. Experiments show that the F08 binding is greatat catching compile time errors.Being able to pass noncontiguous subarrays is a nice featureof the new F08 binding. A potential use case is instencil computing, where one need to exchange noncontiguoushalos (e.g., border of a submatrix). To get performance,programmers usually create MPI derived data types in advanceto describe such halos. With the new feature, suchdata type creation can be hidden in C wrappers so that itcould be convenient for programmers. But since these MPIcalls are usually embedded in loops, creating and freeingMPI data types in every loop iteration will incur significantoverhead compared with that of a manually optimized code.An interesting question to ask is whether we can have theconvenience of subarrays without losing performance. Noticingthat the shape of halos is actually fixed in stencil codes,we wonder whether we can take advantage of this fact tocache MPI data types or use MPI persistent requests, in orderto avoid repeated data type creation and freeing. Also,ในรหัสของเรา ภาษาฟอร์แทรนห่อภายนอกโมดูลตัดข้อได้เปรียบของการใช้ภาษาฟอร์แทรนทันสมัย (เช่นinlining) สามารถจะใส่ภายในโมดูลโดยไม่ทำลายหรือไม่พัฒนาอินเทอร์เฟซการสร้างโพรไฟล์ทั่วไป ตอบผู้คำถามคือ งานของเราในอนาคต
การแปล กรุณารอสักครู่..
