{"id":23236711,"url":"https://github.com/smt116/zjp-problems","last_synced_at":"2025-08-19T23:30:50.592Z","repository":{"id":150519335,"uuid":"13701934","full_name":"smt116/zjp-problems","owner":"smt116","description":"Monte Carlo, Matrix multiplication, Computing Integral - sequential and parallel (MPI) programs.","archived":false,"fork":false,"pushed_at":"2013-10-21T12:54:23.000Z","size":248,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-14T15:03:28.587Z","etag":null,"topics":[],"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/smt116.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}},"created_at":"2013-10-19T13:59:13.000Z","updated_at":"2013-10-24T18:01:51.000Z","dependencies_parsed_at":"2023-04-04T03:22:23.487Z","dependency_job_id":null,"html_url":"https://github.com/smt116/zjp-problems","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smt116%2Fzjp-problems","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smt116%2Fzjp-problems/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smt116%2Fzjp-problems/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smt116%2Fzjp-problems/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smt116","download_url":"https://codeload.github.com/smt116/zjp-problems/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230374293,"owners_count":18216043,"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":[],"created_at":"2024-12-19T04:12:27.297Z","updated_at":"2024-12-19T04:12:27.897Z","avatar_url":"https://github.com/smt116.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zaawansowane Języki Programowania (UG).\n\nProblems:\n\n* monte carlo (computing PI)\n* integral (computing integral using trapezoid method)\n* matrics multiplication\n\nSequential and parallel (using MPI) programs.\n\n## Compilation - HowTo\n\n#### Compile the static library (helper)\n\n```bash\n$ cd c-libs\n$ make libs\n```\n\n#### integral\n\n```bash\n$ cd integral\n$ make\n```\n\n#### monte_carlo\n\n```bash\n$ cd monte_carlo\n$ make\n```\n\n#### matrix_multiplication\n\n```bash\n$ cd matrix_multiplication\n$ make\n```\n\n## Running programs\n\n**Program will not check if input data is correct!**\n\n#### integral \n\n`f(x) = e^(-x^2)` -- you can provide another f(x) in `lib.c`\n\n##### Sequential program\n\n```bash\n# a, b - [a, b]\n# n - granularity (number of points between a and b)\n$ ./seq_app -a -2.5 -b 2.5 -n 100\n```\n\n##### Parallel program (MPI)\n\n```bash\n# np - number of threads\n# a, b - [a, b]\n# n - granularity (number of points between a and b)\n$ ./seq_app -a -2.5 -b 2.5 -n 100\n$ mpirun -np 8 par_app -a -2.5 -b 2.5 -n 64\n```\n\n#### monte_carlo\n\n##### Sequential program\n\n```bash\n# --pairs - number of points in [0, a] x [0,b]\n# --time - print the time of computing\n$ ./seq_app --pairs 1024 --time 1\n```\n\n##### Parallel program (MPI)\n\n```bash\n# -np - number of threads\n# --pairs - number of points in [0, a] x [0,b]\n# --time - print the time of computing\n$ mpirun -np 8 par_app --pairs 1024 --time 1\n```\n\n#### matrix_multiplication\n\n##### Sequential program\n\n```bash\n# -a - dimension of A[a, a]\n# -x - dimension of x[a, x]\n# --size - size = a = x (will overwrite a and x)\n# --maxvalue - max value of each number in matrics (values are random)\n$ ./seq_app --size 512\n```\n\n##### Parallel program (MPI)\n\n```bash\n# np - number of threads\n# -a - dimension of A[a, a]\n# -x - dimension of x[a, x]\n# --size - size = a = x (will overwrite a and x)\n# --maxvalue - max value of each number in matrics (values are random)\n$ mpirun -np 8 par_app --size 512\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmt116%2Fzjp-problems","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmt116%2Fzjp-problems","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmt116%2Fzjp-problems/lists"}