From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id 948CB384607B for ; Thu, 1 Oct 2020 19:29:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 948CB384607B Received: by mail-ej1-x631.google.com with SMTP id p15so9752278ejm.7 for ; Thu, 01 Oct 2020 12:29:52 -0700 (PDT) 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) Received: from ?IPv6:2003:cc:9f4c:9235:b100:73b3:47db:35b7? (p200300cc9f4c9235b10073b347db35b7.dip0.t-ipconnect.de. [2003:cc:9f4c:9235:b100:73b3:47db:35b7]) by smtp.gmail.com with ESMTPSA id hb23sm4899270ejb.26.2020.10.01.12.29.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Oct 2020 12:29:50 -0700 (PDT) Subject: Re: Problem with OpenMPI To: cygwin@cygwin.com References: From: Marco Atzeri Message-ID: 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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: it Content-Transfer-Encoding: 8bit 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@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2020 19:29:54 -0000 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