...
 
Commits (4)
......@@ -18,7 +18,6 @@ IF(PROJECT_BINARY_DIR STREQUAL PROJECT_SOURCE_DIR)
MESSAGE(FATAL_ERROR "${MAGENTA}Build in the source directory is not allowed${COLORRESET}")
ENDIF()
SET(CMAKE_Fortran_MODULE_DIRECTORY "${PROJECT_BINARY_DIR}/include")
include_directories("${PROJECT_BINARY_DIR}/include")
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
......
No preview for this file type
......@@ -1139,7 +1139,7 @@ In all the subroutines listed below, the first argument (input and output) is an
\hline
\textcolor{blue}{output\_log} & integer & 0 & If not 0, a separate log file in JSON format will be written out.\\
\hline
\textcolor{blue}{save\_ovlp } & integer & 0 & If not 0, the overlap matrix will be saved and used to extrapolate density matrix or orthonormalize eigenvectors.\\
\textcolor{blue}{save\_ovlp } & integer & 0 & If not 0, the overlap matrix will be saved for extrapolation of density matrix or eigenvectors to a new geometry.\\
\hline
\textcolor{blue}{unit\_ovlp } & integer & 0 & If not 0, the overlap matrix will be treated as an identity (unit) matrix in ELSI and the solvers. See remark 1.\\
\hline
......@@ -1476,11 +1476,11 @@ In all the subroutines listed below, the first argument (input and output) is an
\textbf{1)} Please refer to the 7$^\text{th}$ remark in \ref{subsec:setter_pexsi} for the chemical potential determination algorithm in PEXSI and ELSI.
\subsection{Eigenvector orthonormalization and density matrix extrapolation}
\subsection{Extrapolation of wavefunction and density matrix}
\label{subsec:extrapolation}
In a single point total energy calculation, a simple way to construct an initial guess of the electron density is using the superposition of free atom densities. In geometry calculations, the initial guess in the (n+1)$^\text{th}$ geometry step can be made better than free atom superposition, by taking advantage of eigensolution or density matrix in the n$^\text{th}$ geometry step. However, due to the movement of localized basis functions, eigenvectors from the n$^\text{th}$ geometry step are no longer orthonormalized with respect to new basis functions in the (n+1)$^\text{th}$ geometry step. Similarly, density matrix from the n$^\text{th}$ geometry step does not satisfy the conditions in Eq. \ref{eq:density_matrix_conditions} with respect to the new overlap matrix.
In a single point total energy calculation, a simple way to construct an initial guess of the electron density is using the superposition of free atom densities. In geometry calculations, the initial guess in the (n+1)$^\text{th}$ geometry step can be made better than free atom superposition, by reusing the wavefunctions or density matrix calculated in the n$^\text{th}$ geometry step. However, due to the movement of atoms and localized basis functions around them, wavefunctions obtained in the n$^\text{th}$ geometry step are no longer orthonormalized in the (n+1)$^\text{th}$ geometry step. Similarly, density matrix from the n$^\text{th}$ geometry step does not satisfy the conditions in Eq. \ref{eq:density_matrix_conditions} with respect to the new overlap matrix.
The following subroutines orthonormalize eigenvectors in the n$^\text{th}$ geometry step with respect to the overlap matrix in the (n+1)$^\text{th}$ geometry step with a Gram-Schmidt algorithm.
The following subroutines orthonormalize eigenvectors (coefficients of wavefunctions) in the n$^\text{th}$ geometry step with respect to the overlap matrix in the (n+1)$^\text{th}$ geometry step with a Gram-Schmidt algorithm.
\begin{labeling}{\hspace{6cm}}
\item [\hspace{0.3cm} \textcolor{blue}{elsi\_orthonormalize\_ev\_real}(handle, ovlp, evec)]
\end{labeling}
......
......@@ -75,7 +75,9 @@ ADD_LIBRARY(elpa ${elpa_src})
TARGET_LINK_LIBRARIES(elpa PRIVATE ${LIBS})
TARGET_INCLUDE_DIRECTORIES(elpa PRIVATE ${INC_PATHS})
TARGET_INCLUDE_DIRECTORIES(elpa PRIVATE
${INC_PATHS}
${CMAKE_Fortran_MODULE_DIRECTORY})
IF(ELPA2_KERNEL STREQUAL "AVX512" OR ELPA2_KERNEL STREQUAL "AVX2" OR ELPA2_KERNEL STREQUAL "AVX")
IF(NOT CMAKE_VERSION VERSION_LESS 3.8.2)
......
......@@ -10,6 +10,10 @@ LIST(APPEND fortjson_src
ADD_LIBRARY(fortjson ${fortjson_src})
TARGET_INCLUDE_DIRECTORIES(fortjson PRIVATE
${INC_PATHS}
${CMAKE_Fortran_MODULE_DIRECTORY})
INSTALL(TARGETS fortjson
EXPORT elsiConfig
DESTINATION ${CMAKE_INSTALL_LIBDIR})
......@@ -47,7 +47,9 @@ ADD_LIBRARY(NTPoly ${ntpoly_src})
TARGET_LINK_LIBRARIES(NTPoly PRIVATE ${LIBS})
TARGET_INCLUDE_DIRECTORIES(NTPoly PRIVATE ${INC_PATHS})
TARGET_INCLUDE_DIRECTORIES(NTPoly PRIVATE
${INC_PATHS}
${CMAKE_Fortran_MODULE_DIRECTORY})
INSTALL(TARGETS NTPoly
EXPORT elsiConfig
......
......@@ -278,7 +278,7 @@ CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!> matAT = matA^T.
TYPE(Matrix_ldr), INTENT(INOUT) :: matAT
CALL ConstructEmptyMatrix(matAT, matA%rows, matA%columns)
CALL ConstructEmptyMatrix(matAT, matA%columns, matA%rows)
matAT%data = TRANSPOSE(matA%data)
END SUBROUTINE TransposeMatrix_ldr
......@@ -618,7 +618,7 @@ CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!> matAT = matA^T.
TYPE(Matrix_ldc), INTENT(INOUT) :: matAT
CALL ConstructEmptyMatrix(matAT, matA%rows, matA%columns)
CALL ConstructEmptyMatrix(matAT, matA%columns, matA%rows)
matAT%data = TRANSPOSE(matA%data)
END SUBROUTINE TransposeMatrix_ldc
......
......@@ -3,8 +3,8 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!> A module to store specifications for basic data types.
MODULE DataTypesModule
USE ISO_C_BINDING, ONLY : C_DOUBLE, C_DOUBLE_COMPLEX
USE NTMPIModule
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_DOUBLE, C_DOUBLE_COMPLEX
IMPLICIT NONE
PRIVATE
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......
......@@ -13,8 +13,7 @@ MODULE DensityMatrixSolversModule
USE PSMatrixAlgebraModule, ONLY : IncrementMatrix, MatrixMultiply, &
& DotMatrix, MatrixTrace, ScaleMatrix
USE PSMatrixModule, ONLY : Matrix_ps, ConstructEmptyMatrix, DestructMatrix, &
& CopyMatrix, PrintMatrixInformation, FillMatrixIdentity, &
& ConjugateMatrix
& CopyMatrix, PrintMatrixInformation, FillMatrixIdentity
USE SolverParametersModule, ONLY : SolverParameters_t, PrintParameters, &
& SolverParameters_init
IMPLICIT NONE
......
......@@ -3,9 +3,8 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!> Solve the matrix equation AX = B
MODULE LinearSolversModule
USE DataTypesModule, ONLY : NTREAL, MPINTREAL
USE DMatrixModule, ONLY : Matrix_ldr, DestructMatrix, &
& ConstructMatrixDFromS
USE DataTypesModule, ONLY : NTREAL
USE DMatrixModule, ONLY : DestructMatrix
USE LoadBalancerModule, ONLY : PermuteMatrix, UndoPermuteMatrix
USE LoggingModule, ONLY : EnterSubLog, ExitSubLog, WriteElement, &
& WriteHeader, WriteListElement
......@@ -15,8 +14,7 @@ MODULE LinearSolversModule
& MatrixMultiply, MatrixTrace, ScaleMatrix
USE PSMatrixModule, ONLY : Matrix_ps, ConstructEmptyMatrix, &
& TransposeMatrix, DestructMatrix, ConjugateMatrix, CopyMatrix, &
& FillMatrixIdentity, MergeMatrixLocalBlocks, PrintMatrixInformation
USE SMatrixModule, ONLY : Matrix_lsr
& FillMatrixIdentity, PrintMatrixInformation
USE SolverParametersModule, ONLY : SolverParameters_t, PrintParameters, &
& SolverParameters_init
IMPLICIT NONE
......
......@@ -5,8 +5,7 @@
MODULE MatrixMapsModule
USE DataTypesModule, ONLY : NTREAL, NTCOMPLEX
USE PSMatrixModule, ONLY : Matrix_ps, ConstructEmptyMatrix, &
& GetMatrixTripletList, FillMatrixFromTripletList, &
& DestructMatrix
& GetMatrixTripletList, FillMatrixFromTripletList
USE TripletListModule, ONLY : TripletList_r, TripletList_c, &
& DestructTripletList, AppendToTripletList, GetTripletAt, &
& ConstructTripletList
......
......@@ -7,7 +7,7 @@
MODULE MatrixMemoryPoolModule
USE DataTypesModule, ONLY: NTREAL, NTCOMPLEX
USE TripletModule, ONLY : Triplet_r, Triplet_c
USE ISO_C_BINDING, ONLY : c_int
USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_int
IMPLICIT NONE
PRIVATE
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......
......@@ -3,8 +3,7 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!> Module for reducing matrices across processes.
MODULE MatrixReduceModule
USE DataTypesModule, ONLY : NTREAL, MPINTREAL, NTCOMPLEX, MPINTCOMPLEX, &
& MPINTINTEGER
USE DataTypesModule, ONLY : NTREAL, MPINTREAL, MPINTCOMPLEX, MPINTINTEGER
USE SMatrixAlgebraModule, ONLY : IncrementMatrix
USE SMatrixModule, ONLY : Matrix_lsr, Matrix_lsc, ConstructEmptyMatrix, &
& DestructMatrix, CopyMatrix
......
......@@ -3,8 +3,7 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!> Module for reducing matrices across processes.
MODULE MatrixReduceModule
USE DataTypesModule, ONLY : NTREAL, MPINTREAL, NTCOMPLEX, MPINTCOMPLEX, &
& MPINTINTEGER
USE DataTypesModule, ONLY : NTREAL, MPINTREAL, MPINTCOMPLEX, MPINTINTEGER
USE SMatrixAlgebraModule, ONLY : IncrementMatrix
USE SMatrixModule, ONLY : Matrix_lsr, Matrix_lsc, ConstructEmptyMatrix, &
& DestructMatrix, CopyMatrix
......
......@@ -21,10 +21,9 @@ MODULE PSMatrixAlgebraModule
USE SMatrixModule, ONLY : Matrix_lsr, Matrix_lsc, DestructMatrix, CopyMatrix,&
& TransposeMatrix, ComposeMatrixColumns, MatrixToTripletList
USE TimerModule, ONLY : StartTimer, StopTimer
USE TripletListModule, ONLY : TripletList_r, TripletList_c, &
& DestructTripletList
USE ISO_C_BINDING
USE TripletListModule, ONLY : TripletList_r, TripletList_c
USE NTMPIModule
USE, INTRINSIC :: ISO_C_BINDING
IMPLICIT NONE
PRIVATE
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......
......@@ -28,8 +28,8 @@ MODULE PSMatrixModule
& DestructTripletList, SortTripletList, AppendToTripletList, &
& SymmetrizeTripletList, GetTripletAt, RedistributeTripletLists, &
& ShiftTripletList
USE ISO_C_BINDING
USE NTMPIModule
USE, INTRINSIC :: ISO_C_BINDING
IMPLICIT NONE
PRIVATE
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......@@ -367,7 +367,6 @@ CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! Temporary Variables
REAL(NTREAL) :: realval, cval
INTEGER :: bytes_per_character
CHARACTER(len=1) :: temp_char
LOGICAL :: found_comment_line
INTEGER :: mpi_status(MPI_STATUS_SIZE)
INTEGER :: full_buffer_counter
......@@ -381,7 +380,7 @@ CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ELSE
!! Setup Involves Just The Root Opening And Reading Parameter Data
CALL StartTimer("MPI Read Text")
bytes_per_character = c_sizeof(temp_char)
CALL MPI_Type_size(MPI_CHARACTER, bytes_per_character, ierr)
IF (IsRoot(process_grid_in)) THEN
header_length = 0
local_file_handler = 16
......@@ -700,7 +699,6 @@ CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! Local Data
TYPE(TripletList_r) :: triplet_list
TYPE(Matrix_lsr) :: merged_local_data
REAL(NTREAL) :: temp_data
!! Local Data
INTEGER, DIMENSION(:), ALLOCATABLE :: local_values_buffer
......@@ -708,8 +706,7 @@ CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
INTEGER(KIND=MPI_OFFSET_KIND) :: header_size
INTEGER(KIND=MPI_OFFSET_KIND) :: write_offset
!! Temporary Variables
INTEGER :: temp_int
INTEGER :: bytes_per_int, bytes_per_data
INTEGER :: bytes_per_int, bytes_per_entry
INTEGER, DIMENSION(4) :: header_buffer
INTEGER :: mpi_status(MPI_STATUS_SIZE)
INTEGER(KIND=MPI_OFFSET_KIND) :: zero_offset = 0
......@@ -720,8 +717,8 @@ CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
CALL MergeMatrixLocalBlocks(this, merged_local_data)
!! Determine Write Location
bytes_per_int = c_sizeof(temp_int)
bytes_per_data = c_sizeof(temp_data)
CALL MPI_Type_size(MPINTINTEGER, bytes_per_int, ierr)
CALL MPI_Type_extent(triplet_mpi_type, bytes_per_entry, ierr)
header_size = bytes_per_int*4
ALLOCATE(local_values_buffer(this%process_grid%slice_size))
CALL MPI_Allgather(SIZE(merged_local_data%values), 1, MPINTINTEGER,&
......@@ -731,7 +728,7 @@ CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
write_offset = write_offset + header_size
DO counter = 1,this%process_grid%within_slice_rank
write_offset = write_offset + &
& local_values_buffer(counter)*(bytes_per_int*2+bytes_per_data*1)
& local_values_buffer(counter)*(bytes_per_entry)
END DO
!! Write The File
......@@ -785,7 +782,6 @@ CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! Local Data
TYPE(TripletList_c) :: triplet_list
TYPE(Matrix_lsc) :: merged_local_data
COMPLEX(NTCOMPLEX) :: temp_data
!! Local Data
INTEGER, DIMENSION(:), ALLOCATABLE :: local_values_buffer
......@@ -793,8 +789,7 @@ CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
INTEGER(KIND=MPI_OFFSET_KIND) :: header_size
INTEGER(KIND=MPI_OFFSET_KIND) :: write_offset
!! Temporary Variables
INTEGER :: temp_int
INTEGER :: bytes_per_int, bytes_per_data
INTEGER :: bytes_per_int, bytes_per_entry
INTEGER, DIMENSION(4) :: header_buffer
INTEGER :: mpi_status(MPI_STATUS_SIZE)
INTEGER(KIND=MPI_OFFSET_KIND) :: zero_offset = 0
......@@ -805,8 +800,8 @@ CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
CALL MergeMatrixLocalBlocks(this, merged_local_data)
!! Determine Write Location
bytes_per_int = c_sizeof(temp_int)
bytes_per_data = c_sizeof(temp_data)
CALL MPI_Type_size(MPINTINTEGER, bytes_per_int, ierr)
CALL MPI_Type_extent(triplet_mpi_type, bytes_per_entry, ierr)
header_size = bytes_per_int*4
ALLOCATE(local_values_buffer(this%process_grid%slice_size))
CALL MPI_Allgather(SIZE(merged_local_data%values), 1, MPINTINTEGER,&
......@@ -816,7 +811,7 @@ CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
write_offset = write_offset + header_size
DO counter = 1,this%process_grid%within_slice_rank
write_offset = write_offset + &
& local_values_buffer(counter)*(bytes_per_int*2+bytes_per_data*1)
& local_values_buffer(counter)*(bytes_per_entry)
END DO
!! Write The File
......@@ -908,13 +903,12 @@ CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
CHARACTER(len=MAX_LINE_LENGTH) :: temp_string2
INTEGER :: temp_length
INTEGER :: bytes_per_character
CHARACTER(len=1) :: temp_char
INTEGER :: ierr
!! Merge all the local data
CALL MergeMatrixLocalBlocks(this, merged_local_data)
bytes_per_character = c_sizeof(temp_char)
CALL MPI_Type_size(MPI_CHARACTER, bytes_per_character, ierr)
!! Create the matrix size line
NEW_LINE_LENGTH = LEN(new_line('A'))
......@@ -974,8 +968,7 @@ CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
write_offset = 0
write_offset = write_offset + header_size
DO counter = 1,this%process_grid%within_slice_rank
write_offset = write_offset + &
& local_values_buffer(counter)
write_offset = write_offset + local_values_buffer(counter)
END DO
!! Global Write
......@@ -988,10 +981,10 @@ CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
IF (this%process_grid%within_slice_rank .EQ. 0) THEN
header_offset = 0
CALL MPI_File_write_at(mpi_file_handler,header_offset,header_line1, &
& LEN(header_line1), MPI_CHARACTER,mpi_status,ierr)
& LEN(header_line1), MPI_CHARACTER, mpi_status,ierr)
header_offset = header_offset + LEN(header_line1)
CALL MPI_File_write_at(mpi_file_handler,header_offset,header_line2, &
& LEN(header_line2), MPI_CHARACTER,mpi_status,ierr)
& LEN(header_line2), MPI_CHARACTER, mpi_status,ierr)
END IF
!! Write Local Data
CALL MPI_File_set_view(mpi_file_handler,write_offset,MPI_CHARACTER,&
......@@ -1041,13 +1034,12 @@ CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
CHARACTER(len=MAX_LINE_LENGTH) :: temp_string2
INTEGER :: temp_length
INTEGER :: bytes_per_character
CHARACTER(len=1) :: temp_char
INTEGER :: ierr
!! Merge all the local data
CALL MergeMatrixLocalBlocks(this, merged_local_data)
bytes_per_character = c_sizeof(temp_char)
CALL MPI_Type_size(MPI_CHARACTER, bytes_per_character, ierr)
!! Create the matrix size line
NEW_LINE_LENGTH = LEN(new_line('A'))
......@@ -1109,8 +1101,7 @@ CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
write_offset = 0
write_offset = write_offset + header_size
DO counter = 1,this%process_grid%within_slice_rank
write_offset = write_offset + &
& local_values_buffer(counter)
write_offset = write_offset + local_values_buffer(counter)
END DO
!! Global Write
......@@ -1123,10 +1114,10 @@ CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
IF (this%process_grid%within_slice_rank .EQ. 0) THEN
header_offset = 0
CALL MPI_File_write_at(mpi_file_handler,header_offset,header_line1, &
& LEN(header_line1), MPI_CHARACTER,mpi_status,ierr)
& LEN(header_line1), MPI_CHARACTER, mpi_status,ierr)
header_offset = header_offset + LEN(header_line1)
CALL MPI_File_write_at(mpi_file_handler,header_offset,header_line2, &
& LEN(header_line2), MPI_CHARACTER,mpi_status,ierr)
& LEN(header_line2), MPI_CHARACTER, mpi_status,ierr)
END IF
!! Write Local Data
CALL MPI_File_set_view(mpi_file_handler,write_offset,MPI_CHARACTER,&
......
......@@ -3,6 +3,7 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!> Module for load balancing the matrix multiplication calculation.
MODULE PermutationModule
USE DataTypesModule, ONLY : NTREAL
IMPLICIT NONE
PRIVATE
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......@@ -72,7 +73,7 @@ CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! Local Data
INTEGER :: counter
INTEGER :: random_integer
REAL(KIND=8) :: rand_temp
REAL(KIND=NTREAL) :: rand_temp
INTEGER :: swap_space
INTEGER, DIMENSION(:), ALLOCATABLE :: seed
INTEGER :: seed_size
......@@ -114,7 +115,7 @@ CONTAINS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! Local Data
INTEGER :: counter
INTEGER :: random_integer
REAL(KIND=8) :: rand_temp
REAL(KIND=NTREAL) :: rand_temp
INTEGER :: swap_space
INTEGER, DIMENSION(:), ALLOCATABLE :: seed
INTEGER :: seed_size
......
......@@ -6,10 +6,7 @@ MODULE ProcessGridModule
USE LoggingModule, ONLY : ActivateLogger, EnterSubLog, ExitSubLog, &
& WriteHeader, WriteListElement
USE NTMPIModule
USE ISO_C_BINDING, ONLY : c_int, c_bool
USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_int, c_bool
IMPLICIT NONE
PRIVATE
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......
......@@ -10,13 +10,11 @@ MODULE SMatrixAlgebraModule
& DestructMatrixMemoryPool, CheckMemoryPoolValidity, SetPoolSparsity, &
& ConstructMatrixMemoryPool
USE SMatrixModule, ONLY: Matrix_lsr, Matrix_lsc, DestructMatrix, CopyMatrix, &
& TransposeMatrix, PrintMatrix, ConstructMatrixFromTripletList, &
& ConstructEmptyMatrix, ConjugateMatrix
USE SVectorModule, ONLY : AddSparseVectors, DotSparseVectors, &
& PairwiseMultiplyVectors
& TransposeMatrix, ConjugateMatrix, ConstructMatrixFromTripletList, &
& ConstructEmptyMatrix
USE SVectorModule, ONLY : AddSparseVectors, PairwiseMultiplyVectors
USE TripletListModule, ONLY: TripletList_r, TripletList_c, SortTripletList, &
& DestructTripletList, ConstructTripletList
USE TimerModule, ONLY : StartTimer, StopTimer
IMPLICIT NONE
PRIVATE
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......
......@@ -3,13 +3,12 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!> A module for handling locally stored CSR matrices.
MODULE SMatrixModule
USE DataTypesModule, ONLY: NTREAL, MPINTREAL, NTCOMPLEX, MPINTCOMPLEX
USE DataTypesModule, ONLY: NTREAL, NTCOMPLEX
USE MatrixMarketModule, ONLY : ParseMMHeader
USE TripletListModule, ONLY: TripletList_r, TripletList_c, SortTripletList, &
& DestructTripletList, SetTripletAt, ConstructTripletList, &
& AppendToTripletList, SymmetrizeTripletList, ConvertTripletListType
& DestructTripletList, ConstructTripletList, AppendToTripletList, &
& SymmetrizeTripletList, ConvertTripletListType
USE TripletModule, ONLY : Triplet_r, Triplet_c
USE TimerModule, ONLY : StartTimer, StopTimer
IMPLICIT NONE
PRIVATE
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......
......@@ -7,7 +7,7 @@ MODULE TrigonometrySolversModule
USE EigenBoundsModule, ONLY : GershgorinBounds
USE LoadBalancerModule, ONLY : PermuteMatrix, UndoPermuteMatrix
USE LoggingModule, ONLY : EnterSubLog, ExitSubLog, WriteHeader, &
& WriteListElement, WriteElement, WriteCitation
& WriteElement, WriteCitation
USE PMatrixMemoryPoolModule, ONLY : MatrixMemoryPool_p, &
& DestructMatrixMemoryPool
USE PSMatrixAlgebraModule, ONLY : MatrixMultiply, IncrementMatrix, &
......
......@@ -8,8 +8,7 @@ MODULE TripletListModule
USE TripletModule, ONLY : Triplet_r, Triplet_c, CompareTriplets, &
& ConvertTripletType
USE MatrixMarketModule, ONLY : MM_SYMMETRIC, MM_SKEW_SYMMETRIC, MM_HERMITIAN
USE TimerModule, ONLY : StartTimer, StopTimer
USE ISO_C_BINDING, ONLY : c_int
USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_int
IMPLICIT NONE
PRIVATE
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......
......@@ -5,8 +5,8 @@
MODULE TripletModule
USE DataTypesModule, ONLY: NTREAL, MPINTREAL, NTCOMPLEX, MPINTCOMPLEX, &
& MPINTINTEGER
USE ISO_C_BINDING, ONLY : c_int
USE NTMPIModule
USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_int
IMPLICIT NONE
PRIVATE
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......
......@@ -5,7 +5,9 @@ ADD_LIBRARY(sips ${sips_src})
TARGET_LINK_LIBRARIES(sips PRIVATE ${LIBS})
TARGET_INCLUDE_DIRECTORIES(sips PRIVATE ${INC_PATHS})
TARGET_INCLUDE_DIRECTORIES(sips PRIVATE
${INC_PATHS}
${CMAKE_Fortran_MODULE_DIRECTORY})
INSTALL(TARGETS sips
EXPORT elsiConfig
......
......@@ -8,9 +8,10 @@ SET(CMAKE_Fortran_FLAGS "-O3 -xcore-avx512" CACHE STRING "Fortran flags")
SET(CMAKE_C_FLAGS "-O3 -xcore-avx512 -std=c99" CACHE STRING "C flags")
SET(CMAKE_CXX_FLAGS "-O3 -xcore-avx512 -std=c++11" CACHE STRING "C++ flags")
SET(ELPA2_KERNEL "AVX512" CACHE STRING "Use ELPA AVX512 kernel")
SET(USE_EXTERNAL_ELPA ON CACHE BOOL "Use external ELPA")
SET(ENABLE_PEXSI ON CACHE BOOL "Enable PEXSI")
SET(ENABLE_TESTS ON CACHE BOOL "Enable tests")
SET(LIB_PATHS "$ENV{MKLROOT}/lib/intel64" CACHE STRING "External library paths")
SET(LIBS "mkl_scalapack_lp64 mkl_blacs_intelmpi_lp64 mkl_intel_lp64 mkl_sequential mkl_core" CACHE STRING "External libraries")
SET(INC_PATHS "/mpcdf/soft/SLE_12_SP3/packages/skylake/elpa/intel_18_0_5-impi_2018_4/2018.05.001-standard/include/elpa-2018.05.001/modules" CACHE STRING "External library include paths")
SET(LIB_PATHS "/mpcdf/soft/SLE_12_SP3/packages/skylake/elpa/intel_18_0_5-impi_2018_4/2018.05.001-standard/lib $ENV{MKLROOT}/lib/intel64" CACHE STRING "External library paths")
SET(LIBS "elpa mkl_scalapack_lp64 mkl_blacs_intelmpi_lp64 mkl_intel_lp64 mkl_sequential mkl_core" CACHE STRING "External libraries")
### Draco ###
SET(CMAKE_Fortran_COMPILER "mpiifort" CACHE STRING "MPI Fortran compiler")
SET(CMAKE_C_COMPILER "mpiicc" CACHE STRING "MPI C compiler")
SET(CMAKE_CXX_COMPILER "mpiicpc" CACHE STRING "MPI C++ compiler")
SET(CMAKE_Fortran_FLAGS "-O3 -xavx2" CACHE STRING "Fortran flags")
SET(CMAKE_C_FLAGS "-O3 -xavx2 -std=c99" CACHE STRING "C flags")
SET(CMAKE_CXX_FLAGS "-O3 -xavx2 -std=c++11" CACHE STRING "C++ flags")
SET(USE_EXTERNAL_ELPA ON CACHE BOOL "Use external ELPA")
SET(ENABLE_PEXSI ON CACHE BOOL "Enable PEXSI")
SET(ENABLE_TESTS ON CACHE BOOL "Enable tests")
SET(INC_PATHS "/mpcdf/soft/SLE_12_SP3/packages/haswell/elpa/intel_18_0-impi_2018_3/2018.05.001-standard/include/elpa-2018.05.001/modules" CACHE STRING "External library include paths")
SET(LIB_PATHS "/mpcdf/soft/SLE_12_SP3/packages/haswell/elpa/intel_18_0-impi_2018_3/2018.05.001-standard/lib $ENV{MKLROOT}/lib/intel64" CACHE STRING "External library paths")
SET(LIBS "elpa mkl_scalapack_lp64 mkl_blacs_intelmpi_lp64 mkl_intel_lp64 mkl_sequential mkl_core" CACHE STRING "External libraries")
......@@ -12,6 +12,6 @@ SET(USE_EXTERNAL_ELPA ON CACHE BOOL "Use external ELPA")
SET(ENABLE_PEXSI ON CACHE BOOL "Enable PEXSI")
SET(ENABLE_TESTS ON CACHE BOOL "Enable Fortran tests")
SET(INC_PATHS "/home/wy29/opt/elpa-2018.05.001/include" CACHE STRING "Include paths")
SET(INC_PATHS "/home/wy29/opt/elpa-2018.05.001/include" CACHE STRING "External library include paths")
SET(LIB_PATHS "$ENV{MKLROOT}/lib/intel64 /home/wy29/opt/elpa-2018.05.001/lib" CACHE STRING "External library paths")
SET(LIBS "elpa mkl_scalapack_lp64 mkl_blacs_intelmpi_lp64 mkl_intel_lp64 mkl_sequential mkl_core" CACHE STRING "External libraries")