|
| View previous topic :: View next topic |
| Author |
Message |
Maciek
Joined: 22 Dec 2006 Posts: 5
|
Posted: Mon Jan 28, 2008 6:35 am Post subject: No pgprof1.out file. |
|
|
Hello,
I'am using PGI 7.1 with a sample MPI program:
| Code: |
program main
include 'mpif.h'
double precision PI25DT
parameter (PI25DT = 3.141592653589793238462643d0)
double precision mypi, pi, h, sum, x, f, a
integer n, myid, numprocs, i, ierr
c function to integrate
f(a) = 4.d0 / (1.d0 + a*a)
call MPI_INIT(ierr)
call MPI_COMM_RANK(MPI_COMM_WORLD, myid, ierr)
call MPI_COMM_SIZE(MPI_COMM_WORLD, numprocs, ierr)
n=100000
c broadcast n
call MPI_BCAST(n,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr)
c check for quit signal
if ( n .le. 0 ) goto 30
c calculate the interval size
h = 1.0d0/n
sum = 0.0d0
do 20 i = myid+1, n, numprocs
x = h * (dble(i) - 0.5d0)
sum = sum + f(x)
20 continue
mypi = h * sum
c collect all the partial sums
call MPI_REDUCE(mypi,pi,1,MPI_DOUBLE_PRECISION,MPI_SUM,
& 0,MPI_COMM_WORLD,ierr)
c node 0 prints the answer.
if (myid .eq. 0) then
print *, 'pi is ', pi, ' Error is', abs(pi - PI25DT)
endif
c goto 10
30 call MPI_FINALIZE(ierr)
stop
end
|
I am trying to use Pgprof, so I compile the code with the command:
| Code: |
pgf77 -Mprof=mpich1,lines mpi_test.F
|
Then I run the program on 4 processors, but I get only the following files:
| Code: |
pgprof.out
pgprof2.out
pgprof3.out
|
I don't know why I don't have pgprof1.out. Moreover I cannot read pgprof.out with pgprof, cause in pgprof.out I have the following:
| Code: |
PROF NODALL 0 a.out 1201526244 1201526063
h n96 11748 0 4
t 1 1
p 0
f mpi_test.F
r main 1 1 1 0.291125 0.291125 0 0
i pgprof1.out
i pgprof2.out
i pgprof3.out
z
|
Pgprof says:
| Code: |
pgprof> pgprof profile5: Invalid profile file pgprof.out
|
..and if I run:
| Code: |
cp pgprof2.out pgprof1.out
|
then its OK, but of course its not a solution. I still dont have performance counters from 1st process.
Have you ever seen such problems with Pgprof?
Best regards,
Maciek |
|
| Back to top |
|
 |
hongyon
Joined: 19 Jul 2004 Posts: 551
|
Posted: Mon Jan 28, 2008 10:08 am Post subject: |
|
|
Hi Maciek,
I have a few questions for investigate what goes wrong.
1) What command do you use to run?
2) What is in machinefile? Did you pass your machinefile or do you use a default?
3) What OS?
Hongyon |
|
| Back to top |
|
 |
Maciek
Joined: 22 Dec 2006 Posts: 5
|
Posted: Mon Jan 28, 2008 12:48 pm Post subject: |
|
|
Hello,
thank you for your answer.
So:
1) I use mpiexec:
| Code: |
mpiexec -n 4 ./a.out
|
2) Well, I didn't pass the machinefile. I use the PBS queueing system on our cluster. I am almost sure that it is done automatically on our system. PBS -> mpiexec
3) Its Gentoo system, when I run "uname -a" I get the following:
| Code: |
Linux n96 2.6.23-gentoo-r3-current #1 SMP Tue Dec 11 12:32:13 CET 2007 x86_64 AMD Opteron(tm) Processor 246 AuthenticAMD GNU/Linux
|
Maciek |
|
| Back to top |
|
 |
hongyon
Joined: 19 Jul 2004 Posts: 551
|
Posted: Mon Jan 28, 2008 3:00 pm Post subject: |
|
|
Hi Maceik,
How do you setup your environment? Based on the information you gave here, you compile using MPICH1 but you use mpiexe to run. There is no mpiexec command in MPICH1 in PGI packages. mpiexec is MPICH2 command. Make sure you don't setup MPICH2 path and run MPICH1. That could be the reason why it fails?
Hongyon |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group
|