You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.debug { "Submission $submissionDir finished with statusCode $statusCode"}
424
436
if (newSubmission.isGraded) {
425
-
// 137 means "out of memory"
426
-
val results =if (statusCode ==137) {
427
-
logger.debug { "Submission $submissionDir exit code is 137"}
428
-
if (killedContainer) {
429
-
Results(0.0, listOf("Your solution ran out of time. Check for infinite loops and ensure your solution is sufficiently fast even for challenging problem parameters."))
437
+
val results =when (statusCode) {
438
+
// out of memory
439
+
137-> {
440
+
logger.debug { "Submission $submissionDir exit code is 137" }
441
+
if (killedContainer) {
442
+
logger.debug { "Submission $submissionDir killed due to timeout" }
443
+
Results(
444
+
0.0,
445
+
listOf("Your solution ran out of time. Check for infinite loops and ensure your solution is sufficiently fast even for challenging problem parameters.")
446
+
)
447
+
} else {
448
+
logger.debug { "Submission $submissionDir out of memory" }
449
+
Results(
450
+
0.0,
451
+
listOf("Your solution ran out of memory. Make sure you aren't creating gigantic data structures.")
452
+
)
453
+
}
430
454
}
431
-
else {
432
-
Results(0.0, listOf("Your solution ran out of memory. Make sure you aren't creating gigantic data structures."))
455
+
// out of tmpfs disk space
456
+
201-> {
457
+
Results(
458
+
0.0,
459
+
listOf("Your solution wrote too much data, either to files, or by printing to the command line. Are you printing in an infinite loop?")
460
+
)
433
461
}
434
-
}
435
-
else {
436
-
try {
437
-
readResultsFile(submissionDir)
438
-
} catch (e:NoSuchFileException) {
439
-
Results(0.0, listOf("Your solution generated too much data written to files or printed to the command line (printing in an infinite loop?)"))
462
+
// none of the above, hopefully there are grading results
463
+
else-> {
464
+
try {
465
+
readResultsFile(submissionDir)
466
+
} catch (e:NoSuchFileException) {
467
+
logger.debug { "Submission $submissionDir no grade_results.json" }
468
+
Results(null,
469
+
listOf("No grading results. Please report this as a bug and provide as much detail as possible.")
0 commit comments