I have still problem with the data transfer from Foam to ViennaCL. I am now converting the Foam LDU matrix to CSR, the format the ViennaCL compressed_matrix uses but I get a memory allocation error, when I run a simulation. I am now using the .set() functionality instead of a loop.
I managed to start one case which usually runs in a few seconds on one core and has very low memory requirements, well be low 1Gb.
When I ran my application with ViennaCL, the memory usage jumped to 32gb + 18.5Gb swap, while core utilization was low across all 8 threads so the openMP backend seems to work.
=> there's a hugh memory leak which I can't find.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Karli,
I have still problem with the data transfer from Foam to ViennaCL. I am now converting the Foam LDU matrix to CSR, the format the ViennaCL compressed_matrix uses but I get a memory allocation error, when I run a simulation. I am now using the .set() functionality instead of a loop.
Here the first lines of the error messages:
And these are my new import functions:
Can you spot the error causing the memory allocation problem?
T.
An update:
I changed memory allocation to malloc, as this is apparently Foam style:
Now the function looks like that, memory allocation seems ok but another issue appears see further down:
New error:
I managed to start one case which usually runs in a few seconds on one core and has very low memory requirements, well be low 1Gb.
When I ran my application with ViennaCL, the memory usage jumped to 32gb + 18.5Gb swap, while core utilization was low across all 8 threads so the openMP backend seems to work.
=> there's a hugh memory leak which I can't find.
Hi tario,
please run your code through
valgrind
in order to locate memory leaks. Your call to the .set()-member should beBest regards,
Karli