Closed vikasmb closed 9 months ago
Tests don't pass (see CI for details).
@gunnarmorling Can you please review this again ? With my latest changes pushed to this PR, test_ci.sh
passes in my machine:
./test_ci.sh vikasmb
+ source ./prepare_vikasmb.sh
+ gtimeout -v 300 ./test.sh vikasmb
Validating calculate_average_vikasmb.sh -- src/test/resources/samples/measurements-1.txt
Validating calculate_average_vikasmb.sh -- src/test/resources/samples/measurements-10.txt
Validating calculate_average_vikasmb.sh -- src/test/resources/samples/measurements-10000-unique-keys.txt
Validating calculate_average_vikasmb.sh -- src/test/resources/samples/measurements-2.txt
Validating calculate_average_vikasmb.sh -- src/test/resources/samples/measurements-20.txt
Validating calculate_average_vikasmb.sh -- src/test/resources/samples/measurements-3.txt
Validating calculate_average_vikasmb.sh -- src/test/resources/samples/measurements-boundaries.txt
Validating calculate_average_vikasmb.sh -- src/test/resources/samples/measurements-complex-utf8.txt
Validating calculate_average_vikasmb.sh -- src/test/resources/samples/measurements-dot.txt
Validating calculate_average_vikasmb.sh -- src/test/resources/samples/measurements-rounding.txt
Validating calculate_average_vikasmb.sh -- src/test/resources/samples/measurements-short.txt
Validating calculate_average_vikasmb.sh -- src/test/resources/samples/measurements-shortest.txt
echo $?
0
Fails when running on the eval machine (on 32 cores, I suppose this messes up the chunking):
+ timeout -v 300 ./test.sh vikasmb
Validating calculate_average_vikasmb.sh -- src/test/resources/samples/measurements-10000-unique-keys.txt
Validating calculate_average_vikasmb.sh -- src/test/resources/samples/measurements-10.txt
Validating calculate_average_vikasmb.sh -- src/test/resources/samples/measurements-1.txt
Validating calculate_average_vikasmb.sh -- src/test/resources/samples/measurements-20.txt
Exception in thread "main" java.lang.IndexOutOfBoundsException
at java.base/java.nio.Buffer$1.apply(Buffer.java:757)
at java.base/java.nio.Buffer$1.apply(Buffer.java:754)
at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:213)
at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:210)
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
at java.base/java.nio.Buffer.checkIndex(Buffer.java:768)
at java.base/java.nio.DirectByteBuffer.get(DirectByteBuffer.java:358)
at dev.morling.onebrc.CalculateAverage_vikasmb$FileChunker.adjustPos(CalculateAverage_vikasmb.java:123)
at dev.morling.onebrc.CalculateAverage_vikasmb$FileChunker.initChunks(CalculateAverage_vikasmb.java:108)
at dev.morling.onebrc.CalculateAverage_vikasmb$FileChunker.<init>(CalculateAverage_vikasmb.java:89)
at dev.morling.onebrc.CalculateAverage_vikasmb.main(CalculateAverage_vikasmb.java:50)
Closing this one, as I haven't heard back and we're after the cut-off time. Thanks a lot for participating nevertheless, @vikasmb!
Check List:
[x] Tests pass (
./test.sh <username>
shows no differences between expected and actual outputs)[x] All formatting changes by the build are committed
[x] Your launch script is named
calculate_average_<username>.sh
(make sure to match casing of your GH user name) and is executable[x] Output matches that of
calculate_average_baseline.sh
[x] For new entries, or after substantial changes: When implementing custom hash structures, please point to where you deal with hash collisions (line number)
Execution time: 30s
Execution time of reference implementation: 42s