- #1
sketos
- 56
- 0
Hello, I am relatively new user to Linux system (ubuntu 12.04) and I am trying learn myself parallel programming. At the moment I am trying to run a simple MPI "Hello" programm :
If it helps the directory of my programs document program is "/home/sketos/Desktop/parallel programming "
Is there something wrong with my compiler cause i have been using fortran quite a lot ...
Sorry for the silly question but i can't figure out what is wrong
program example1
!--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
!--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
- I have downloaded from the synaptic packahe the mpich2.
- the location of mpif.h is /usr/include/mpich2/mpif.h
- f95 test1.f95 -o new -L/usr/include/mpich2/mpif.h
- I have also included the compiler to look in this directory: export PATH=$PATH:/usr/include/mpich2
If it helps the directory of my programs document program is "/home/sketos/Desktop/parallel programming "
Is there something wrong with my compiler cause i have been using fortran quite a lot ...
Sorry for the silly question but i can't figure out what is wrong