{"id":22954985,"url":"https://github.com/hpac/cp-cals","last_synced_at":"2026-03-14T14:03:11.064Z","repository":{"id":41187918,"uuid":"302576145","full_name":"HPAC/CP-CALS","owner":"HPAC","description":"Software for computing the Canonical Polyadic Decomposition (CPD), using the Concurrent Alternating Least Squares Algorithm (CALS).","archived":false,"fork":false,"pushed_at":"2023-01-22T00:40:08.000Z","size":16278,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T05:04:45.469Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HPAC.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}},"created_at":"2020-10-09T08:11:49.000Z","updated_at":"2024-09-13T13:27:28.000Z","dependencies_parsed_at":"2022-09-03T02:21:22.481Z","dependency_job_id":null,"html_url":"https://github.com/HPAC/CP-CALS","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HPAC%2FCP-CALS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HPAC%2FCP-CALS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HPAC%2FCP-CALS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HPAC%2FCP-CALS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HPAC","download_url":"https://codeload.github.com/HPAC/CP-CALS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249205070,"owners_count":21229854,"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-14T16:20:31.640Z","updated_at":"2026-03-14T14:03:10.996Z","avatar_url":"https://github.com/HPAC.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CP-CALS\n\nSoftware for computing the Canonical Polyadic Decomposition (CPD), also known as PARAllel FACtors (PARAFAC), using the Concurrent Alternating Least Squares Algorithm (CALS).\n\n[![Build Status](https://travis-ci.com/ChrisPsa/CP-CALS.svg?token=RsRp8LsqHqUm5bMEckfD\u0026branch=master)](https://travis-ci.com/ChrisPsa/CP-CALS)\n\n## Requirements\n\n### Mandatory\n* CMake 3.17.5 or higher.\n  A bash script is provided, to help install CMake 3.17.5 (for Linux) in the `extern` folder and updates the `PATH` environment variable to point to it. Try using it by navigating to the directory where you cloned CALS and running: `source scripts/environment_setup.sh`. Then, using the same terminal session, running `cmake --version` should return version 3.17.5.\n* OpenMP\n* BLAS/LAPACK (not required for MATLAB MEX generation). Either of the following libraries has been tested to work:\n  * Intel MKL\n  * OpenBLAS\n\n### Optional\n* CUDA 11\n* MATLAB 2019b\n\nCALS has been tested to compile with g++-8, g++-10 and clang-10.\n\n## Compilation\n\nClone the CP-CALS repo using:\n\n```bash\ngit clone https://github.com/HPAC/CP-CALS.git\n```\n\nUse the following commands to compile the MKL version.\n\n```bash\ncd CP-CALS/build\ncmake  \\\n-DCMAKE_BUILD_TYPE=Release \\\n-DWITH_MKL=ON ..\n\nmake -j 8 all\n```\n\nor the following commands to compile the OpenBLAS version.\n\n```bash\ncd CP-CALS/build\ncmake  \\\n-DCMAKE_BUILD_TYPE=Release \\\n-DWITH_OPENBLAS=ON ..\n\nmake -j 8 all\n```\n\nUse the following commands to compile the MKL version with CUDA enabled.\n\n```bash\ncd CP-CALS/build\ncmake  \\\n-DCMAKE_BUILD_TYPE=Release \\\n-DWITH_MKL=ON \\\n-DWITH_CUBLAS=ON ..\n\nmake -j 8 all\n```\n\nTo compile the MEX files for Matlab use:\n\n```bash\ncd CP-CALS/build\ncmake  \\\n-DCMAKE_BUILD_TYPE=Release \\\n-DWITH_MATLAB=ON \\\n-DMATLAB_PATH=/path/to/Matlab ..\n\nmake -j 8 all\n```\n\n## Executing example code\n\n`src/examples/driver` contains a demonstration of how to use CALS (The -h flag is supported for a look at possible input arguments).\n\n### MATLAB examples\n\nAfter compiling the MATLAB MEX, one can execute file `matlab/matlab_src/TTB_vs_CALS.m` in MATLAB. This executable performs a comparisson of TensorToolbox and CALS. The user first needs to point MATLAB to the CALS MEX and the Tensor Toolbox source code by editing the first two lines of the file.\n\n## Related Publications\n\n* [Algorithm 1026: Concurrent Alternating Least Squares for multiple simultaneous Canonical Polyadic Decompositions](https://dl.acm.org/doi/10.1145/3519383)\n\n* [Accelerating jackknife resampling for the Canonical Polyadic Decomposition](https://www.frontiersin.org/articles/10.3389/fams.2022.830270/full)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhpac%2Fcp-cals","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhpac%2Fcp-cals","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhpac%2Fcp-cals/lists"}