[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: calculix-ccx multithreaded not working



Hi Felix, 

just to give you an update on my progress so far. It took a while to find a 
case large enough to get significant differences between single and multiple cpu 
usage.

I used the tutorial from here[1]. I run ccx (compiled and packaged from the 
git-repo on alioth) with the following command for X threads. With X being 1, 
2 and 4. 

export OMP_NUM_THREADS=X; /usr/bin/time -o TimingLog_CPUX.log -a ccx -i hook

As I can see, everything runs as expected. I see additional threads in htop 
for each cpu. So for OMP_NUM_THREADS=2 i see 3 threads. But only, when the 
calculation is handed over to spooles. A few seconds after the output of 
"Using up to 4 cpu(s) for spooles."

Also, the time required to complete the calculation decreases with more cpus 
in use.  Approximately 4m for 1 cpu and 2m30.00s for a calculation with 4 
cpus.

> As you can see I tried with 2, but have done it with 4 and 6 as well.
> The output messages and the messages in spooles.out change
> accordingly, but the runtime and the cpu usage as reported by htop
> remain the same.

There is an option for htop, to list each thread process. You can turn this 
behavior on by pressing H or in the "Setup / Display options" menu, "Hide 
userland threads". Can you please test, whether switching this option on/off 
does change anything? 

Another question: How large is your case? Is it large enough, to get a 
significant difference between single and multiple cpu usage? 
The normal test cases shipped in the orig-tar of ccx normally are to small to 
get an improvement using more cpus.

Hopefully the "solution" above helps. Notwithstanding the above I will dig a 
little deeper, maybe I missed something.

Kind regards
Wolfgang

[1] http://www.libremechanics.com/


Reply to: