From e5b46b7c3ab9d14dc5e0742ca6efe46baa40c1ed Mon Sep 17 00:00:00 2001 From: sage Date: Wed, 15 Jun 2005 20:14:02 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@323 29311d96-e01e-0410-9327-a35deaab8ce9 --- ceph/Makefile | 4 ++-- ceph/config.cc | 2 +- ceph/test/testmpi.cc | 17 ++++++++++++----- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ceph/Makefile b/ceph/Makefile index e0c73071b4cc5..00428ce27023d 100644 --- a/ceph/Makefile +++ b/ceph/Makefile @@ -1,6 +1,6 @@ # mpicxx must be on your path; on Szilard, this means that -# /usr/local/mpich2-1.0.1/bin must be on your path. +# /usr/local/mpich2-1.0.2/bin must be on your path. # For now, use g++ most of the time. # When compiling MPI stuff, specify myfile.cc instead of myfile.o so that ${MPICC} is @@ -86,7 +86,7 @@ fakesyn: fakesyn.cc mds/allmds.o client/Client.o client/SyntheticClient.o osd/OS fakefuse: fakefuse.cc mds/allmds.o client/Client.o osd/OSD.o client/fuse.o msg/FakeMessenger.cc msg/CheesySerializer.o ${COMMON_OBJS} ${CC} -pg ${CFLAGS} ${LIBS} -lfuse $^ -o $@ -testmpi: test/testmpi.cc msg/MPIMessenger.cc ${COMMON_OBJS} +testmpi: test/testmpi.cc msg/MPIMessenger.cc config.o common/Timer.o common/clock.o msg/Messenger.o msg/Dispatcher.o msg/error.o ${MPICC} ${CFLAGS} ${LIBS} $^ -o $@ diff --git a/ceph/config.cc b/ceph/config.cc index c8e69441d4820..33fddeff14cd9 100644 --- a/ceph/config.cc +++ b/ceph/config.cc @@ -26,7 +26,7 @@ md_config_t g_conf = { fake_clock: false, fakemessenger_serialize: true, - debug: 5, + debug: 1, debug_mds_balancer: 1, debug_mds_log: 1, diff --git a/ceph/test/testmpi.cc b/ceph/test/testmpi.cc index 07d1f09e9d40e..ed757334e4197 100644 --- a/ceph/test/testmpi.cc +++ b/ceph/test/testmpi.cc @@ -5,6 +5,7 @@ using namespace std; #include "include/config.h" #include "messages/MPing.h" +#include "common/Mutex.h" #include "msg/MPIMessenger.h" @@ -15,13 +16,14 @@ public: m->set_dispatcher(this); } void dispatch(Message *m) { - cout << "got incoming " << m << endl; + //dout(1) << "got incoming " << m << endl; delete m; + } }; int main(int argc, char **argv) { - + int num = 1000; int myrank = mpimessenger_init(argc, argv); int world = mpimessenger_world(); @@ -30,14 +32,19 @@ int main(int argc, char **argv) { mpimessenger_start(); - while (1) { + while(1) { // ping random nodes int d = rand() % world; - p->messenger->send_message(new MPing(), d); - + if (d != myrank) { + //cout << "sending " << i << " to " << d << endl; + p->messenger->send_message(new MPing(), d); + } + } + cout << "shutting down" << endl; + p->messenger->shutdown(); mpimessenger_wait(); mpimessenger_shutdown(); // shutdown MPI -- 2.39.5