diff options
| author | 2026-11-10 08:29:58 +0000 | |
|---|---|---|
| committer | 2026-11-10 08:33:56 +0000 | |
| commit | 776276d5c7e67356a880f3e31076d32cdc1c1882 (patch) | |
| tree | cbde131f3d46338adee9c67ac0f988295736bdd4 /README.org | |
| download | coursework-776276d5c7e67356a880f3e31076d32cdc1c1882.tar.gz | |
Diffstat (limited to 'README.org')
| -rw-r--r-- | README.org | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/README.org b/README.org new file mode 100644 index 0000000..a5f73d2 --- /dev/null +++ b/README.org | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | #+title: MPI + CUDA, SLURM | ||
| 2 | #+subtitle: Financial Transactions Dataset: Analytics | ||
| 3 | #+date: 2025H2 | ||
| 4 | |||
| 5 | * Task | ||
| 6 | Dataset: [[https://www.kaggle.com/datasets/computingvictor/transactions-fraud-datasets ][💳 Financial Transactions Dataset: Analytics | Kaggle]] | ||
| 7 | |||
| 8 | #+begin_note | ||
| 9 | These are computer translated notes, just read the report. | ||
| 10 | #+end_note | ||
| 11 | |||
| 12 | ** The general part | ||
| 13 | The general part of the wording is as follows. It is necessary to | ||
| 14 | develop (and test) a parallel application using the capabilities of | ||
| 15 | *MPI* and *CUDA*, optionally also *OpenMP*. Programming language: *C* and/or | ||
| 16 | *C++*. The application should run as a task in the *SLURM* manager and | ||
| 17 | use all possible computing resources (processors/cores/threads, CUDA | ||
| 18 | accelerators) of those nodes on which the dispatcher sent the task to. | ||
| 19 | It is necessary to prepare a report on the completion of the work. For | ||
| 20 | the design and structure, it is necessary to use *GOST 7.32*. | ||
| 21 | |||
| 22 | ** Personal part | ||
| 23 | We filter the data, work only with ~credit_limit >= | ||
| 24 | $12,000~, group the data by city (=merchant_city=) and aggregate the amount | ||
| 25 | spending (=amount=) of the client (=client_id=) by month (=date=), output to a file | ||
| 26 | *100* clients with the highest expenses relative to per capita income per | ||
| 27 | month (~per_capita_income/12~). | ||
| 28 | |||
| 29 | ** The algorithm | ||
| 30 | 1. Filtering load of =cards_data.csv=, where ~credit_limit >= $12,000~ | ||
| 31 | 2. Filtering load of =transactions_data.csv=, where =card_id= was uploaded in step 1 | ||
| 32 | 3. Grouping data from =transactions_data.csv= by =merchant_city= | ||
| 33 | 4. For each client in the group, we sum ~amount~ by month in | ||
| 34 | ~group.client.month.sum~ | ||
| 35 | 5. For each client and month in the group ~group.client.date.sum /= | ||
| 36 | ~client.per_capita_income/12~ | ||
| 37 | 6. We sort the group's clients by ~group.client.sum.sum~ (it's enough to | ||
| 38 | sort the top *100*) | ||
| 39 | 7. We output the first *100* customers of the group (in the format | ||
| 40 | =merchant_city=, =client_id=, =group.client.date.sum=) | ||
| 41 | 1. Optional filtering load of =users_data.csv=, where =client_id= ended | ||
| 42 | up in the top 100 (to pretty print results and not just IDs). | ||
| 43 | |||
| 44 | That is, for each city we want to get the top 100 clients / month (for | ||
| 45 | which and on which cards some nuances are applied). | ||
| 46 | |||
| 47 | ** On the supercomputer center | ||
| 48 | 4 nodes, each with 2 cores. 2 of the 4 nodes have a GPU. | ||
| 49 | |||
| 50 | 1. 8 threads simultaneously load their part of =cards_data.csv=. | ||
| 51 | 2. 8 threads exchange loaded hash maps. | ||
| 52 | 3. 8 threads upload their part =transactions_data.csv= (SoA key value). | ||
| 53 | Be careful, the loaded data will be split among all GPUs, | ||
| 54 | transactions from the same month should not end up on multiple | ||
| 55 | GPUs! | ||
| 56 | 4. For each main CPU thread on the GPU node: 3 other threads send | ||
| 57 | loaded transactions to it. It starts on the GPU ~radix_sort_by_key~, | ||
| 58 | ~reduce~ (sum of grouped data). | ||
| 59 | 5. 8 threads simultaneously load their part of =users_data.csv=. (you | ||
| 60 | can do it while we are working on the GPU) | ||
| 61 | 6. User data is sent to the GPU nodes. (you can do it while we are | ||
| 62 | working on GPU) | ||
| 63 | 7. For each GPU node: 2 threads normalize the amounts received (using | ||
| 64 | a hash map with user data). | ||
| 65 | 8. For each GPU node: 2 threads are searching for the top 100 in their | ||
| 66 | part of the data (min_heap AoS key value) | ||
| 67 | 9. For each GPU node: the top 100 threads are combined (min_heap) | ||
| 68 | 10. The top 100 GPU nodes are combined. (min_heap) | ||
| 69 | |||
| 70 | * Documentation | ||
| 71 | :PROPERTIES: | ||
| 72 | :CUSTOM_ID: documentation | ||
| 73 | :END: | ||
| 74 | The exported report can be found at [[https://git.michalec.dev/files/uni/term-07/supercomp-arch/coursework/report.pdf][this link]]. | ||
| 75 | |||
| 76 | * Unlicense | ||
| 77 | :PROPERTIES: | ||
| 78 | :CUSTOM_ID: unlicense | ||
| 79 | :END: | ||
| 80 | #+include: UNLICENSE verse | ||
