I have implemented parallel versions of the executeQueryInsertSerial function for both OpenMP and MPI execution engines.
- Updated
makefileto include build targets forQPEOMPandQPEMPI. - Linked
QPEOMPwithengine/omp/executeEngine-omp.c. - Linked
QPEMPIwithengine/mpi/executeEngine-mpi.c.
- File:
engine/omp/executeEngine-omp.c - Function:
executeQueryInsertSerial - Parallelization: Used
#pragma omp parallel forto parallelize the B+ tree index updates. Each index is updated in a separate thread, as they are independent. - Verification: Successfully built
QPEOMPand ran sample queries. The output confirms correct insertion and query execution.
- File:
engine/mpi/executeEngine-mpi.c - Function:
executeQueryInsertSerial - Parallelization: Implemented a distributed index update strategy.
- Rank 0: Handles file I/O (appending to CSV) to ensure data integrity.
- All Ranks: Update their local in-memory record list.
- Distributed Indexing: Indexes are distributed among ranks using
i % size == rank. Each rank updates only its assigned indexes.
- Verification: The code is implemented, but verification was skipped because
mpiccwas not found in the current environment.
make QPEOMP
./QPEOMPEnsure mpicc is in your PATH.
make QPEMPI
mpirun -np 4 ./QPEMPINote
If make all fails due to missing mpicc, you can still build the OpenMP version using make QPEOMP.