[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[ptp-user] MPI Barrier Analysis
|
I have a relatively simple program, hello world + send messages + a
barrier. When I run MPI Barrier Analysis I get this "
java.util.EmptyStackException
at java.util.Stack.peek(Stack.java:102)
at
org.eclipse.ptp.pldt.mpi.analysis.cdt.graphs.impl.CallGraph.RV_DFS(CallGraph.java:261)
at
org.eclipse.ptp.pldt.mpi.analysis.cdt.graphs.impl.CallGraph.checkRecursive(CallGraph.java:187)
at
org.eclipse.ptp.pldt.mpi.analysis.cdt.graphs.impl.CallGraph.buildCG(CallGraph.java:138)
at
org.eclipse.ptp.pldt.mpi.analysis.actions.MPIAnalysisManager.run(MPIAnalysisManager.java:49)
at "
This happens whether I select the project our source file in the project
explorer.
Any ideas?
BTW, the source file is below.
Cheers,
Steve
//============================================================================
// Name : hello.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <mpi.h>
#include <stdio.h>
#include <string.h>
using namespace std;
int main(int argc, char **argv) {
MPI_Init(&argc, &argv);
int rank,p;
char message[100];
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &p);
int source=0,dest;
int tag = 123;
MPI_Status status;
if (rank == 0) { // the master task
printf("Hello From process 0: Num processes: %d\n", p);
for (source = 1; source < p; source++) {
MPI_Recv(message, 100, MPI_CHAR, source, tag, MPI_COMM_WORLD,
&status);
printf("%s\n", message);
}
} else { // worker tasks
/* create message */
sprintf(message, "Hello from process %d!", rank);
dest = 0;
/* use strlen+1 so that '\0' get transmitted */
MPI_Send(message, strlen(message) + 1, MPI_CHAR, dest, tag,
MPI_COMM_WORLD);
}
MPI_Barrier(MPI_COMM_WORLD);
MPI_Finalize();
return 0;
}