That’s not really feasible in the current implementation, since only parts of the whole code are multi-threaded and the threads are teared down during the serial parts.
All in all, I tried to use multiple threads for the
readVectorData function, although it has only been initialized once and it doesn’t work out. There is probably one critical section in the function call since it runs for a certain amount of time before I obtain a memory corruption and the program terminates. Still, I’m not sure about the reason… However, I can also read the data block-wise in serial using
readBlockVectorData and apply the same parallelization scheme using the obtained “block vector” as source vector and it works.
readVectorData call using a mutex worked also, but requires overall more synchronization across the threads.