{"id":22954986,"url":"https://github.com/hpac/pmrrr-extended","last_synced_at":"2025-06-20T09:06:50.285Z","repository":{"id":85310954,"uuid":"47260257","full_name":"HPAC/pmrrr-extended","owner":"HPAC","description":null,"archived":false,"fork":false,"pushed_at":"2019-04-01T08:54:50.000Z","size":177,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T00:30:31.479Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HPAC.png","metadata":{"files":{"readme":"README","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":"2015-12-02T12:45:13.000Z","updated_at":"2019-04-01T08:55:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"b7ace3ed-3a93-4bd5-a99d-4c521c0ea91f","html_url":"https://github.com/HPAC/pmrrr-extended","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HPAC/pmrrr-extended","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HPAC%2Fpmrrr-extended","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HPAC%2Fpmrrr-extended/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HPAC%2Fpmrrr-extended/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HPAC%2Fpmrrr-extended/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HPAC","download_url":"https://codeload.github.com/HPAC/pmrrr-extended/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HPAC%2Fpmrrr-extended/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260915902,"owners_count":23082040,"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.768Z","updated_at":"2025-06-20T09:06:45.273Z","avatar_url":"https://github.com/HPAC.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"These files provide the routine 'pmrrr'. Its purpose is to compute all \nor a subset of eigenvalues and optionally eigenvectors of a symmetric \ntridiagonal matrix. 'pmrrr' is based on the algorithm of Multiple \nRelatively Robust Representations (MRRR). The routine thereby targets \nhybrid architectures consisting of multiple SMP nodes. It also runs in \nfully distributed mode, with each node having only one processor, and \nfully SMP mode, in which case no message passing is required. The \nimplementation is based on LAPACK's routine 'dstemr'.\n\n\nBuilding the archive libpmrrr.a:\n--------------------------------\n1) In the folder INSTALL, depending on the compiler used, \n   replace the file 'make.inc' (which assumes GNU gcc) \n   with the corresponding file. \n   For example if you want to use Intel's compilers: \n   $cp ./INSTALL/make.inc.intel ./make.inc\n   If you do not find a file matching your compiler, then use any of \n   the files as a basis to edit.\n2) Edit the file 'make.inc' according to your system.\n3) Run make.\n\n\nUsing libmrrr.a:\n----------------\nThe folder EXAMPLES contains examples of how to use the routine \n'pmrrr' in C and Fortran code. Edit the 'Makefile' in these folders if \nyou do not use the GNU compilers and run 'make' to compile the \nexamples.\n\nIn general, the code that calls 'pmrrr' needs to be linked to the \nlibrary 'libpmrrr.a', which is created in the LIB folder. \nAdditionally, it has to be linked to the libraries on which it \ndepends (see example files).\n\nBelow are given the C and Fortran prototypes of the function 'pmrrr'.\nFor more information please see 'INCLUDE/pmrrr.h'.\n\n\n######################################################################\n# C function prototype:                                              #\n###################################################################### \n# int pmrrr(char *jobz, char *range, int *n, double  *D,             #\n#           double *E, double *vl, double *vu, int *il, int *iu,     #\n#           int *tryrac, MPI_Comm comm, int *nz, int *offset,        #\n#           double *W, double *Z, int *ldz, int *Zsupp);             #\n#                                                                    #\n# Arguments:                                                         #\n# ----------                                                         #\n#                                                                    #\n# INPUTS:                                                            #\n# -------                                                            #\n# jobz              \"N\" or \"n\" - compute only eigenvalues            #\n#                   \"V\" or \"v\" - compute also eigenvectors           #\n#                   \"C\" or \"c\" - count the maximal number of         #\n#                                locally computed eigenvectors       #\n# range             \"A\" or \"a\" - all                                 #\n#                   \"V\" or \"v\" - by interval: (VL,VU]                #\n#                   \"I\" or \"i\" - by index:     IL-IU                 #\n# n                 matrix size                                      #\n# ldz               must be set on input to the leading dimension    #\n#                   of of eigenvector matrix Z; this is often equal  #\n#                   to matrix size n (not changed on output)         #\n#                                                                    #\n# INPUT + OUTPUT:                                                    #\n# ---------------                                                    #\n# D (double[n])     Diagonal elements of tridiagonal T.              #\n#                   (On output the array will be overwritten).       #\n# E (double[n])     Off-diagonal elements of tridiagonal T.          #\n#                   First n-1 elements contain off-diagonals,        #\n#                   the last element can have an abitrary value.     #\n#                   (On output the array will be overwritten.)       #\n# vl                If range=\"V\", lower bound of interval            #\n#                   (vl,vu], on output refined.                      #\n#                   If range=\"A\" or \"I\" not referenced as input.     #\n#                   On output the interval (vl,vu] contains ALL      #\n#                   the computed eigenvalues.                        #\n# vu                If range=\"V\", upper bound of interval            #\n#                   (vl,vu], on output refined.                      #\n#                   If range=\"A\" or \"I\" not referenced as input.     #\n#                   On output the interval (vl,vu] contains ALL      #\n#                   the computed eigenvalues.                        #\n# il                If range=\"I\", lower index (1-based indexing) of  #\n#                   the subset 'il' to 'iu'.                         #\n#                   If range=\"A\" or \"V\" not referenced as input.     #\n#                   On output the eigenvalues with index il to iu    #\n#                   are computed by ALL processes.                   #\n# iu                If range=\"I\", upper index (1-based indexing) of  #\n#                   the subset 'il' to 'iu'.                         #\n#                   If range=\"A\" or \"V\" not referenced as input.     #\n#                   On output the eigenvalues with index il to iu    # \n#                   are computed by ALL processes.                   #\n# tryrac            0 - do not try to achieve high relative accuracy.#\n#                   1 - relative accuracy will be attempted;         #\n#                       on output it is set to zero if high relative #\n#                       accuracy is not achieved.                    #\n# comm              MPI communicator; commonly: MPI_COMM_WORLD.      #\n#                                                                    #\n# OUTPUT:                                                            #\n# -------                                                            #\n# nz                Number of eigenvalues and eigenvectors computed  #\n#                   locally.                                         #\n#                   If jobz=\"C\", 'nz' will be set to the maximal     #\n#                   number of locally computed eigenvectors such     #\n#                   that double[n*nz] will provide enough memory     #\n#                   for the local eigenvectors;  this is only        #\n#                   important in case of range=\"V\" since             #\n#                   '#eigenpairs' are not known in advance           #\n# offset            Index, relative to the computed eigenvalues, of  #\n#                   the smallest eigenvalue computed locally         #\n#                   (0-based indexing).                              #\n# W (double[n])     Locally computed eigenvalues;                    #\n#                   The first nz entries contain the eigenvalues     #\n#                   computed locally; the first entry contains the   #\n#                   'offset + 1'-th eigenvalue computed and the      #\n#                   'offset + il'-th eigenvalue of the input matrix  #\n#                   (1-based indexing in both cases).                #\n#                   In some situations it is desirable to have all   #\n#                   computed eigenvalues in W, instead of only       #\n#                   those computed locally. In this case the         #\n#                   routine 'PMR_comm_eigvals' can be called right   #\n#                   after 'pmrrr' returns (see below).               #\n# Z                 Locally computed eigenvectors.                   #\n# (double[n*nz])    Enough space must be provided to store the       #\n#                   vectors. 'nz' should be bigger or equal          #\n#                   to ceil('#eigenpairs'/'#processes'), where       #\n#                   '#eigenpairs' is 'n' in case of range=\"A\" and    #\n#                  'iu-il+1' in case of range=\"I\". Alternatively,    #\n#                   and for range=\"V\" 'nz' can be obtained           #\n#                   by running the routine with jobz=\"C\".            #\n# Zsupp             Support of eigenvectors, which is given by       #\n# (double[2*n])     Z[2*i] to Z[2*i+1] for the i-th eigenvector      #\n#                   stored locally (1-based indexing in both         #\n#                   cases).                                          #\n#                                                                    #\n# RETURN VALUE:                                                      #\n# -------------                                                      #\n#                 0 - success                                        #\n#                 1 - wrong input parameter                          #\n#                 2 - misc errors                                    #\n#                                                                    #\n######################################################################\n\n######################################################################\n# Fortran prototype:                                                 #\n######################################################################\n# PMRRR(JOBZ, RANGE, N, D, E, VL, VU, IL, IU, TRYRAC,                #\n#       MPI_COMM, NZ, OFFSET, W, Z, LDZ, ZSUPP, INFO)                #\n#                                                                    #\n# CHARACTER        JOBZ, RANGE                                       #\n# INTEGER          N, IL, IU, TRYRAC, MPI_COMM, NZ, OFFSET, LDZ,     # \n#                  ZSUPP(*), INFO                                    #\n# DOUBLE PRECISION D(*), D(*), VL, VU, W(*), Z(*,*)                  #\n######################################################################\n\n\nThe function is called by every process of the MPI communicator \nspecified as an argument. Each process is assumed to have the diagonal \nand sub-diagonal of the symmetric tridiagonal input matrix. It is \nthereby important that MPI is always initialized by \n'MPI_Init_thread' (as opposed to 'MPI_Init'!). If multithreading is \ndesired, the thread level support MPI_THREAD_MULTIPLE has to be \nrequested in 'MPI_Init_thread'. If no multithreading is used, the \nthread support 'MPI_THREAD_SINGLE' can be requested. Notice that \nmultithreading is disabled if the implementation of the MPI library \ndoes not support MPI_THREAD_MULTIPLE.\nThe number of threads created in each process can be specified via the \nenvironment variable PMR_NUM_THREADS. In case this variable is not \ndefined, then the routine will create as many threads as specified by \nthe variable DEFAULT_NUM_THREADS (which is set in 'pmrrr.h'). \nNote: Do not forget to tell mpiexec/mpirun about the environment \nvariable PMR_NUM_THREADS if you use it. This is typically done via the \noption '-env' or '-x'.\n\n\nSome additinal comments:\n------------------------\n\nCOMMUNICATING COMPUTED EIGENVALUES:\nUpon completion of routine 'pmrrr', each process has a subset of the \neigenvalues, stored in the array W (see 'pmrrr.h'). In some situations\nit is desirable to let all processes have all the computed eigenvalues. \nTo this end, an additional routine 'PMR_comm_eigvals' is provided. It \ncan be called right after 'pmrrr' returned. Upon completion, each \nprocess has all the computed eigenvalues, stored in W.\nThe C and Fortran prototypes of the function 'PMR_comm_eigvals' are \ngiven below. For more information please see 'pmrrr.h'.\n\n######################################################################\n# C function prototype:                                              #\n###################################################################### \n# int PMR_comm_eigvals(MPI_Comm comm, int *nz, int *offset,          # \n#                      double *W);                                   #\n######################################################################\n\n######################################################################\n# Fortran prototype:                                                 #\n######################################################################\n# PMR_COMM_EIGVALS(MPI_COMM, NZ, OFFSET, W, INFO)                    #\n#                                                                    #\n# INTEGER          MPI_COMM, NZ, OFFSET, INFO                        #\n# DOUBLE PRECISION W(*)                                              #\n######################################################################\n\n\nCOMMENTS AND BUGS:\npetschow@aices.rwth-aachen.de\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhpac%2Fpmrrr-extended","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhpac%2Fpmrrr-extended","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhpac%2Fpmrrr-extended/lists"}