- #1
sketos
- 56
- 0
Hello,
I have just started to learn myself parallel programming specifically MPI. I know that this is going to be a silly question. I am trying to run the most basic 'hello world' program :
I have just started to learn myself parallel programming specifically MPI. I know that this is going to be a silly question. I am trying to run the most basic 'hello world' program :
program example1
implicit none
!--Include the mpi header file
include 'mpif.h'
integer ierr,myid,numprocs
integer irc
!--Initialize MPI
call MPI_INIT( ierr )
!--Who am I? --- get my rank=myid
call MPI_COMM_RANK( MPI_COMM_WORLD, myid, ierr )
!--How many processes in the global group?
call MPI_COMM_SIZE( MPI_COMM_WORLD, numprocs, ierr )
print *, "Process ",myid," of ",numprocs," is alive"
!--Finalize MPI
call MPI_FINALIZE(irc)
stop
end
implicit none
!--Include the mpi header file
include 'mpif.h'
integer ierr,myid,numprocs
integer irc
!--Initialize MPI
call MPI_INIT( ierr )
!--Who am I? --- get my rank=myid
call MPI_COMM_RANK( MPI_COMM_WORLD, myid, ierr )
!--How many processes in the global group?
call MPI_COMM_SIZE( MPI_COMM_WORLD, numprocs, ierr )
print *, "Process ",myid," of ",numprocs," is alive"
!--Finalize MPI
call MPI_FINALIZE(irc)
stop
end
to compile ( test.f95 in my file's name )
f95 test.95 -o new
But i get the Error: Can't open included file 'mpif.h'
What is going on exactly?? is there something missing that i have to install??
Is there something wrong with the way i am trying to compile it ( if there was no error i should just type mpirun -np 3 new)
Sorry for the silly question!
What is going on exactly?? is there something missing that i have to install??
Is there something wrong with the way i am trying to compile it ( if there was no error i should just type mpirun -np 3 new)
Sorry for the silly question!