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

Installation problem make -j $(nproc) command #201

Open
GuillermoVA opened this issue Jun 21, 2021 · 5 comments
Open

Installation problem make -j $(nproc) command #201

GuillermoVA opened this issue Jun 21, 2021 · 5 comments
Labels

Comments

@GuillermoVA
Copy link

I have installed all prerequisites in raspberry pi 3 and when I execute the command make -j $(nproc) it returns this error:
1
2

@KenBirman
Copy link
Contributor

Well, you are the first to try this on a Raspberry Pi, so some issues are to be expected.

What I am noticing is the line where it says you killed the C++ command before it finished (in the first window). Is it possible that some sort of resource limit was exceeded? Linux automatically kills processes that consume more than the limit permitted in terms of file sizes, compute time, etc...

@KenBirman
Copy link
Contributor

Also, how large are pointers on the Raspberry Pi? On the machines we traditionally build on, we have 64-bit address spaces. I am thinking that if your pointers are 32-bit, then void* has a smaller size than it normally does for us, and perhaps something in our code is "surprised" by this? We seem to be getting a lot of errors about pointer sizes.

@etremel
Copy link
Contributor

etremel commented Jun 22, 2021

I think Ken is probably right that the problem is arising from a difference in pointer sizes. The errors you're getting (which come from compiling our test programs like volatile_temporal_send_test.cpp, by the way) originate from this method in /include/derecho/core/detail/remote_invocable.hpp:

template <FunctionTag Tag, typename NewClass, typename Ret, typename... Args>
partial_wrapped<Tag, Ret, NewClass, Args...> tag(Ret (NewClass::*fun)(Args...)) {
static_assert(!std::is_reference<Ret>::value && !std::is_pointer<Ret>::value, "RPC-registered functions cannot return references or pointers!");
//Fold-expression asserts the boolean expression for all Args in the parameter pack
static_assert(((std::is_reference<Args>::value || sizeof(Args) < 2 * sizeof(void*)) && ...), "RPC-registered functions must take non-pointer-size arguments by reference to avoid extra copying.");
return partial_wrapped<Tag, Ret, NewClass, Args...>{fun};
}

The static assert compares the size of each argument of an RPC function to sizeof(void*) to determine if the argument is "pointer-size." If the argument is larger than pointer-size, and is not being passed by reference, we produce an error because this means you've registered an RPC function that takes some kind of large object by-value. However, the size of void* depends on your operating system and architecture, so our heuristic might not always work.

In particular, if you're compiling for a 32-bit architecture, then void* would be 32 bits, which is smaller than uint64_t. It's perfectly fine to write an RPC function that takes a uint64_t by value, but the static assert might fail anyway in this case. I thought I had accounted for this case by comparing the size of each argument to 2 * sizeof(void*), but maybe your void* is a little less than 32 bits for some reason.

@mpmilano
Copy link
Member

Beyond the compile-time errors, please keep in mind that we had never attempted to run Derecho on armv7 or armv8 in previous deployments; the arm architecture handles concurrency very differently from x86 TSO, and could expose race conditions which we would not observe on our deployments.

If you're excited about wading into the unknown, it's probably a good idea to use raspberry pi 4 (or later) and upgrade to the 64-bit Raspbian distribution, which will have the pointer size that Derecho expects.

@KenBirman
Copy link
Contributor

So... what this adds up to is that you need to solve this on your own, then tell us what you did to get it to work. Derecho is supported by the exact people who posted here (plus a few others), but none of us has a need to get the system running on an ARM 32-bit system right now, so you'll get advice and explanations as needed, but we won't be able to do this for you or anything like that. But feel free to post questions here -- and don't worry about whether or not they are great questions; we aren't like the people on stackoverflow who tend to mock newcomers... -- we will be as helpful as we can.

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

No branches or pull requests

4 participants