Skip to content

Commit aa11c23

Browse files
committed
patched distributed validation test
The API functions createFullStateDiagMatr() and createCustomFullStateDiagMatr() worked correctly though their "insufficient distributed memory" validation error messages were erroneously excluded from the expected message lists in their respective unit tests.
1 parent cd01c6f commit aa11c23

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

quest/src/core/validation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1599,7 +1599,7 @@ void assertQuregFitsInCpuMem(int numQubits, int isDensMatr, int isDistrib, QuEST
15991599
vars["${NUM_NODES}"] = numQuregNodes;
16001600

16011601
// require expensive node consensus in case of heterogeneous RAMs
1602-
assertAllNodesAgreeThat(quregFitsInMem, report::NEW_QUREG_CANNOT_FIT_INTO_NON_DISTRIB_CPU_MEM, vars, caller);
1602+
assertAllNodesAgreeThat(quregFitsInMem, msg, vars, caller);
16031603
}
16041604

16051605
void assertQuregFitsInGpuMem(int numQubits, int isDensMatr, int isDistrib, int isGpuAccel, QuESTEnv env, const char* caller) {

tests/unit/matrices.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,8 @@ TEST_CASE( "createFullStateDiagMatr", TEST_CATEGORY ) {
614614
ContainsSubstring("failed") ||
615615
ContainsSubstring("insufficient available memory") ||
616616
ContainsSubstring("available GPU memory") ||
617-
ContainsSubstring("exceeds the available RAM") );
617+
ContainsSubstring("exceeds the available RAM") ||
618+
ContainsSubstring("exceeds the local available RAM") );
618619
#endif
619620
}
620621

@@ -714,7 +715,8 @@ TEST_CASE( "createCustomFullStateDiagMatr", TEST_CATEGORY ) {
714715
ContainsSubstring("failed") ||
715716
ContainsSubstring("insufficient available memory") ||
716717
ContainsSubstring("available GPU memory") ||
717-
ContainsSubstring("exceeds the available RAM") );
718+
ContainsSubstring("exceeds the available RAM") ||
719+
ContainsSubstring("exceeds the local available RAM") );
718720
#endif
719721
}
720722
}

0 commit comments

Comments
 (0)