Skip to content

Commit efffe11

Browse files
author
dyzheng
committed
fix: prevent integer overflow in BFGS lwork calculation
1 parent 2087308 commit efffe11

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

source/source_relax/bfgs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ void BFGS::PrepareStep(std::vector<ModuleBase::Vector3<double>>& force,
128128
//! call dysev
129129
std::vector<double> omega(3*size);
130130
std::vector<double> work(3*size*3*size);
131-
int lwork=3*size*3*size;
131+
long long lwork=3*size*3*size;
132132
int info=0;
133133
std::vector<double> H_flat;
134134

0 commit comments

Comments
 (0)