You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have implemented parallel versions of the `executeQueryInsertSerial` function for both OpenMP and MPI execution engines.
4
+
5
+
## Changes
6
+
7
+
### Makefile
8
+
- Updated `makefile` to include build targets for `QPEOMP` and `QPEMPI`.
9
+
- Linked `QPEOMP` with `engine/omp/executeEngine-omp.c`.
10
+
- Linked `QPEMPI` with `engine/mpi/executeEngine-mpi.c`.
11
+
12
+
### OpenMP Implementation
13
+
-**File**: `engine/omp/executeEngine-omp.c`
14
+
-**Function**: `executeQueryInsertSerial`
15
+
-**Parallelization**: Used `#pragma omp parallel for` to parallelize the B+ tree index updates. Each index is updated in a separate thread, as they are independent.
16
+
-**Verification**: Successfully built `QPEOMP` and ran sample queries. The output confirms correct insertion and query execution.
17
+
18
+
### MPI Implementation
19
+
-**File**: `engine/mpi/executeEngine-mpi.c`
20
+
-**Function**: `executeQueryInsertSerial`
21
+
-**Parallelization**: Implemented a distributed index update strategy.
22
+
-**Rank 0**: Handles file I/O (appending to CSV) to ensure data integrity.
23
+
-**All Ranks**: Update their local in-memory record list.
24
+
-**Distributed Indexing**: Indexes are distributed among ranks using `i % size == rank`. Each rank updates only its assigned indexes.
25
+
-**Verification**: The code is implemented, but verification was skipped because `mpicc` was not found in the current environment.
26
+
27
+
## How to Run
28
+
29
+
### OpenMP
30
+
```bash
31
+
make QPEOMP
32
+
./QPEOMP
33
+
```
34
+
35
+
### MPI
36
+
Ensure `mpicc` is in your PATH.
37
+
```bash
38
+
make QPEMPI
39
+
mpirun -np 4 ./QPEMPI
40
+
```
41
+
42
+
> [!NOTE]
43
+
> If `make all` fails due to missing `mpicc`, you can still build the OpenMP version using `make QPEOMP`.
0 commit comments