Skip to content

Commit 44f3f89

Browse files
committed
add error if seed file is not present
1 parent b5464f5 commit 44f3f89

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/MPIMCI.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ namespace MPIMCI
4747
std::ifstream seedfile;
4848
seedfile.open(filename);
4949

50+
if (!seedfile.good()) {throw std::runtime_error("Random seed file could not be found.");}
51+
5052
for (int i=0; i<offset; ++i) {
5153
if (seedfile.eof()) {throw std::runtime_error("Chosen seed offset is already larger than the number of seeds in seed file.");}
5254
uint_fast64_t skip;

0 commit comments

Comments
 (0)