DFT-EFE
 
Loading...
Searching...
No Matches
ElpaScalapackManager.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2021. *
3 * The Regents of the University of Michigan and DFT-EFE developers. *
4 * *
5 * This file is part of the DFT-EFE code. *
6 * *
7 * DFT-EFE is free software: you can redistribute it and/or modify *
8 * it under the terms of the Lesser GNU General Public License as *
9 * published by the Free Software Foundation, either version 3 of *
10 * the License, or (at your option) any later version. *
11 * *
12 * DFT-EFE is distributed in the hope that it will be useful, but *
13 * WITHOUT ANY WARRANTY; without even the implied warranty *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
15 * See the Lesser GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License at the top level of DFT-EFE distribution. If not, see *
19 * <https://www.gnu.org/licenses/>. *
20 ******************************************************************************/
21
22// @author Sambit Das , Avirup Sircar
23//
24#ifndef elpaScalaManager_h
25#define elpaScalaManager_h
26
27#include "ProcessGrid.h"
28#include <vector>
29#include <elpa/elpa.h>
30#include "ScalapackWrapper.h"
32
33namespace dftefe
34{
35 namespace linearAlgebra
36 {
43 {
44 //
45 // methods
46 //
47 public:
48 unsigned int
50
51 std::shared_ptr<const ProcessGrid>
53
54 void
55 processGridELPASetup(const unsigned int na);
56 void
58
59 const elpa_t &
60 getElpaHandle() const;
61
62 elpa_t &
64
65 elpa_autotune_t &
67
68 const bool &
69 useElpa() const;
70
77 getMPICommunicator() const;
78
79
83 ElpaScalapackManager(const utils::mpi::MPIComm &mpi_comm_replica,
84 const size_type scalapackParalProcs,
85 const bool useELPA,
86 const size_type scalapackBlockSize,
87 const bool useELPADeviceKernel);
88
93
94 //
95 // mpi communicator
96 //
98
101
104
106 elpa_autotune_t d_elpaAutoTuneHandle;
107
110
112
114 const bool d_useELPA;
117
120
121 std::shared_ptr<const ProcessGrid> d_processGridDftefeWrapper;
122 };
123
124 /*--------------------- Inline functions --------------------------------*/
125
126 inline unsigned int
128 {
130 }
131
132 inline std::shared_ptr<const ProcessGrid>
134 {
136 }
137
138 inline const elpa_t &
140 {
141 return d_elpaHandle;
142 }
143
144 inline const bool &
146 {
147 return d_useELPA;
148 }
149
150 inline elpa_t &
152 {
154 }
155
156
157 inline elpa_autotune_t &
159 {
161 }
162 } // namespace linearAlgebra
163} // namespace dftefe
164#endif
Manager class for ELPA and ScaLAPACK.
Definition: ElpaScalapackManager.h:43
const size_type d_scalapackBlockSizeInp
Definition: ElpaScalapackManager.h:113
const size_type d_scalapackParalProcs
Definition: ElpaScalapackManager.h:115
elpa_t & getElpaHandlePartialEigenVec()
Definition: ElpaScalapackManager.h:151
elpa_t d_elpaHandle
ELPA handle.
Definition: ElpaScalapackManager.h:100
void processGridELPASetup(const unsigned int na)
Definition: ElpaScalapackManager.cpp:81
utils::mpi::MPIComm d_processGridCommunicatorActive
processGrid mpi communicator
Definition: ElpaScalapackManager.h:109
const bool d_useELPA
Definition: ElpaScalapackManager.h:114
const utils::mpi::MPIComm & getMPICommunicator() const
Get relevant mpi communicator.
Definition: ElpaScalapackManager.cpp:74
elpa_t d_elpaHandlePartialEigenVec
ELPA handle for partial eigenvectors of full proj ham.
Definition: ElpaScalapackManager.h:103
elpa_autotune_t d_elpaAutoTuneHandle
ELPA autotune handle.
Definition: ElpaScalapackManager.h:106
utils::mpi::MPIComm d_processGridCommunicatorActivePartial
Definition: ElpaScalapackManager.h:111
unsigned int d_scalapackBlockSize
ScaLAPACK distributed format block size.
Definition: ElpaScalapackManager.h:119
std::shared_ptr< const ProcessGrid > d_processGridDftefeWrapper
Definition: ElpaScalapackManager.h:121
elpa_autotune_t & getElpaAutoTuneHandle()
Definition: ElpaScalapackManager.h:158
~ElpaScalapackManager()
Destructor.
Definition: ElpaScalapackManager.cpp:51
void elpaDeallocateHandles()
Definition: ElpaScalapackManager.cpp:115
const bool & useElpa() const
Definition: ElpaScalapackManager.h:145
const elpa_t & getElpaHandle() const
Definition: ElpaScalapackManager.h:139
utils::mpi::MPIComm d_mpi_communicator
Definition: ElpaScalapackManager.h:97
std::shared_ptr< const ProcessGrid > getProcessGridDftefeScalaWrapper() const
Definition: ElpaScalapackManager.h:133
const bool d_useELPADeviceKernel
Definition: ElpaScalapackManager.h:116
unsigned int getScalapackBlockSize() const
Definition: ElpaScalapackManager.h:127
int MPIComm
Definition: MPITypes.h:84
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8