Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] need help in this error
From: Osman Khalid (osmankhalid2005_at_[hidden])
Date: 2013-10-25 01:33:15


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);

  MPI_Finalize();
}

Now I am getting the following error:

OSMANK_at_osman /home
$ ls
file1.cc 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 http://cygwin.com/packages/ 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]
> http://www.open-mpi.org/**mailman/listinfo.cgi/users>
>