{"id":20048453,"url":"https://github.com/aggstam/sat_gpu","last_synced_at":"2026-05-24T16:36:44.100Z","repository":{"id":155101789,"uuid":"139043923","full_name":"aggstam/sat_GPU","owner":"aggstam","description":"This program solves the Propositional (Boolean) Satisfiability problem using Depth-First Search algorithm.","archived":false,"fork":false,"pushed_at":"2025-11-30T13:39:45.000Z","size":287,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-02T19:58:09.187Z","etag":null,"topics":["boolean-satisfiability-problem","c","depth-first-search","opencl"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aggstam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-06-28T16:33:54.000Z","updated_at":"2025-11-30T13:39:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"0d0e3f21-c0bf-4658-be30-59ff2ff2f844","html_url":"https://github.com/aggstam/sat_GPU","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aggstam/sat_GPU","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aggstam%2Fsat_GPU","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aggstam%2Fsat_GPU/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aggstam%2Fsat_GPU/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aggstam%2Fsat_GPU/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aggstam","download_url":"https://codeload.github.com/aggstam/sat_GPU/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aggstam%2Fsat_GPU/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33442525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-24T13:13:05.286Z","status":"ssl_error","status_checked_at":"2026-05-24T13:13:03.728Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["boolean-satisfiability-problem","c","depth-first-search","opencl"],"created_at":"2024-11-13T11:44:11.622Z","updated_at":"2026-05-24T16:36:44.094Z","avatar_url":"https://github.com/aggstam.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sat_GPU\nThis program solves the Propositional (Boolean) Satisfiability problem using Depth-First Search algorithm.\n\u003cbr\u003e\nProblems are read from an input file, while solution is written to screen and an output file.\n\u003cbr\u003e\nTwo implementations are included, one executed only in CPU, and one which validates each vector using OpenCl.\n\u003cbr\u003e\nGPU implementation requires *opencl-headers* and *clinfo* packages to be installed, along with the corresponding platform sdk.\n\n## Usage\nBoth version can be invocted via the Makefile, or by directly compiling and executing.\n\n### Make usage\n#### CPU code\n```shell\n$ make cpu\n```\nTo include a different input file:\n```shell\n$ make cpu FILE={file_path}\n```\n\n#### GPU code\n```shell\n$ make gpu\n```\nTo configure GPU workers:\n```shell\n$ make gpu WORKERS={number}\n```\nTo include a different input file:\n```shell\n$ make gpu FILE={file_path}\n```\n\n### Direct usage\n#### CPU code\nCompilation:\n```shell\n$ gcc -o sat_CPU sat_CPU.c\n```\nExecution:\n```shell\n$ ./sat_CPU {file_path}\n```\n\n#### GPU code\nCompilation:\n```shell\n$ gcc -o sat_GPU sat_GPU.c -lOpenCL\n```\nExecution:\n```shell\n$ ./sat_GPU {workers_number} {file_path}\n```\n\n## Execution examples\n### CPU code\n```shell\n$ make cpu\nExecuting CPU code...\ngcc -o sat_CPU sat_CPU.c\n./sat_CPU test_file.txt\n\nThis programm solves the Propositional (Boolean) Satisfiability Problem written\nin file test_file.txt, using Depth First Search Algorithm.\n\nSolution found with depth-first!\n\nSolution vector propositions values:\nP1=true  P2=true  P3=true  P4=true  P5=false  P6=false  P7=true  P8=true  P9=false  P10=true  P11=false  P12=true  P13=false  P14=true  P15=false  P16=false  P17=true  P18=false  P19=false  P20=false\n\nTime spent: 21.848 secs\n```\n\n### GPU code\n```shell\n$ make gpu\nExecuting GPU code...\ngcc -o sat_GPU sat_GPU.c -lOpenCL\n./sat_GPU 100 test_file.txt\n\nThis OpenCL programm solves the Propositional (Boolean) Satisfiability Problem\nwritten in file test_file.txt, using Depth First Search Algorithm.\nNumber of work items: 100\n\nDevice info:\n\n1 platforms detected\nPlatform 0:\n    Vendor: NVIDIA Corporation\n    Name: NVIDIA CUDA\n\n1 devices detected\nDevice 0:\n    Device: NVIDIA Corporation\n    Name: NVIDIA GeForce GTX 1070\n\nNo build errors, starting solving the problem...\n\nSolution found with depth-first!\n\nSolution vector propositions values:\nP1=true  P2=true  P3=true  P4=true  P5=false  P6=false  P7=true  P8=true  P9=false  P10=true  P11=false  P12=true  P13=false  P14=true  P15=false  P16=false  P17=true  P18=false  P19=false  P20=false\n\nTime spent = 9.538\nGPU execution time = 0.000\nCommunication time = 9.420\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faggstam%2Fsat_gpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faggstam%2Fsat_gpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faggstam%2Fsat_gpu/lists"}