{"id":17744026,"url":"https://github.com/andreibarsan/mpi-hpc","last_synced_at":"2025-04-01T01:45:20.555Z","repository":{"id":142990413,"uuid":"150038252","full_name":"AndreiBarsan/mpi-hpc","owner":"AndreiBarsan","description":"Several HPC numerical algorithms implemented in C++ using MPI.","archived":false,"fork":false,"pushed_at":"2019-02-09T02:56:43.000Z","size":188,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-15T23:10:18.369Z","etag":null,"topics":["eigen3","high-performance-computing","numerical-methods","openmpi"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndreiBarsan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-24T00:38:11.000Z","updated_at":"2019-02-10T02:07:17.000Z","dependencies_parsed_at":"2023-07-16T15:45:31.741Z","dependency_job_id":null,"html_url":"https://github.com/AndreiBarsan/mpi-hpc","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiBarsan%2Fmpi-hpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiBarsan%2Fmpi-hpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiBarsan%2Fmpi-hpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiBarsan%2Fmpi-hpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndreiBarsan","download_url":"https://codeload.github.com/AndreiBarsan/mpi-hpc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246569006,"owners_count":20798341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eigen3","high-performance-computing","numerical-methods","openmpi"],"created_at":"2024-10-26T06:41:45.542Z","updated_at":"2025-04-01T01:45:20.531Z","avatar_url":"https://github.com/AndreiBarsan.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Distributed Solvers for Large Systems Using MPI\n\n## Overview\n\nThese assignments consist mostly of MPI code implemented in C++, plus some\nPython used to analyze the experimental results and create the plots. I wrote\nthis code for coursework during my PhD.\n\n## Getting Started\n\nThe code requires Open MPI, CMake 3.5 (not super new), gflags, and Eigen. The\nto be installed, as well as a C++14-compatible compiler\n(the g++ on UofT's CDF is OK). Several C++14 features are used, such as\n`make_shared\u003cT[]\u003e`, but slightly older compilers should still support it.\n\n\n### Dependencies\n\n - `Open MPI` for the bread and butter for distributed multiprocessing.\n - `gflags` for clean declarative argument parsing.\n```bash\ngit clone https://github.com/gflags/gflags \u0026\u0026 cd gflags \u0026\u0026 mkdir build\ncd build \u0026\u0026 cmake -DEXPORT_BUILD_DIR=ON .. \u0026\u0026 make -j4\n```\n - Eigen 3 is *required* for Assignment 3, but optional for the previous two!\n   A reasonably new version can be installed on a Debian-like distribution by\n   running `sudo apt install libeigen3-dev`. Note that Eigen3 is a header-only\n   library, so it doesn't need to be compiled separately or linked, just included. \n - (Optional) Python 3 for analyzing the data and producing the plots. The Python package dependencies are\n specified in the `requirements.txt` file, which can be loaded easily into any virtual or Anaconda environment.\n - (Optional) For Assignment 2, Eigen 3 can enable additional checks by comparing the results produced by the custom\n solver with those produced by an industry-standard solver provided by Eigen. \n\n\n### Running the Code\n\nTo build the code and run some of the Assignment 01 experiments, simply use the\n`a01-local.sh` script.  This runs MPI locally. For best results, use\na computing cluster like U of T's CDF.\n\nA possible sequence of actions could be:\n\n```bash\n./a01-02-local.sh                       # This builds the code if necessary and starts an experiment.\nvirtualenv ~/.venv/hpsc                 # Create a virtual environment for the Python packages.\nsource ~/.venv/hpsc/bin/activate        # Activate the virtual environment.\npip install -r requirements.txt         # Install the dependencies.\ncd src/a01\npython analysis.py                      # Run the analysis script (may need to modify what directory it reads from).\n```\n\n#### Assignment 1\n\nUse `a01-04-local.sh` to run Problem 4 locally.\n\nTo run either Problem 2 or Problem 4 on CDF, first run `gen_node_list.sh` to find free machines, then `a01.sh`.\nModify `PROBLEM` in the preamble of `a01.sh` to choose what problem to run (2 or 4).\n\n\n#### Assignment 3\n\nUse `./a03-02-deboor.sh` to run the second problem and dump experiment results.\nYou system should have 16+ cores for this to work; otherwise, the script should\nbe modified to use a computing cluster, such as UofT's CDF.\n\nUse `python src/a03/plot_output_2d.py results/spline_2d_output` to visualize\nthe interpolation results, after running the experiments using the scripts\nabove. Warning: may open many plot windows.\n\nUse `python src/a03/plot_timing.py results/spline_2d_output` to generate the\ntiming plots from the report.\n\n\n\n## Project Structure\n\nThe `src` directory contains all the useful source code grouped by assignment (1--3), with a `common` directory\ncontaining some shared utilities. The source code includes the actual C++ assignment code, plus the Python\nscripts used for analysis, plotting, and some other smaller exercises.\n\nThe `results` directory will contain experiment results.\n\nThe `config` directory contains configuration files such as (potentially dynamically generated) lists of machines to\nrun the MPI code on.\n\n\n## A Few MPI Hints and Tips\n\n * Make keeping track of which node is outputting what by passing the\n `--tag-output` flag to `mpirun`, thereby ensuring that every output\n line is prefixed with the ID of the node. `--timestamp-output` is\n self-explanatory and a nice addition, especially if you're not already\n using a dedicated logging library like `glog`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreibarsan%2Fmpi-hpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreibarsan%2Fmpi-hpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreibarsan%2Fmpi-hpc/lists"}