delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/10/01/15:30:40

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7D7BA398B83F
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1601580595;
bh=A1t1cG5Ga5fxLbxEV+cQSMnMxmYextC3L3E9oZiHtWk=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=wSCpKyLrVEpsjUg/w4K1eONvJRVqL5nwzylnXBMMlpUYJ8+XCx0rpZFcvhXmfiEmW
Lc0Sak/KcLkS6HL2da3cSU3TaZZCkzyaKVt1iqtzYbHgR+2PZWyR5PBO/mMPF6Mwn/
fuhfFeU7EvXnPzoSgiCHm3gJ8r2UIYOoHpX4oUDs=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 948CB384607B
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:subject:to:references:from:message-id:date
:user-agent:mime-version:in-reply-to:content-language
:content-transfer-encoding;
bh=yUOheFw/o81FfFzEY6qSAXIboJOcwlXygi/cFNND5aY=;
b=Uf2nliZwjFgBKv2iN1ukvL3VF9czobLPT8sI7kHLBR9EyPRn0ia0VXAso4KWdtAPEc
uMv2S/NPaOKUZ0bkB/HdVizdhmVN/I9x3fPW2OGlrHQgR9yxUf89KleJc6t/+EaP/3P3
6v6kLxcnrpboJs8RVCFfKkl+poXp4i6QNCo6SE3yAhRQiKXUC/C7dzm+5807b91bqEVh
W/WQNOtZg+wBoyVjbOl/RVgyevm09y3j6zVw97VCC+65WuW9SsFHpw4qkpibWydhAFA/
Pf/jnYLLUve8kV+SvJnOoimG/iEuTl63zguU1N7gjG+69OGn6gLgUfxFr7fGWfW6uTNF
JBOg==
X-Gm-Message-State: AOAM530boQJon37dieGvpQPB7oDN4LrSd6daQYZcTwg3U77HOz2Xnko+
eyH3a5IOuP03nEic+FjXOs7ZQR/PO8g=
X-Google-Smtp-Source: ABdhPJz10LHnyowYf8DOhVkqUtekMq42nOb7VhqBU0vLzcIIvOu6eS9RW9jtmeRkoxDgvoeXL5j9Ng==
X-Received: by 2002:a17:906:9941:: with SMTP id
zm1mr9532380ejb.288.1601580591471;
Thu, 01 Oct 2020 12:29:51 -0700 (PDT)
Subject: Re: Problem with OpenMPI
To: cygwin AT cygwin DOT com
References: <CAL8czr2kheRUF+PPt6RinGdoYROc82hXEUGzcA7Lsa_gt680iA AT mail DOT gmail DOT com>
Message-ID: <fca6059d-ea72-a758-3ed2-8dcecee5d414@gmail.com>
Date: Thu, 1 Oct 2020 21:29:48 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
Thunderbird/68.12.0
MIME-Version: 1.0
In-Reply-To: <CAL8czr2kheRUF+PPt6RinGdoYROc82hXEUGzcA7Lsa_gt680iA@mail.gmail.com>
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A,
RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Marco Atzeri via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Marco Atzeri <marco DOT atzeri AT gmail DOT com>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 091JUO0c012887

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



--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019