-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.cpp
59 lines (49 loc) · 1.83 KB
/
test.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//-----------------------------------------------------------------------bl-
//--------------------------------------------------------------------------
//
// datasort - an IO/data distribution utility for large data sorts.
//
// Copyright (C) 2013 Karl W. Schulz
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the Version 2.1 GNU Lesser General
// Public License as published by the Free Software Foundation.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc. 51 Franklin Street, Fifth Floor,
// Boston, MA 02110-1301 USA
//
//-----------------------------------------------------------------------el-
// Top-level driver
//--------------------------------------------------------------------------
#include "sortio.h"
int main(int argc, char *argv[], char *env[])
{
sortio_Class sort_IO;
// [optional]: set total # of files to read via command-line;
// otherwise, we read from input file
std::string input_file ("input.dat");
if(argc > 1)
input_file = argv[1];
if(argc > 2)
sort_IO.overrideNumFiles(atoi(argv[2]));
if(argc > 3)
sort_IO.overrideNumIOHosts(atoi(argv[3]));
if(argc > 4)
sort_IO.overrideNumSortThreads(atoi(argv[4]));
if(argc > 5)
sort_IO.overrideNumSortGroups(atoi(argv[5]));
sort_IO.Initialize(input_file,MPI_COMM_WORLD);
sort_IO.SplitComm();
sort_IO.Init_Read();
sort_IO.beginRecvTransferProcess();
sort_IO.manageSortProcess();
sort_IO.Summarize();
return 0;
}