Changing timing from TICTOC to gettimeofday
This commit is contained in:
parent
dfe2f7b3cf
commit
7e2e283529
@ -32,7 +32,7 @@ CMAKE_AR:FILEPATH=/usr/bin/ar
|
||||
|
||||
//Choose the type of build, options are: None Debug Release RelWithDebInfo
|
||||
// MinSizeRel ...
|
||||
CMAKE_BUILD_TYPE:STRING=
|
||||
CMAKE_BUILD_TYPE:STRING=RELEASE
|
||||
|
||||
//Enable/Disable color output during build.
|
||||
CMAKE_COLOR_MAKEFILE:BOOL=ON
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -6,5 +6,5 @@ CXX_DEFINES = -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_
|
||||
|
||||
CXX_INCLUDES = -I/home/noah/Documents/School/CS-6643-Bioinformatics/CS-6643-Bioinformatics-Research-Project/Code/Duality_Technologies/PALISADE/install/include/palisade -I/home/noah/Documents/School/CS-6643-Bioinformatics/CS-6643-Bioinformatics-Research-Project/Code/Duality_Technologies/PALISADE/install/include/palisade/core -I/home/noah/Documents/School/CS-6643-Bioinformatics/CS-6643-Bioinformatics-Research-Project/Code/Duality_Technologies/PALISADE/install/include/palisade/pke
|
||||
|
||||
CXX_FLAGS = -Wall -Werror -O3 -DPALISADE_VERSION=1.11.8 -Wno-parentheses -DMATHBACKEND=2 -fopenmp -fopenmp -std=c++20
|
||||
CXX_FLAGS = -Wall -Werror -O3 -DPALISADE_VERSION=1.11.8 -Wno-parentheses -DMATHBACKEND=2 -fopenmp -fopenmp -O3 -DNDEBUG -O1 -fopenmp -std=c++20
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
/usr/bin/c++ -Wall -Werror -O3 -DPALISADE_VERSION=1.11.8 -Wno-parentheses -DMATHBACKEND=2 -fopenmp -fopenmp -Wl,-rpath -Wl,/usr/lib -Wl,--enable-new-dtags "CMakeFiles/demo-chi2.dir/demo-chi2.cpp.o" "CMakeFiles/demo-chi2.dir/avail_mem.cpp.o" -o demo-chi2 -L/home/noah/Documents/School/CS-6643-Bioinformatics/CS-6643-Bioinformatics-Research-Project/Code/Duality_Technologies/PALISADE/install/lib -Wl,-rpath,/home/noah/Documents/School/CS-6643-Bioinformatics/CS-6643-Bioinformatics-Research-Project/Code/Duality_Technologies/PALISADE/build/lib:/home/noah/Documents/School/CS-6643-Bioinformatics/CS-6643-Bioinformatics-Research-Project/Code/Duality_Technologies/PALISADE/install/lib /home/noah/Documents/School/CS-6643-Bioinformatics/CS-6643-Bioinformatics-Research-Project/Code/Duality_Technologies/PALISADE/build/lib/libPALISADEpke.so.1.11.8 /home/noah/Documents/School/CS-6643-Bioinformatics/CS-6643-Bioinformatics-Research-Project/Code/Duality_Technologies/PALISADE/build/lib/libPALISADEbinfhe.so.1.11.8 -fopenmp /usr/lib/libboost_mpi.so.1.80.0 /usr/lib/libmpi_cxx.so /usr/lib/libmpi.so /home/noah/Documents/School/CS-6643-Bioinformatics/CS-6643-Bioinformatics-Research-Project/Code/Duality_Technologies/PALISADE/build/lib/libPALISADEcore.so.1.11.8 -fopenmp /usr/lib/libboost_serialization.so.1.80.0 /usr/lib/libmpi_cxx.so /usr/lib/libmpi.so
|
||||
/usr/bin/c++ -Wall -Werror -O3 -DPALISADE_VERSION=1.11.8 -Wno-parentheses -DMATHBACKEND=2 -fopenmp -fopenmp -O3 -DNDEBUG -O1 -fopenmp -Wl,-rpath -Wl,/usr/lib -Wl,--enable-new-dtags "CMakeFiles/demo-chi2.dir/demo-chi2.cpp.o" "CMakeFiles/demo-chi2.dir/avail_mem.cpp.o" -o demo-chi2 -L/home/noah/Documents/School/CS-6643-Bioinformatics/CS-6643-Bioinformatics-Research-Project/Code/Duality_Technologies/PALISADE/install/lib -Wl,-rpath,/home/noah/Documents/School/CS-6643-Bioinformatics/CS-6643-Bioinformatics-Research-Project/Code/Duality_Technologies/PALISADE/build/lib:/home/noah/Documents/School/CS-6643-Bioinformatics/CS-6643-Bioinformatics-Research-Project/Code/Duality_Technologies/PALISADE/install/lib /home/noah/Documents/School/CS-6643-Bioinformatics/CS-6643-Bioinformatics-Research-Project/Code/Duality_Technologies/PALISADE/build/lib/libPALISADEpke.so.1.11.8 /home/noah/Documents/School/CS-6643-Bioinformatics/CS-6643-Bioinformatics-Research-Project/Code/Duality_Technologies/PALISADE/build/lib/libPALISADEbinfhe.so.1.11.8 -fopenmp /usr/lib/libboost_mpi.so.1.80.0 /usr/lib/libmpi_cxx.so /usr/lib/libmpi.so /home/noah/Documents/School/CS-6643-Bioinformatics/CS-6643-Bioinformatics-Research-Project/Code/Duality_Technologies/PALISADE/build/lib/libPALISADEcore.so.1.11.8 -fopenmp /usr/lib/libboost_serialization.so.1.80.0 /usr/lib/libmpi_cxx.so /usr/lib/libmpi.so
|
||||
|
||||
@ -12,7 +12,7 @@ if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_CONFIG_NAME "")
|
||||
set(CMAKE_INSTALL_CONFIG_NAME "RELEASE")
|
||||
endif()
|
||||
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
endif()
|
||||
|
||||
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.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
|
||||
Key Generation Time: 0.02361 s
|
||||
Encoding and Encryption Time: 9.65614 s
|
||||
Computation Time: 1.80108 s
|
||||
Decryption & Decoding Time: 0.159233 s
|
||||
End-to-end Runtime: 11.9779 s
|
||||
|
||||
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 +0,0 @@
|
||||
Key Generation Time: 0.029 s
|
||||
Encoding and Encryption Time: 5.157 s
|
||||
Computation Time: 1.37 s
|
||||
Decryption & Decoding Time: 0.209 s
|
||||
End-to-end Runtime: 6.988 s
|
||||
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 +0,0 @@
|
||||
Key Generation Time: 0.023 s
|
||||
Encoding and Encryption Time: 9.686 s
|
||||
Computation Time: 1.842 s
|
||||
Decryption & Decoding Time: 0.159 s
|
||||
End-to-end Runtime: 12.014 s
|
||||
@ -183,12 +183,13 @@ int main(int argc, char *argv[]) {
|
||||
cc->Enable(SHE);
|
||||
cc->Enable(LEVELEDSHE);
|
||||
|
||||
TimeVar t;
|
||||
TIC(t);
|
||||
|
||||
struct timeval t1,t2;
|
||||
gettimeofday(&t1,NULL);
|
||||
auto keyPair = cc->KeyGen();
|
||||
gettimeofday(&t2,NULL);
|
||||
|
||||
keyGenTime += (t2.tv_sec-t1.tv_sec)*1000.0+(t2.tv_usec-t1.tv_usec)/1000.0;
|
||||
|
||||
keyGenTime += TOC(t);
|
||||
|
||||
for (int i = 0; i < std::ceil((double)node_samples/(double)batch_size); i++)
|
||||
{
|
||||
@ -213,8 +214,6 @@ int main(int argc, char *argv[]) {
|
||||
world.isend(0, 3, decryptionTime);
|
||||
world.isend(0, 4, endToEndTime);
|
||||
world.isend(0, 5, ioTime);
|
||||
|
||||
|
||||
}
|
||||
|
||||
world.barrier();
|
||||
@ -225,11 +224,11 @@ int main(int argc, char *argv[]) {
|
||||
task_times.push_back(0);
|
||||
}
|
||||
task_times.at(0) += keyGenTime;
|
||||
task_times.at(1) = encryptionTime;
|
||||
task_times.at(2)= computationTime;
|
||||
task_times.at(3) = decryptionTime;
|
||||
task_times.at(4) = endToEndTime;
|
||||
task_times.at(5) = ioTime;
|
||||
task_times.at(1) += encryptionTime;
|
||||
task_times.at(2) += computationTime;
|
||||
task_times.at(3) += decryptionTime;
|
||||
task_times.at(4) += endToEndTime;
|
||||
task_times.at(5) += ioTime;
|
||||
|
||||
|
||||
|
||||
@ -243,12 +242,12 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "\nTotal Key Generation Time: \t\t" << task_times.at(0)/1000 << " s" << std::endl;
|
||||
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;
|
||||
std::cout << "\nTotal Key Generation Time: \t\t" << task_times.at(0)/1000.0 << " s" << std::endl;
|
||||
std::cout << "Total Encoding and Encryption Time: \t" << task_times.at(1)/1000.0 << " s" << std::endl;
|
||||
std::cout << "Total Computation Time: \t\t" << task_times.at(2)/1000.0 << " s" << std::endl;
|
||||
std::cout << "Total Decryption & Decoding Time: \t" << task_times.at(3)/1000.0 << " s" << std::endl;
|
||||
std::cout << "Total File IO Time: \t\t\t" << task_times.at(5)/1000.0 << " s" << std::endl;
|
||||
std::cout << "Total End-to-end Runtime: \t\t" << task_times.at(4)/1000.0 << " s" << std::endl;
|
||||
|
||||
}
|
||||
|
||||
@ -261,10 +260,8 @@ void RunChi2(const string &SNPDir,
|
||||
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;
|
||||
TimeVar tAll;
|
||||
|
||||
TIC(tAll);
|
||||
struct timeval t1,t2;
|
||||
gettimeofday(&t1,NULL);
|
||||
|
||||
//std::cout << "\n======CHI-SQUARE SOLUTION========\n" << std::endl;
|
||||
|
||||
@ -279,12 +276,14 @@ void RunChi2(const string &SNPDir,
|
||||
usint m = 65536;
|
||||
double scalingFactor = 2.5e-6;
|
||||
|
||||
TIC(t);
|
||||
struct timeval t3,t4;
|
||||
gettimeofday(&t3,NULL);
|
||||
ReadSNPFile(headersS,sData,yData,SNPDir + "/" + SNPFileName,N,M, file_start);
|
||||
ioTime += TOC(t);
|
||||
|
||||
TIC(t);
|
||||
gettimeofday(&t4,NULL);
|
||||
ioTime += (t4.tv_sec-t3.tv_sec)*1000.0+(t4.tv_usec-t3.tv_usec)/1000.0;
|
||||
|
||||
struct timeval t5,t6;
|
||||
gettimeofday(&t5,NULL);
|
||||
size_t sizeS = (size_t)std::ceil((double)sData[0].size()/(m/4));
|
||||
|
||||
std::vector<std::vector<std::vector<std::complex<double>>>> sDataArray(sizeS);
|
||||
@ -325,10 +324,11 @@ void RunChi2(const string &SNPDir,
|
||||
Y[i] = cc->Encrypt(keyPair.publicKey, sTemp2);
|
||||
}
|
||||
|
||||
encryptionTime += TOC(t);
|
||||
|
||||
TIC(t);
|
||||
gettimeofday(&t6,NULL);
|
||||
encryptionTime += (t6.tv_sec-t5.tv_sec)*1000.0+(t6.tv_usec-t5.tv_usec)/1000.0;
|
||||
|
||||
struct timeval t7,t8;
|
||||
gettimeofday(&t7,NULL);
|
||||
Plaintext d = cc->MakeCKKSPackedPlaintext(std::vector<std::complex<double>>(m/4,2*N));
|
||||
d->SetFormat(EVALUATION);
|
||||
|
||||
@ -420,9 +420,11 @@ void RunChi2(const string &SNPDir,
|
||||
|
||||
}
|
||||
|
||||
computationTime += TOC(t);
|
||||
gettimeofday(&t8,NULL);
|
||||
computationTime += (t8.tv_sec-t7.tv_sec)*1000.0+(t8.tv_usec-t7.tv_usec)/1000.0;
|
||||
|
||||
TIC(t);
|
||||
struct timeval t9,t10;
|
||||
gettimeofday(&t9,NULL);
|
||||
|
||||
std::vector<Plaintext> pN(sizeS);
|
||||
std::vector<Plaintext> pD(sizeS);
|
||||
@ -436,7 +438,8 @@ void RunChi2(const string &SNPDir,
|
||||
cc->Decrypt(keyPair.secretKey, orD[s] , &(oddD[s]));
|
||||
}
|
||||
|
||||
decryptionTime += TOC(t);
|
||||
gettimeofday(&t10,NULL);
|
||||
decryptionTime += (t10.tv_sec-t9.tv_sec)*1000.0+(t10.tv_usec-t9.tv_usec)/1000.0;
|
||||
|
||||
std::vector<double> chival(headersS.size());
|
||||
std::vector<double> pval(headersS.size());
|
||||
@ -491,7 +494,8 @@ void RunChi2(const string &SNPDir,
|
||||
//std::cout << "Computation Time: \t\t" << computationTime/1000 << " s" << std::endl;
|
||||
//std::cout << "Decryption & Decoding Time: \t" << decryptionTime/1000 << " s" << std::endl;
|
||||
|
||||
endToEndTime += TOC(tAll);
|
||||
gettimeofday(&t2,NULL);
|
||||
endToEndTime += (t2.tv_sec-t1.tv_sec)*1000.0+(t2.tv_usec-t1.tv_usec)/1000.0;
|
||||
|
||||
//std::cout << "\nEnd-to-end Runtime: \t\t" << endToEndTime/1000 << " s" << std::endl;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user