Collective comms - Quiz

Put what you have learned about Collective communication in OpenFOAM to the test.

--- primary_color: cyan secondary_color: lightgray text_color: black shuffle_questions: false shuffle_answers: true --- ## Basic collective comms Consider the following code snippet: ```java // obj.update() returns a bool, whether obj was updated or not. updated = Foam::returnReduce(obj.update(), andOp()); ``` The value of `updated` will: - [x] Be true if `obj` was updated on all processes. - [ ] Be true if `obj` was updated on at least one process. - [ ] Be always false, because `update()` is never called. ## Gathering values from processes Consider the following code snippet: ```java label i = random(0, 100); // Generate a random int locally Pstream::gather(i, maxOp