Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: [OMPI users] Fwd: need help in this error
From: Osman Khalid (osmankhalid2005_at_[hidden])
Date: 2013-10-25 03:00:46

Hi Marco,

Kindly ignore my below email, as the problem is solved. Actually, i had
mingw already installed in my system previously, and its path was set in
environment variables. And, the cygwin version I installed didn't have
gcc/g++ packages installed. So, when i was running, mpicc, it was by
default picking the gcc/g++ of mingw. So I removed path of mingw, and
installed packages in cygwin, and now mpicc/mpic++ etc are working. T

Thanks again for your kind help.

---------- Forwarded message ----------
From: Osman Khalid <osmankhalid2005_at_[hidden]>
Date: Fri, Oct 25, 2013 at 12:33 AM
Subject: Re: [OMPI users] need help in this error
To: Open MPI Users <users_at_[hidden]>

Dear Marco

Once again thank you for kind help. As you suggested, I installed Cygwin,
along with the OpenMPI packages, from the links you sent.

When I run this example (hello.c):

#include <stdio.h>
#include <mpi.h>

int main(int argc, char *argv[]) {
  int numprocs, rank, namelen;
  char processor_name[MPI_MAX_PROCESSOR_NAME];

  MPI_Init(&argc, &argv);
  MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
  MPI_Comm_rank(MPI_COMM_WORLD, &rank);
  MPI_Get_processor_name(processor_name, &namelen);

  printf("Process %d on %s out of %d\n", rank, processor_name, numprocs);


Now I am getting the following error:

OSMANK_at_osman /home
$ ls hello.c OSMANK

OSMANK_at_osman /home
$ mpicc hello.c -o hello
hello.c:1:17: *fatal error: mpi.h: No such file or directory*
compilation terminated.

OSMANK_at_osman /home

I have also tried a c++ version (mpic++) with .cc file and it also gives
the same error. Can you kindly suggest what is wrong here. Do I need to set
any paths? The command such as mpirun or mpicc etc itself does not give
error, but asks for the file inputs.

Thank you in advance.

On Thu, Oct 24, 2013 at 4:43 PM, marco atzeri <marco.atzeri_at_[hidden]>wrote:

> Il 10/24/2013 10:02 PM, Osman Khalid ha scritto:
> Thank you Marco for reply
>> I changed the version to 1.7, but it is stilling give me exactly the
>> same error. I copy paste error below:
> Hi Osman,
> It seems I was not clear.
> I mean that openmpi was already available as package
> distributed in cygwin
> See for all available packages.
> Why do you need to build it by yourself ?
> Can not you use the one already distributed ?
> Regards
> Marco
> ______________________________**_________________
> users mailing list
> users_at_[hidden]