Cygwin fortran并行编程,hello程序的问题

Cygwin fortran并行编程,hello程序的问题,cygwin,mpi,gfortran,openmpi,Cygwin,Mpi,Gfortran,Openmpi,我对这个基本程序有问题: !!Fortran示例 program hello implicit none include 'mpif.h' ! If I try 'use mpi' the console don't find this module. integer :: rank, size, ierror, tag, status(MPI_STATUS_SIZE) call MPI_INIT(ierror) call MPI_COMM_SIZE(MPI_COMM_WOR

我对这个基本程序有问题:

!!Fortran示例

program hello

implicit none 

include 'mpif.h'  ! If I try 'use mpi' the console don't find this module.

integer :: rank, size, ierror, tag, status(MPI_STATUS_SIZE)
   
call MPI_INIT(ierror)

call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierror)

call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierror)

print*, 'node', rank, ': Hello world'

call MPI_FINALIZE(ierror)

end program hello

当我编译它时,会出现以下错误:

$ mpirun -np 1 hello

[DESKTOP-SLDH1SC:00140] PMIX ERROR: INIT in file /pub/devel/openmpi/v4.0/openmpi-4.0.5-

1.x86_64/src/openmpi-4.0.5/opal/mca/pmix/pmix3x/pmix/src/mca/gds/ds21/gds_ds21_lock_pthread.c at line 188

[DESKTOP-SLDH1SC:00140] PMIX ERROR: SUCCESS in file /pub/devel/openmpi/v4.0/openmpi-4.0.5-

1.x86_64/src/openmpi-4.0.5/opal/mca/pmix/pmix3x/pmix/src/mca/common/dstore/dstore_base.c at line 2450

[DESKTOP-SLDH1SC:00140] PMIX ERROR: INIT in file /pub/devel/openmpi/v4.0/openmpi-4.0.5-

1.x86_64/src/openmpi-4.0.5/opal/mca/pmix/pmix3x/pmix/src/mca/gds/ds12/gds_ds12_lock_pthread.c at line 138

[DESKTOP-SLDH1SC:00140] PMIX ERROR: SUCCESS in file /pub/devel/openmpi/v4.0/openmpi-4.0.5-

1.x86_64/src/openmpi-4.0.5/opal/mca/pmix/pmix3x/pmix/src/mca/common/dstore/dstore_base.c at line 2450

[DESKTOP-SLDH1SC:00141] PMIX ERROR: ERROR in file /pub/devel/openmpi/v4.0/openmpi-4.0.5-

1.x86_64/src/openmpi-4.0.5/opal/mca/pmix/pmix3x/pmix/src/mca/gds/ds12/gds_ds12_lock_pthread.c at line 168

 node           0 : Hello world

[DESKTOP-SLDH1SC:00140] [[39760,0],0] unable to open debugger attach fifo

怎么了


最后,mpi和omp_lib之间有什么区别?

请理解OpenMP和mpi是两个完全不同的东西。他们没有任何共同之处
omp_lib
来自OpenMP,
mpi
来自mpi。@Vladimir F.好的。非常感谢你提供的信息。我可以在cygwin中同时使用这两个选项中的任何一个吗?我安装了OpenMP和mpi ms的软件包。我可以使用OpenMP,但不能使用mpi模块,尽管我设置了环境变量。我想使用mpi,而不是OpenMP,因为我发现这是一个很好的教程。您是如何安装OpenMPI的?tail/etc/pmix mca params.conf/的输出是什么?关于cygcheck-cd | grep openmpi?好的,我不知道如何在Windows中安装从网站下载的压缩文件。但是有了OMP,我就没有问题了。谢谢你们俩的帮助。