Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2015
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. MPI::Init(argc,argv);
  2. cout << " INFO init done" << endl;
  3. int myrank = MPI::COMM_WORLD.Get_rank();
  4. int numprocs = MPI::COMM_WORLD.Get_size();
  5. get_filename(path_name, myrank);
  6. cout << " INFO open file : " << path_name << endl;
  7. MPI::File thefile = MPI::File::Open(MPI::COMM_WORLD, path_name.c_str(),
  8. MPI::MODE_RDONLY,
  9. MPI::INFO_NULL);
  10. MPI::Offset offset = 101;
  11. MPI::Offset limit = thefile.Get_size();
  12. cout << " INFO go computing" << endl;
  13. do {
  14. thefile.Read_at(offset, buf, bufsize, MPI_CHAR, status);
  15. temp.assign(buf);
  16. Tokenize(temp,tokens,"n");
  17. line.assign(tokens.at(0));
  18. tokens.clear();
  19.  
  20. Tokenize(line,tokens,"t");
  21. nidt_count(tokens);
  22. tokens.clear();
  23. offset += (line.size() + 1);
  24. }while(offset < limit);
  25. count = status.Get_count(MPI_INT);
  26. cout << "process " << myrank << " reads " << nidt_hash.size() << " nidt" << endl;
  27.  
  28. ID DATE NUM_1 NUM_2 NB_UNITE TYPUNIT CODE_1 CODE_2
  29.  
  30. 0 2007-05-13 15:37:48 33671624244 33698802900 547 s 0 17
  31. 0 2007-05-13 15:52:22 33671624244 33672211799 5 s 0 17
  32. ....
  33.  
  34. CODE_1 CODE_2 CODEVAL
  35.  
  36. 0 17 VS
  37. 0 34 SS
  38.  
  39. Select CODEVAL, hour(date) AS HEURE, COUNT(*) AS NBSMSSOR
  40. From Tables_1 Join CODEVAL using(CODE_1,CODE_2)
  41. Where CODEVAL='SS'
  42.  
  43. value -> {r | r is a byteOffset of a row that has "value" in the index column}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement