-
Notifications
You must be signed in to change notification settings - Fork 5
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
MIPS64 barrier failures #95
Comments
I am looking into this issue. I have GNU UPC tests running on the same platforms right now, and think it likely the same bug is present there. An initial look at |
So far I only have ABI=n64 builds of clang-upc and ABI=n32 builds of GNU UPC. I continue to investigate. |
With ABI=n64 builds of GNU UPC I still don't see this error, despite the fact that upc_sync.h and upc_barrier.upc in the respective runtimes are nearly identical. I may have to give up on this issue as being too far outside my expertise (and because MIPS is likely to be of relatively low importance). |
I have completely testing GNU UPC and found no equivalent of this issue. Adding the possibly-missing read fence in |
Right now libupc is being compiled with -Os (optimization for speed). I was easily able to reproduce the problem with intrepid's 'test17' and it seems that barrier fails on negative ID values (in this case -1 which is used in UPC lock implementation - test17 is the first one to use locks). Test passes if libupc compiled with -O0. Test fails with only one thread. GDB does not work on MIPS gcc23 (I'll try to build a new one) and was not able to simple debug it. However, after adding some print statements, it seems that this trivial line of code fails: upc_barrier.upc
|
I tried to rearrange the code with no success. The code generated in a bad case:
I wonder if the processor has the load delay slot and Maybe we are not building clang correctly. |
Since gdb was segfaulting on gcc23 I had to add segfault instructions (*((volatile int *)0) = 0), generate core, and review registers, stack etc. Core of the problem is in this example:
that generates this code on mpis:
Call to The llvm code is like this:
On x86_64 there is no difference in LLVM between these two procedures. |
I am currently able to build clang-upc for MIPS64, both big- and little-endian, on Linux.
Currently libupc only builds for the "n64" ABI.
Running clang-upc "native" (not w/ the Berkeley UPCR) with the Berkeley UPC test harness reveals that over 300 tests fail at runtime with messages like the following:
This is reproducible on gcc22 (big-endian) and gcc{23,24} (little-endian) of the GCC CFarm.
On the little-endian systems, I built with:
On the big-endian system (gcc22) the system gcc/g++ is 4.6, which is too old to build clang-3.8.
I had to build a newer gcc/g++ (I chose 4.9 to match the little-endian systems).
That required that I build gmp, mpfr and mpc.
That, in turn, required that I track down a patch to fix builds of mpfr on MIPS w/ gcc-4.
So, you probably want to avoid trying to reproduce there.
If you do want to try, I can probably open perms on my install of gcc-4.9 for you.
The text was updated successfully, but these errors were encountered: