mirror of
https://github.com/ceph/ceph
synced 2024-12-30 15:33:31 +00:00
test/old/testmpi.cc: remove this test
`mpimessenger_*()` APIs were removed. Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
2a65a4478f
commit
8915cf0c74
@ -1,53 +0,0 @@
|
||||
#include <sys/stat.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
#include "common/config.h"
|
||||
#include "messages/MPing.h"
|
||||
#include "common/Mutex.h"
|
||||
|
||||
#include "msg/MPIMessenger.h"
|
||||
|
||||
class Pinger : public Dispatcher {
|
||||
public:
|
||||
Messenger *messenger;
|
||||
explicit Pinger(Messenger *m) : messenger(m) {
|
||||
m->set_dispatcher(this);
|
||||
}
|
||||
void dispatch(Message *m) {
|
||||
//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();
|
||||
|
||||
Pinger *p = new Pinger( new MPIMessenger(myrank) );
|
||||
|
||||
mpimessenger_start();
|
||||
|
||||
//while (1) {
|
||||
for (int i=0; i<10000; i++) {
|
||||
|
||||
// ping random nodes
|
||||
int d = rand() % world;
|
||||
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
|
||||
}
|
Loading…
Reference in New Issue
Block a user