├── .gitignore ├── distnmf ├── .gitignore ├── eos.sh ├── distr2.hpp ├── distals.hpp ├── CMakeLists.txt ├── README.md ├── disthals.hpp ├── distanlsbpp.hpp ├── distmu.hpp ├── mpicomm.hpp ├── distnmf.hpp └── distnmftime.hpp ├── utilities ├── buildsplitfiles.sh ├── py2mpiio.cpp ├── partitioner │ ├── planc_benchmark.py │ ├── run_partitioner.py │ ├── planc_output_convert.py │ ├── configs │ │ └── bench_configs.json │ ├── planc_partitioner.py │ └── check_symm.py ├── splitfiles2d.sh ├── splitfiles.sh ├── processstackexchange.txt ├── permute-sparse-struct.cpp ├── README.md ├── shufflesparsemm.py └── partition-uniform.cpp ├── datasets.md ├── ntf ├── ntfmu.hpp ├── ntfhals.hpp ├── mttkrp_test.cpp ├── CMakeLists.txt ├── ntf.cpp ├── ntfanlsbpp.hpp ├── README.md ├── ntfaoadmm.hpp └── ntfnes.hpp ├── jointnmf ├── jointnmf_driver.hpp ├── CMakeLists.txt └── README.md ├── distjointnmf ├── distjointnmf_driver.hpp ├── CMakeLists.txt ├── README.md └── distjnmftime.hpp ├── nnls └── SortBooleanMatrix.hpp ├── distntf ├── distntfcpals.hpp ├── distntfmu.hpp ├── CMakeLists.txt ├── distntfhals.hpp ├── testcases.md ├── distntfanlsbpp.hpp ├── README.md ├── distntftime.hpp ├── distntfaoadmm.hpp └── distntf.cpp ├── nmf ├── CMakeLists.txt ├── sampletest.cpp ├── mu.hpp ├── README.md ├── hals.hpp └── aoadmm.hpp ├── common ├── ntf_utils.hpp ├── utils.h ├── distutils.h ├── cmake_aux │ └── NMFLIB_FindARMA.cmake ├── npyio.hpp └── parsecommandline.h ├── CMakeLists.txt ├── dimtree └── dimtrees.h ├── license.dat ├── conf ├── nvblas_cuda91.conf └── nvblas_cuda75.conf ├── papers.md ├── formatter └── google_clang_format ├── hiernmf ├── CMakeLists.txt ├── README.md ├── matutils.hpp └── hiernmf.cpp └── testcases.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.pdf 3 | *.md5 4 | *.dpth 5 | *.dep 6 | -------------------------------------------------------------------------------- /distnmf/.gitignore: -------------------------------------------------------------------------------- 1 | CMake* 2 | cmake* 3 | Makefile 4 | distnmf 5 | spmat* 6 | .*.swp 7 | mpiout* 8 | pacoss 9 | -------------------------------------------------------------------------------- /utilities/buildsplitfiles.sh: -------------------------------------------------------------------------------- 1 | g++ -fopenmp -c -O3 -I /home/rkannan3/libraries/armadillo-4.450.3/include/ SplitFiles.cpp 2 | -------------------------------------------------------------------------------- /datasets.md: -------------------------------------------------------------------------------- 1 | # Datasets 2 | Links to some datasets generated as part of the PLANC project. 3 | * Pixel similarity matrices used in SymNMF experiments. [[doi]](https://doi.org/10.5281/zenodo.3877635) 4 | * Aminer-MAG dataset used in JointNMF experiments. [[doi]](https://doi.org/10.5281/zenodo.7893403), [[doi]](https://doi.org/10.5281/zenodo.7938102) -------------------------------------------------------------------------------- /utilities/py2mpiio.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright Ramakrishnan Kannan 2018 */ 2 | 3 | #include "common/npyio.hpp" 4 | 5 | /* 6 | * For converting numpy array to distributed io 7 | * Compile as g++ -D_FILE_OFFSET_BITS=64 py2mpiio.cpp 8 | * -I/ccs/home/ramki/nmflibrary/ -I$ARMADILLO_INCLUDE_DIR 9 | * -I/ccs/home/ramki/rhea/libraries/openblas/include/ 10 | */ 11 | 12 | int main(int argc, char *argv[]) { 13 | if (argc < 3) { 14 | std::cout << "Usage : py2mpiio inputfile.npy outputfilename" << std::endl; 15 | return -1; 16 | } 17 | planc::NumPyArray npa; 18 | npa.load(argv[1]); 19 | npa.m_input_tensor->write(argv[2]); 20 | return 0; 21 | } -------------------------------------------------------------------------------- /ntf/ntfmu.hpp: -------------------------------------------------------------------------------- 1 | /* Copyright Ramakrishnan Kannan 2018 */ 2 | 3 | #ifndef NTF_NTFMU_HPP_ 4 | #define NTF_NTFMU_HPP_ 5 | 6 | #include "ntf/auntf.hpp" 7 | 8 | namespace planc { 9 | class NTFMU : public AUNTF { 10 | protected: 11 | MAT update(const int mode) { 12 | MAT H(this->m_ncp_factors.factor(mode)); 13 | MAT temp = H * this->gram_without_one + EPSILON; 14 | H = (H % this->ncp_mttkrp_t[mode].t()) / temp; 15 | return H.t(); 16 | } 17 | 18 | public: 19 | NTFMU(const Tensor &i_tensor, const int i_k, algotype i_algo) 20 | : AUNTF(i_tensor, i_k, i_algo) {} 21 | }; // class NTFMU 22 | } // namespace planc 23 | 24 | #endif // NTF_NTFMU_HPP_ 25 | -------------------------------------------------------------------------------- /jointnmf/jointnmf_driver.hpp: -------------------------------------------------------------------------------- 1 | /* Copyright 2022 Ramakrishnan Kannan */ 2 | #ifndef JOINTNMFDRIVER_HPP_ 3 | #define JOINTNMFDRIVER_HPP_ 4 | 5 | #include "common/nmf.hpp" 6 | #include 7 | #include 8 | #include "common/parsecommandline.hpp" 9 | #include "common/utils.hpp" 10 | #include "jointnmf/anlsbppjnmf.hpp" 11 | #include "jointnmf/pgdjnmf.hpp" 12 | #include "jointnmf/pgncgjnmf.hpp" 13 | 14 | // TODO: move class defintion into here 15 | 16 | template 17 | void callJointNMF(); 18 | 19 | // template parameters with template paramters 20 | template