{"id":27870678,"url":"https://github.com/nariaki3551/cmapdeepbkz","last_synced_at":"2025-05-04T23:24:23.459Z","repository":{"id":154192124,"uuid":"551429314","full_name":"nariaki3551/cmapdeepbkz","owner":"nariaki3551","description":"A DeepBKZ parallel solver for shortest vector problem","archived":false,"fork":false,"pushed_at":"2023-10-08T05:39:36.000Z","size":3655,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-10-08T06:26:25.222Z","etag":null,"topics":["deepbkz","distributed","lattice","mpi","parallel","svp"],"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/nariaki3551.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}},"created_at":"2022-10-14T11:38:31.000Z","updated_at":"2023-09-02T11:49:54.000Z","dependencies_parsed_at":"2023-09-22T22:24:13.886Z","dependency_job_id":"a25d0c60-6414-4b10-bb80-6fe6c00301c4","html_url":"https://github.com/nariaki3551/cmapdeepbkz","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/nariaki3551%2Fcmapdeepbkz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nariaki3551%2Fcmapdeepbkz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nariaki3551%2Fcmapdeepbkz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nariaki3551%2Fcmapdeepbkz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nariaki3551","download_url":"https://codeload.github.com/nariaki3551/cmapdeepbkz/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252412571,"owners_count":21743740,"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":["deepbkz","distributed","lattice","mpi","parallel","svp"],"created_at":"2025-05-04T23:24:22.860Z","updated_at":"2025-05-04T23:24:23.449Z","avatar_url":"https://github.com/nariaki3551.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CMAP-DeepBKZ\n\nCMAP-DeepBKZ solver \\[[Tat+21b](#ref.cmapdeepbkz)\\] that is a configuration for parallelizing lattice-based reduction based on CMAP-LAP \\[[Tat+21a](#ref.cmaplap)\\]. CMAP-LAP is a C++ \u0026 MPI parallel framework for the lattice problems.\n\nThese frameworks and solvers are distributed under the LGPL version 3 or later, in accordance with the license of the UG framework. Commercial licenses are available through \u003clicenses@zib.de\u003e.\nIn addition, some programs independent of the UG framework are distributed under the MIT License.\n\n\u003cbr\u003e\n\n# Table of contents\n- [CMAP-DeepBKZ](#cmap-deepbkz)\n- [Table of contents](#table-of-contents)\n- [Setup](#setup)\n- [Compiling](#compiling)\n- [Usage](#usage)\n- [Bibliography](#bibliography)\n\n\u003cbr\u003e\n\n# Setup\n\nWe provide Dockerfile for building virtual environments and making binaries. If you do not use docker, you set up third-party libraries using `setup.sh` or install them manually.\n\n## Setup on Docker\n\nIf you use docker to set up, you just have to run the following building command. The docker image will be created from ubuntu:20.04. Then you run the docker image.\n\n```\ndocker build -t cmapdeepbkz .\n```\n\n\n## Setup Manually\n\nIf you do not use docker, you have to install third-party libraries as follows.\n\n- CMake (version \u003e= 3.18)\n- NTL\n- Eigen\n- Boost (version == 1.75)\n\n**Note** We have checked our framework and sovlers with CMake(v3.22.2), NTL(v11.5.1), Eigen(v3.4.0) and Boost(v1.75).\nThe commands to install these libraries are as follows.\n```bash\n# install cmake (version 3.22.3) if necessary\nwget https://github.com/Kitware/CMake/releases/download/v3.22.3/cmake-3.22.3.tar.gz\ntar -xf cmake-3.22.3.tar.gz\ncd cmake-3.22.3\n./bootstrap [--prefix=PREFIX] [--parallel=PARALLEL]\nmake \u0026 make install\n\n# install NTL (version 11.5.1) if necessary\nwget https://libntl.org/ntl-11.5.1.tar.gz\ntar -xf ntl-11.5.1.tar.gz\ncd ntl-11.5.1/src\n./configure [PREFIX=PREFIX]\nmake \u0026 make install\n\n# install Eigen (version 3.4.0) if necessary\nwget https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz\ntar -xf eigen-3.4.0.tar.gz\ncd eigen-3.4.0\nmkdir build\ncd build\ncmake .. [-DCMAKE_INSTALL_PREFIX=PREFIX]\nmake install\n\n\n# install boost (version 1.75 exact)\nwget https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz\ntar -xf boost_1_75_0.tar.gz\n```\n\nIn the case that you install these libraries in your local, it is recommended to create a cmapdeepbkz/usr directory and specify cmapdeepbkz/usr in the PREFIX above.\n\n\u003cbr\u003e\n\n# Compiling\n\nThe binaries will be created in `cmapdeepbkz/bin`.\n\n```bash\nmkdir build\ncd build\ncmake .. (options) -DBOOST_DIR=(boost installed directory)/boost_1_75_0\nmake\n```\n\nWhen you want to compile using MPI, set `CMAKE_CXX_COMPILER` to mpi compiler, e.g. `cmake .. -DCMAKE_CXX_COMPILER=mpicxx`.\n\n## Created binaries\n\n- `bin/fcmapdeepbkz`: shared memory version of CMAP-DeepBKZ\n- `bin/paracmapdeepbkz`: distributed memory version of CMAP-DeepBKZ\n\n## CMake Options\n\n- `-DBOOST_DIR`: (required) directory of boost 1.75\n- `-DCMAKE_BUILD_TYPE=Debug`: compile with debug mode\n- `-DSHARED_MEMORY_ONLY=ON`: compile only shared-memory version\n- `-DCMAKE_CXX_COMPILER=XXX`: use XXX mpi compiler (e.g. mpicxx)\n\n**Note**\nIf you do not use mpi compiler (e.g. -DCMAKE_CXX_COMPILER=gcc), the build will fail under `SHARED_MEMORY_ONLY` option is OFF, so you have to use the option `-DSHARED_MEMORY_ONLY=ON`.\n\n\n### Examples\n\n- compile only shared memory version: `cmake .. -DBOOST_DIR=/xxx/boost_1_75_0 -DSHARED_MEMORY_ONLY=ON`\n- compile both shared and distributed memory version: `cmake .. -DBOOST_DIR=/xxx/boost_1_75_0 -DCMAKE_CXX_COMPILER=mpicxx`\n- compile with debug mode (add -g, and remove -O3): `cmake .. -DBOOST_DIR=/xxx/boost_1_75_0 -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Debug`\n\n\n## Check\n\n```sh\npython test.py\n```\n\n\u003cbr\u003e\n\n# Usage\n\nThis solver is the parallel solver for lattice basis reduction.\nAll workers execute lattice basis reduction, and a supervisor shares a part of a lattice basis.\n\n## Shared memory version\n\n`./bin/fcmapdeepbkz settingfile matrixfile -sth yy` (e.g. `./bin/fcmapdeepbkz settings/default.set storage/sample_mats/dim80.txt -sth 3`)\n\nmatrixfile is the basis file in the same format as the SVP Challenge instance.\n\n**options**\n\n- sth [Int] : the number of solver threads used\n\n## Distributed memory version\n\n`mpirun -np yy ./bin/paracmapdeepbkz settingfile matrixfile` (e.g. `mpirun -np 3 ./bin/paracmapdeepbkz settings/default.set storage/sample_mats/dim80.txt`)\n\n**options**\n\n- np [Int] : the number of solver process + 1\n\n\n## Sequential version (test for DeepBKZ algorithms)\n\n`./bin/seqcmapdeepbkz -i (instance file) -a exdeepbkz -b (blocksize)` (e.g. `./bin/seqcmapdeepbkz -i ./storage/sample_mats/dim80.txt -a exdeepbkz -b 30`)\n\n\u003cbr\u003e\n\n# Bibliography\n\n\u003ca id=\"ref.cmaplap\"\u003e\u003c/a\u003e\n\\[Tat+21a\\] Nariaki Tateiwa, Yuji Shinano, Keiichiro Yamamura, Akihiro Yoshida, Shizuo Kaji, Masaya Yasuda, and Katsuki Fujisawa. “CMAP-LAP: Configurable massively parallel solver for lattice problems”. In: 2021 IEEE 28th International Conference on High Performance Computing, Data, and Analytics (HiPC). IEEE. 2021, pp. 42–52.\n\n\u003ca id=\"ref.cmapdeepbkz\"\u003e\u003c/a\u003e\n\\[Tat+21b\\] Nariaki Tateiwa, Yuji Shinano, Masaya Yasuda, Shizuo Kaji, Keiichiro Yamamura, and Katsuki Fujisawa. Massively parallel sharing lattice basis reduction. eng. Tech. rep. 21-38. Takustr. 7, 14195 Berlin: ZIB, 2021.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnariaki3551%2Fcmapdeepbkz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnariaki3551%2Fcmapdeepbkz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnariaki3551%2Fcmapdeepbkz/lists"}