猿代码 — 科研/AI模型/高性能计算
0

MPI环境测试程序:Fortran

摘要: program main include 'mpif.h' character * (MPI_MAX_PROCESSOR_NAME) processor_name integer myid, numprocs, namelen, rc,ierr call MPI_INIT( ierr ) call MPI_COMM_RANK( MPI_COMM_WORLD, myid ...
        program main
        include 'mpif.h'
        character * (MPI_MAX_PROCESSOR_NAME) processor_name
        integer myid, numprocs, namelen, rc,ierr
        call MPI_INIT( ierr )
        call MPI_COMM_RANK( MPI_COMM_WORLD, myid, ierr )
        call MPI_COMM_SIZE( MPI_COMM_WORLD, numprocs, ierr )
        call MPI_GET_PROCESSOR_NAME(processor_name, namelen, ierr)
        write(*,10) myid,numprocs,processor_name
10      FORMAT('Hello World! Process ',I2,' of ',I1,' on ', 20A)
        call MPI_FINALIZE(rc)
        end

说点什么...

已有0条评论

最新评论...

本文作者
2024-1-25 17:01
  • 0
    粉丝
  • 316
    阅读
  • 0
    回复
资讯幻灯片
热门评论
热门专题
排行榜
Copyright   ©2015-2023   猿代码-超算人才智造局 高性能计算|并行计算|人工智能      ( 京ICP备2021026424号-2 )