{"id":27301149,"url":"https://github.com/t4vexx/sockets","last_synced_at":"2026-03-03T20:32:34.916Z","repository":{"id":282629346,"uuid":"865071294","full_name":"T4vexx/SOCKETS","owner":"T4vexx","description":"This project is an implementation of a simulation of the MPI_REDUCE algorithm using TCP/IP sockets in C. The main idea is to divide the sum of a set of numbers among different processes (called workers), which run in parallel, following a binary tree structure.","archived":false,"fork":false,"pushed_at":"2025-03-15T21:44:04.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-04T12:55:08.718Z","etag":null,"topics":["c","make","mpi-library","multiprocessing","parallel-computing","shell-script"],"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/T4vexx.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":"2024-09-29T22:47:51.000Z","updated_at":"2025-03-15T21:44:08.000Z","dependencies_parsed_at":"2025-03-15T22:27:02.169Z","dependency_job_id":"1ce1948e-9531-4480-83f7-b7cadac1f3f8","html_url":"https://github.com/T4vexx/SOCKETS","commit_stats":null,"previous_names":["t4vexx/sockets"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/T4vexx/SOCKETS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T4vexx%2FSOCKETS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T4vexx%2FSOCKETS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T4vexx%2FSOCKETS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T4vexx%2FSOCKETS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/T4vexx","download_url":"https://codeload.github.com/T4vexx/SOCKETS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T4vexx%2FSOCKETS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30058290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["c","make","mpi-library","multiprocessing","parallel-computing","shell-script"],"created_at":"2025-04-12T01:38:27.629Z","updated_at":"2026-03-03T20:32:34.868Z","avatar_url":"https://github.com/T4vexx.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SOCKETS PROJECT - MPI_REDUCE() SIMULATOR\n\n## DESCRIPTION\nThis project is an implementation of an MPI_REDUCE algorithm simulation using TCP/IP sockets in C. The main idea is to distribute the sum of a set of numbers across different processes (called workers) that execute in parallel, following a binary tree structure.\n\n### Features\n- Parallel Architecture: Uses a binary tree approach, where workers hierarchically perform value reduction until the final result is obtained.\n- Socket Communication: Data transmission between processes is done via TCP/IP sockets, simulating point-to-point communication between workers and the manager.\n- Scalability: The number of workers can be easily configured, allowing execution with different binary tree sizes for parallelism.\n- Synchronization: Implements synchronization to ensure that workers operate in coordination and send data to the manager only after completing the reduction operation.\n\n## CONFIGURATION\n\nYou must have GCC and build-essentials installed on your Linux system to run the process.\n\nTo clean executable files, run:\n\t\n\tmake clean\n\nTo build the project, run:\n\t\n\tmake build\n\t\nTo execute the project, run:\n\t\n\tmake exec\n\t\nAfter executing the processes via make exec, wait for the manager to print the final result.\n\n![image](https://github.com/user-attachments/assets/a8db22d3-f8f9-4f6f-a949-82f390cfad22)\n\n### Considerações\nThe worker initialization format is as follows: \n```Bash\n\t./worker \u003cid_do_worker_começando_pelo_0\u003e \u003cvalor_do_woker_para_ser_somado\u003e\n```\nIn the logic used to spawn worker processes, the exec_trabalho.sh script starts all workers with the value 10.\nIf you want to change the values used for summation, simply modify this logic:\n\n\tfor i in {0..7}\n\tdo\n\t\t./worker $i 10 \u0026\n\t\tif [ $? -ne 0 ] then\n\t\t\techo \"Erro ao iniciar o processo worker $i\"\n\t\t\texit 1\n\t\tfi\n\t\tsleep 1\n\tdone\n\nThus, in the current logic, **the correct answer is 80.** 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft4vexx%2Fsockets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft4vexx%2Fsockets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft4vexx%2Fsockets/lists"}