smitest.cc 629 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <cc++/socket.h>
#include <cstdlib>
#include "smi.h"

using namespace ost;
using namespace std;

int main(int argc, char* argv[])
{
  SMI_Connect_to_server("10.1.13.3", 5432);

  int applicationID = SMI_Add_application(-1, 0);

  std::cout << applicationID << std::endl;

  int numMeshes;
  int *meshIDs;

  SMI_Get_all_mesh_ids(applicationID, &numMeshes, &meshIDs);

  std::cout << numMeshes << std::endl;
22
  for (int i = 0; i < numMeshes; i++)
23
24
25
26
27
28
29
30
31
    std::cout << meshIDs[i] << " ";
  std::cout << std::endl;

  SMI_Begin_read_transaction(applicationID, 1);
  SMI_Remove_application(applicationID);
  SMI_Disconnect();
}