MPI + CUDA, SLURM
Financial Transactions Dataset: Analytics
Table of Contents
1. Task
Dataset: 💳 Financial Transactions Dataset: Analytics | Kaggle
These are computer translated notes, just read the report.
1.1. The general part
The general part of the wording is as follows. It is necessary to develop (and test) a parallel application using the capabilities of MPI and CUDA, optionally also OpenMP. Programming language: C and/or C++. The application should run as a task in the SLURM manager and use all possible computing resources (processors/cores/threads, CUDA accelerators) of those nodes on which the dispatcher sent the task to. It is necessary to prepare a report on the completion of the work. For the design and structure, it is necessary to use GOST 7.32.
1.2. Personal part
We filter the data, work only with credit_limit >=
$12,000, group the data by city (merchant_city) and aggregate the amount
spending (amount) of the client (client_id) by month (date), output to a file
100 clients with the highest expenses relative to per capita income per
month (per_capita_income/12).
1.3. The algorithm
- Filtering load of
cards_data.csv, wherecredit_limit >= $12,000 - Filtering load of
transactions_data.csv, wherecard_idwas uploaded in step 1 - Grouping data from
transactions_data.csvbymerchant_city - For each client in the group, we sum
amountby month ingroup.client.month.sum - For each client and month in the group
group.client.date.sum /= ~client.per_capita_income/12 - We sort the group's clients by
group.client.sum.sum(it's enough to sort the top 100) - We output the first 100 customers of the group (in the format
merchant_city,client_id,group.client.date.sum)- Optional filtering load of
users_data.csv, whereclient_idended up in the top 100 (to pretty print results and not just IDs).
- Optional filtering load of
That is, for each city we want to get the top 100 clients / month (for which and on which cards some nuances are applied).
1.4. On the supercomputer center
4 nodes, each with 2 cores. 2 of the 4 nodes have a GPU.
- 8 threads simultaneously load their part of
cards_data.csv. - 8 threads exchange loaded hash maps.
- 8 threads upload their part
transactions_data.csv(SoA key value). Be careful, the loaded data will be split among all GPUs, transactions from the same month should not end up on multiple GPUs! - For each main CPU thread on the GPU node: 3 other threads send
loaded transactions to it. It starts on the GPU
radix_sort_by_key,reduce(sum of grouped data). - 8 threads simultaneously load their part of
users_data.csv. (you can do it while we are working on the GPU) - User data is sent to the GPU nodes. (you can do it while we are working on GPU)
- For each GPU node: 2 threads normalize the amounts received (using a hash map with user data).
- For each GPU node: 2 threads are searching for the top 100 in their part of the data (minheap AoS key value)
- For each GPU node: the top 100 threads are combined (minheap)
- The top 100 GPU nodes are combined. (minheap)
2. Documentation
The exported report can be found at this link.
3. Unlicense
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to https://unlicense.org/
Date: 2025H2
Created: 2026-11-10 Tue 11:28
