! This file is part of ELPA. ! ! The ELPA library was originally created by the ELPA consortium, ! consisting of the following organizations: ! ! - Max Planck Computing and Data Facility (MPCDF), formerly known as ! Rechenzentrum Garching der Max-Planck-Gesellschaft (RZG), ! - Bergische Universität Wuppertal, Lehrstuhl für angewandte ! Informatik, ! - Technische Universität München, Lehrstuhl für Informatik mit ! Schwerpunkt Wissenschaftliches Rechnen , ! - Fritz-Haber-Institut, Berlin, Abt. Theorie, ! - Max-Plack-Institut für Mathematik in den Naturwissenschaften, ! Leipzig, Abt. Komplexe Strukutren in Biologie und Kognition, ! and ! - IBM Deutschland GmbH ! ! This particular source code file contains additions, changes and ! enhancements authored by Intel Corporation which is not part of ! the ELPA consortium. ! ! More information can be found here: ! http://elpa.mpcdf.mpg.de/ ! ! ELPA is free software: you can redistribute it and/or modify ! it under the terms of the version 3 of the license of the ! GNU Lesser General Public License as published by the Free ! Software Foundation. ! ! ELPA is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU Lesser General Public License for more details. ! ! You should have received a copy of the GNU Lesser General Public License ! along with ELPA. If not, see ! ! ELPA reflects a substantial effort on the part of the original ! ELPA consortium, and we ask you to respect the spirit of the ! license that we chose: i.e., please contribute any changes you ! may have back to the original ELPA library distribution, and keep ! any derivatives of ELPA under the same license that we chose for ! the original distribution, the GNU Lesser General Public License. #include "../../sanity.X90" use elpa_type ! use elpa1_compute ! use elpa_utilities use elpa_mpi #ifdef HAVE_DETAILED_TIMINGS use timings #else use timings_dummy #endif use precision implicit none integer(kind=ik) :: na, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols #if REALCASE == 1 !#ifdef USE_ASSUMED_SIZE ! real(kind=REAL_DATATYPE) :: a(lda,*) !#else real(kind=REAL_DATATYPE) :: a(lda,matrixCols) !#endif #endif #if COMPLEXCASE == 1 !#ifdef USE_ASSUMED_SIZE ! complex(kind=COMPLEX_DATATYPE) :: a(lda,*) !#else complex(kind=COMPLEX_DATATYPE) :: a(lda,matrixCols) !#endif #endif ! integer(kind=ik) :: my_prow, my_pcol, np_rows, np_cols, mpierr integer(kind=ik) :: nev ! integer(kind=ik) :: l_cols, l_rows, l_col1, l_row1, l_colx, l_rowx ! integer(kind=ik) :: n, nc, i, info ! integer(kind=ik) :: lcs, lce, lrs, lre ! integer(kind=ik) :: tile_size, l_rows_tile, l_cols_tile !#if REALCASE == 1 ! real(kind=REAL_DATATYPE), allocatable :: tmp1(:), tmp2(:,:), tmatr(:,:), tmatc(:,:) !#endif !#if COMPLEXCASE == 1 ! complex(kind=COMPLEX_DATATYPE), allocatable :: tmp1(:), tmp2(:,:), tmatr(:,:), tmatc(:,:) !#endif logical, intent(in) :: wantDebug logical :: success integer(kind=ik) :: successInternal ! integer(kind=ik) :: istat ! character(200) :: errorMessage type(elpa_t) :: elpaAPI call timer%start("elpa_cholesky_& &MATH_DATATYPE& &_& &PRECISION & ") success = .true. if (elpa_init(20170403) /= ELPA_OK) then success = .false. error stop "ELPA API version not supported" endif nev = 10 elpaAPI = elpa_create(na, nev, lda, matrixCols, nblk, successInternal) if (successInternal .ne. ELPA_OK) then print *, "Cannot create elpa object" success = .false. stop return endif call elpaAPI%set_comm_rows(mpi_comm_rows) call elpaAPI%set_comm_cols(mpi_comm_cols) call elpaAPI%cholesky(a, successInternal) if (successInternal .ne. ELPA_OK) then print *, "Cannot run cholesky" stop success = .false. return else success =.true. endif call elpaAPI%destroy() call elpa_uninit() call timer%stop("elpa_cholesky_& &MATH_DATATYPE& &_& &PRECISION& ") #undef REALCASE #undef COMPLEXCASE #undef DOUBLE_PRECISION #undef SINGLE_PRECISION