Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test TestAbsolute fail on MacOS x84-64 #79

Open
StRigaud opened this issue Oct 16, 2024 · 6 comments
Open

Test TestAbsolute fail on MacOS x84-64 #79

StRigaud opened this issue Oct 16, 2024 · 6 comments

Comments

@StRigaud
Copy link
Member

wrong value return from the Array, failling the asserts statements

Fail on MacOS x84-64 (with radeon) of @tinevez
Pass on my Ubuntu and MacOS M2 sillicon

@haesleinhuepf
Copy link
Member

Can you please copy the exact error message?

@StRigaud
Copy link
Member Author

@tinevez when you have 5 min, can you reproduce this?

@tinevez
Copy link

tinevez commented Oct 17, 2024

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running TestAbsolute
[ERROR] Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.939 s <<< FAILURE! -- in TestAbsolute
[ERROR] TestAbsolute.testAbsolute -- Time elapsed: 0.909 s <<< FAILURE!
org.opentest4j.AssertionFailedError: expected: <1> but was: <131077>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:150)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:145)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:531)
	at TestAbsolute.testAbsolute(TestAbsolute.java:28)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at java.util.ArrayList.forEach(ArrayList.java:1257)

[ERROR] TestAbsolute.testAbsolute1 -- Time elapsed: 0.008 s <<< FAILURE!
org.opentest4j.AssertionFailedError: expected: <1> but was: <1299282432>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:150)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:145)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:531)
	at TestAbsolute.testAbsolute1(TestAbsolute.java:45)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at java.util.ArrayList.forEach(ArrayList.java:1257)

@tinevez
Copy link

tinevez commented Oct 17, 2024

I could pinpoint the error to the

ArrayJ.fillMemory()

method, which does not work.

If in the test file TestAbsolute you replace at line 20

in.fillMemory(-1);

by

in.writeFromArray( new int[] { -1, -1, -1, -1 } );

then the test pass.

Any other change (using UINT, INT, FLOAT etc.) has no impact.

@StRigaud
Copy link
Member Author

Indeed, the memory fill process is different for MacOS (I forgot about this). I will try to dig this

@StRigaud
Copy link
Member Author

See:
https://github.com/clEsperanto/CLIc/blob/a599c240106e714864d2776e94c421e12fd853d4/clic/src/array.cpp#L249-L304

The case only apply for Apple arm64, I maybe should export it to all apple device

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants