Adding file IO timing param
This commit is contained in:
parent
fc184f4679
commit
dfe2f7b3cf
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
Key Generation Time: 0.024 s
|
||||
Encoding and Encryption Time: 5.123 s
|
||||
Computation Time: 1.372 s
|
||||
Decryption & Decoding Time: 0.169 s
|
||||
End-to-end Runtime: 6.994 s
|
||||
Key Generation Time: 0.023 s
|
||||
Encoding and Encryption Time: 9.675 s
|
||||
Computation Time: 1.814 s
|
||||
Decryption & Decoding Time: 0.159 s
|
||||
End-to-end Runtime: 11.974 s
|
||||
|
||||
@ -156,6 +156,7 @@ int main(int argc, char *argv[]) {
|
||||
double computationTime(0.0);
|
||||
double decryptionTime(0.0);
|
||||
double endToEndTime(0.0);
|
||||
double ioTime(0.0);
|
||||
|
||||
//usint m = 16384;
|
||||
usint m = 65536;
|
||||
@ -200,7 +201,7 @@ int main(int argc, char *argv[]) {
|
||||
int file_start = node_start + (batch_size*i);
|
||||
|
||||
std::cout << "Node " << world.rank() << " running batch " << i << " with batch size " << batch_gen << std::endl;
|
||||
RunChi2(SNPDir, SNPFileName, pValue, Runtime, std::to_string(batch_gen), SNPs, file_start, keyGenTime, encryptionTime, computationTime, decryptionTime, endToEndTime, cc, keyPair, i, world);
|
||||
RunChi2(SNPDir, SNPFileName, pValue, Runtime, std::to_string(batch_gen), SNPs, file_start, keyGenTime, encryptionTime, computationTime, decryptionTime, endToEndTime, ioTime, cc, keyPair, i, world);
|
||||
}
|
||||
|
||||
std::cout << "Node " << world.rank() << " completed all batches." << std::endl;
|
||||
@ -211,6 +212,8 @@ int main(int argc, char *argv[]) {
|
||||
world.isend(0, 2, computationTime);
|
||||
world.isend(0, 3, decryptionTime);
|
||||
world.isend(0, 4, endToEndTime);
|
||||
world.isend(0, 5, ioTime);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -218,7 +221,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
if (world.rank() == 0){
|
||||
std::vector<double> task_times;
|
||||
for (int task = 0; task < 5; task++){
|
||||
for (int task = 0; task < 6; task++){
|
||||
task_times.push_back(0);
|
||||
}
|
||||
task_times.at(0) += keyGenTime;
|
||||
@ -226,9 +229,12 @@ int main(int argc, char *argv[]) {
|
||||
task_times.at(2)= computationTime;
|
||||
task_times.at(3) = decryptionTime;
|
||||
task_times.at(4) = endToEndTime;
|
||||
task_times.at(5) = ioTime;
|
||||
|
||||
|
||||
|
||||
if (world.size() > 1){
|
||||
for (int j = 0; j < 5; j++){
|
||||
for (int j = 0; j < 6; j++){
|
||||
while (world.iprobe(mpi::any_source, j)){
|
||||
double tmp;
|
||||
world.recv(mpi::any_source, j, tmp);
|
||||
@ -241,6 +247,7 @@ int main(int argc, char *argv[]) {
|
||||
std::cout << "Total Encoding and Encryption Time: \t" << task_times.at(1)/1000 << " s" << std::endl;
|
||||
std::cout << "Total Computation Time: \t\t" << task_times.at(2)/1000 << " s" << std::endl;
|
||||
std::cout << "Total Decryption & Decoding Time: \t" << task_times.at(3)/1000 << " s" << std::endl;
|
||||
std::cout << "Total File IO Time: \t\t\t" << task_times.at(5)/1000 << " s" << std::endl;
|
||||
std::cout << "Total End-to-end Runtime: \t\t" << task_times.at(4)/1000 << " s" << std::endl;
|
||||
|
||||
}
|
||||
@ -250,7 +257,8 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
void RunChi2(const string &SNPDir,
|
||||
const string &SNPFileName, const string &pValue, const string &Runtime, const string &SampleSize, const string &SNPs,
|
||||
size_t file_start, double &keyGenTime, double &encryptionTime, double &computationTime, double &decryptionTime, double &endToEndTime,
|
||||
size_t file_start,
|
||||
double &keyGenTime, double &encryptionTime, double &computationTime, double &decryptionTime, double &endToEndTime, double &ioTime,
|
||||
CryptoContext<DCRTPoly> &cc, auto &keyPair, int batch_num, mpi::communicator &world) {
|
||||
|
||||
TimeVar t;
|
||||
@ -271,7 +279,9 @@ void RunChi2(const string &SNPDir,
|
||||
usint m = 65536;
|
||||
double scalingFactor = 2.5e-6;
|
||||
|
||||
TIC(t);
|
||||
ReadSNPFile(headersS,sData,yData,SNPDir + "/" + SNPFileName,N,M, file_start);
|
||||
ioTime += TOC(t);
|
||||
|
||||
TIC(t);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ const double EPSILON = 1.0E-08;
|
||||
void RunChi2(const string &SNPDir,
|
||||
const string &SNPFileName, const string &pValue, const string &Runtime, const string &SampleSize, const string &SNPs,
|
||||
size_t file_start,
|
||||
double &keyGenTime, double &encryptionTime, double &computationTime, double &decryptionTime, double &endToEndTime,
|
||||
double &keyGenTime, double &encryptionTime, double &computationTime, double &decryptionTime, double &endToEndTime, double &ioTime,
|
||||
CryptoContext<DCRTPoly> &cc, auto &keyPair, int batch_num, mpi::communicator &world);
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user