MCPcopy Create free account
hub / github.com/BirolLab/abyss / main

Function main

Parallel/parallelAbyss.cpp:70–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70int main(int argc, char** argv)
71{
72 Timer timer("Total");
73
74 // Set stdout to be line buffered.
75 setvbuf(stdout, NULL, _IOLBF, 0);
76
77 MPI_Init(&argc,&argv);
78 MPI_Comm_rank(MPI_COMM_WORLD, &opt::rank);
79 MPI_Comm_size(MPI_COMM_WORLD, &opt::numProc);
80
81 // OMPI-1.6.1 and later reset the SIGCHLD handler so we need to
82 // reinitialize uncompress.
83 uncompress_init();
84
85#if PAIRED_DBG
86 opt::singleKmerSize = -1;
87#endif
88 opt::parse(argc, argv);
89 if (opt::rank == 0)
90 cout << "Running on " << opt::numProc << " processors\n";
91
92 MPI_Barrier(MPI_COMM_WORLD);
93 char hostname[HOST_NAME_MAX];
94 gethostname(hostname, sizeof hostname);
95 logger(0) << "Running on host " << hostname << endl;
96 MPI_Barrier(MPI_COMM_WORLD);
97
98#if PAIRED_DBG
99 Kmer::setLength(opt::singleKmerSize);
100 KmerPair::setLength(opt::kmerSize);
101#else
102 Kmer::setLength(opt::kmerSize);
103#endif
104
105 if (opt::rank == 0) {
106 NetworkSequenceCollection networkSeqs;
107 networkSeqs.runControl();
108 } else {
109 NetworkSequenceCollection networkSeqs;
110 networkSeqs.run();
111 }
112
113 MPI_Barrier(MPI_COMM_WORLD);
114 MPI_Finalize();
115
116 if (opt::rank == 0) {
117 mergeFastaFiles(opt::contigsPath, "contigs-", true);
118 if (!opt::snpPath.empty())
119 mergeFastaFiles(opt::snpPath, "snp-");
120 cout << "Done." << endl;
121 DB db;
122 if (!opt::db.empty()) {
123 init(db,
124 opt::getUvalue(),
125 opt::getVvalue(),
126 "ABYSS-P",
127 opt::getCommand(),

Callers

nothing calls this directly

Calls 12

uncompress_initFunction · 0.85
parseFunction · 0.85
mergeFastaFilesFunction · 0.85
getUvalueFunction · 0.85
getVvalueFunction · 0.85
getMetaValueFunction · 0.85
addToDbFunction · 0.85
moveFromAaStatMapFunction · 0.85
runControlMethod · 0.80
runMethod · 0.80
getCommandFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected