-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain_script.c
58 lines (42 loc) · 1.32 KB
/
main_script.c
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
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
// #include <sys/resource.h>
#include <unistd.h>
#include <assert.h>
#ifdef __MTA__
#include <sys/mta_task.h>
#include <machine/runtime.h>
#endif
#include "globals.h"
#include "defs.h"
int64_t isint(char * buffer);
void bfs(graph * G, int64_t v);
void scriptCheck ( char * scriptname, int64_t run);
int main(int argc, char **argv)
{
int64_t scale;
FILE *outfp;
outfp = fopen("results.txt", "a");
#ifdef __MTA__
mta_suspend_event_logging();
#endif
// setrlimit(16);
singleKernelOptions options;
options.cmdsingle = 0;
options.cmdscript = 1;
parseCommandLineOptions(argc, argv, &options);
scale = SCALE = options.scale;
fprintf(outfp, "\n------------------------------------------------------------\n");
fprintf(outfp, "Input filename: %s\n", options.infilename);
/*------------------------------------------------------------------------- */
/* Preamble -- Untimed */
/*------------------------------------------------------------------------- */
/* User Interface: Configurable parameters, and global program control. */
printf("GraphCT - Tools & Kernels for Massive Graph Analysis:\n");
printf("Running...\n\n");
fflush (stdout);
scriptCheck(options.infilename, 1);
return 0;
}