* Problem with OpenMPI
@ 2020-10-01 14:47 Rudnei Dias da Cunha
2020-10-01 19:29 ` Marco Atzeri
0 siblings, 1 reply; 3+ messages in thread
From: Rudnei Dias da Cunha @ 2020-10-01 14:47 UTC (permalink / raw)
To: cygwin
Hi,
I have installed all the relevant OpenMPI packages to develop programs in
Fortran but found a problem when compiling programs in Fortran 90 with the
clause
use mpi
as mpifort then complains:
$ mpifort hello_usempi.f90
hello_usempi.f90:13:9:
13 | use mpi
| 1
Fatal Error: Cannot open module file ‘mpi.mod’ for reading at (1): No such
file or directory
The workaround was to use
mpifort -J/usr/lib
as /usr/lib is the directory where mpi.mod resides after the installation
of the OpenMPI packages.
Has anyone found this before? Shouldn't the flag -J/usr/lib be issued as
part of the string issued by mpifort?
Regards
Rudnei
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem with OpenMPI
2020-10-01 14:47 Problem with OpenMPI Rudnei Dias da Cunha
@ 2020-10-01 19:29 ` Marco Atzeri
[not found] ` <CAG0O4Lv+Hz8BnkWr+Wuo8bLAWihDwMJpvigNFtDsErthKdN3NA@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Marco Atzeri @ 2020-10-01 19:29 UTC (permalink / raw)
To: cygwin
On 01.10.2020 16:47, Rudnei Dias da Cunha via Cygwin wrote:
> Hi,
> I have installed all the relevant OpenMPI packages to develop programs in
> Fortran but found a problem when compiling programs in Fortran 90 with the
> clause
>
> use mpi
>
> as mpifort then complains:
>
> $ mpifort hello_usempi.f90
> hello_usempi.f90:13:9:
>
> 13 | use mpi
> | 1
> Fatal Error: Cannot open module file ‘mpi.mod’ for reading at (1): No such
> file or directory
>
> The workaround was to use
>
> mpifort -J/usr/lib
>
> as /usr/lib is the directory where mpi.mod resides after the installation
> of the OpenMPI packages.
>
> Has anyone found this before? Shouldn't the flag -J/usr/lib be issued as
> part of the string issued by mpifort?
>
> Regards
> Rudnei
there are not so many user of mpifort
but I do not see the problem building the examples:
$ make
mpicc -g hello_c.c -o hello_c
mpicc -g ring_c.c -o ring_c
mpicc -g connectivity_c.c -o connectivity_c
make[1]: Entering directory '/pub/devel/openmpi/examples64'
make[2]: Entering directory '/pub/devel/openmpi/examples64'
mpifort -g hello_mpifh.f -o hello_mpifh
mpifort -g ring_mpifh.f -o ring_mpifh
make[2]: Leaving directory '/pub/devel/openmpi/examples64'
make[2]: Entering directory '/pub/devel/openmpi/examples64'
mpifort -g hello_usempi.f90 -o hello_usempi
mpifort -g ring_usempi.f90 -o ring_usempi
make[2]: Leaving directory '/pub/devel/openmpi/examples64'
make[2]: Entering directory '/pub/devel/openmpi/examples64'
mpifort -g hello_usempif08.f90 -o hello_usempif08
mpifort -g ring_usempif08.f90 -o ring_usempif08
make[2]: Leaving directory '/pub/devel/openmpi/examples64'
make[1]: Leaving directory '/pub/devel/openmpi/examples64'
$ cat hello_usempi.f90
!
! Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
! University Research and Technology
! Corporation. All rights reserved.
! Copyright (c) 2004-2005 The Regents of the University of California.
! All rights reserved.
! Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
! $COPYRIGHT$
!
! Sample MPI "hello world" application using the Fortran mpi module
! bindings.
!
program main
use mpi
implicit none
integer :: ierr, rank, size, len
character(len=MPI_MAX_LIBRARY_VERSION_STRING) :: version
call MPI_INIT(ierr)
call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierr)
call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierr)
call MPI_GET_LIBRARY_VERSION(version, len, ierr)
write(*, '("Hello, world, I am ", i2, " of ", i2, ": ", a)') &
rank, size, version
call MPI_FINALIZE(ierr)
end
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem with OpenMPI
[not found] ` <CAG0O4Lv+Hz8BnkWr+Wuo8bLAWihDwMJpvigNFtDsErthKdN3NA@mail.gmail.com>
@ 2020-10-03 15:12 ` Marco Atzeri
0 siblings, 0 replies; 3+ messages in thread
From: Marco Atzeri @ 2020-10-03 15:12 UTC (permalink / raw)
To: cygwin
back on the mailing list
On 03.10.2020 16:55, Massimiliano Alvioli wrote:
>>> Has anyone found this before? Shouldn't the flag -J/usr/lib be issued as
>>> part of the string issued by mpifort?
>
> I found this a few times - not using mpifort but mpif90 - and I
> believe it may be due to
> a mismatch between the version of gcc and the compiler used to build mpi
>
>
> M
>
interesting, but I do not see the problem and
$ gfortran --version
GNU Fortran (GCC) 10.2.0
but when I built the openmpi-3.1.6 was last may with version 9
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-03 15:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-01 14:47 Problem with OpenMPI Rudnei Dias da Cunha
2020-10-01 19:29 ` Marco Atzeri
[not found] ` <CAG0O4Lv+Hz8BnkWr+Wuo8bLAWihDwMJpvigNFtDsErthKdN3NA@mail.gmail.com>
2020-10-03 15:12 ` Marco Atzeri
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).