aboutsummaryrefslogtreecommitdiff
path: root/README.org
diff options
context:
space:
mode:
authorLibravatar Martin Michalec <martin@michalec.dev>2026-11-10 08:29:58 +0000
committerLibravatar Martin Michalec <martin@michalec.dev>2026-11-10 08:33:56 +0000
commit776276d5c7e67356a880f3e31076d32cdc1c1882 (patch)
treecbde131f3d46338adee9c67ac0f988295736bdd4 /README.org
downloadcoursework-master.tar.gz
publishHEADmaster
Diffstat (limited to 'README.org')
-rw-r--r--README.org80
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
6Dataset: [[https://www.kaggle.com/datasets/computingvictor/transactions-fraud-datasets ][💳 Financial Transactions Dataset: Analytics | Kaggle]]
7
8#+begin_note
9These are computer translated notes, just read the report.
10#+end_note
11
12** The general part
13The general part of the wording is as follows. It is necessary to
14develop (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
17use all possible computing resources (processors/cores/threads, CUDA
18accelerators) of those nodes on which the dispatcher sent the task to.
19It is necessary to prepare a report on the completion of the work. For
20the design and structure, it is necessary to use *GOST 7.32*.
21
22** Personal part
23We filter the data, work only with ~credit_limit >=
24$12,000~, group the data by city (=merchant_city=) and aggregate the amount
25spending (=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
27month (~per_capita_income/12~).
28
29** The algorithm
301. Filtering load of =cards_data.csv=, where ~credit_limit >= $12,000~
312. Filtering load of =transactions_data.csv=, where =card_id= was uploaded in step 1
323. Grouping data from =transactions_data.csv= by =merchant_city=
334. For each client in the group, we sum ~amount~ by month in
34 ~group.client.month.sum~
355. For each client and month in the group ~group.client.date.sum /=
36 ~client.per_capita_income/12~
376. We sort the group's clients by ~group.client.sum.sum~ (it's enough to
38 sort the top *100*)
397. 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
44That is, for each city we want to get the top 100 clients / month (for
45which and on which cards some nuances are applied).
46
47** On the supercomputer center
484 nodes, each with 2 cores. 2 of the 4 nodes have a GPU.
49
501. 8 threads simultaneously load their part of =cards_data.csv=.
512. 8 threads exchange loaded hash maps.
523. 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!
564. 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).
595. 8 threads simultaneously load their part of =users_data.csv=. (you
60 can do it while we are working on the GPU)
616. User data is sent to the GPU nodes. (you can do it while we are
62 working on GPU)
637. For each GPU node: 2 threads normalize the amounts received (using
64 a hash map with user data).
658. For each GPU node: 2 threads are searching for the top 100 in their
66 part of the data (min_heap AoS key value)
679. For each GPU node: the top 100 threads are combined (min_heap)
6810. The top 100 GPU nodes are combined. (min_heap)
69
70* Documentation
71:PROPERTIES:
72:CUSTOM_ID: documentation
73:END:
74The 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