Problems in performing Saxpy with mapping/unmapping

Or do I have to declare the buffers as local variables inside the loop (instead of simply declaring them as global and (re)allocate them each iteration)?

Yes, declare the buffers as local variables inside the loop so that upon leaving the scope of the loop those local variables, that is, the buffers, are released.

You are right, now it works :slight_smile: Thank you thousands thousands thousands!