Page 1 of 2

Is CWiggler element parallelizable

Posted: 01 Nov 2010, 12:34
by wmliu
Hi,
I'm doing simulation of helical undulator using cwiggler elements. I tried to use pelegant with mpich2 but couldn't see any performance improvment. My computer has quad core and I launched pelegant using mpiexe -n 4 pelegant ....
Question: Is cwiggler element parallelized? Is there any difference between input file for serial simulation and parallel simulation?

Thanks,

wl

Re: Is CWiggler element parallelizable

Posted: 01 Nov 2010, 13:18
by michael_borland
CWIGGLER is parallelized. There's no need to change any input files in order to use the parallel version.

--Michael

Re: Is CWiggler element parallelizable

Posted: 01 Nov 2010, 18:28
by ywang25
wl,

Could you post or send your input files, so we can do a performance analysis? One tip to get reasonable performance is running simulation with a relatively large number of particles.
Please check the reference if you want all the 4 cores to track particles (n_cores-1 will be used for tracking by default):
http://www.aps.anl.gov/Accelerator_Syst ... gant.shtml

Yusong

Re: Is CWiggler element parallelizable

Posted: 02 Nov 2010, 00:08
by wmliu
Michael and Yusong

Thanks for your replies.
I realized that I'm still using the 21.0 version. My input file doesn't work with the latest version yet. I'll fix it and give it a try with the latest version to see if it make any difference or not.

Wanming

Re: Is CWiggler element parallelizable

Posted: 02 Nov 2010, 13:12
by wmliu
yusong

Please find the attached file. Still did not see any difference between parallel and serial runs.

Thanks,

Wanming

Re: Is CWiggler element parallelizable

Posted: 02 Nov 2010, 15:03
by ywang25
Wanming,

I tested your input files with 1000, and 10000 particles respectively on 10 CPU cores. Pelegant is faster for both cases, although not linear. For simulation with 10000 particles, Pelegant finished in 00:07:12 with 10 cores (9 cores for tracking), and it took 00:30:36 for elegant. Do you have other machines with a larger number of CPU cores for the performance test? Some system-related issues could be eliminated if running on different environment.

Re: Is CWiggler element parallelizable

Posted: 02 Nov 2010, 16:20
by wmliu
Yusong,

Thanks. I'll try it on a different system.

Wanming

Re: Is CWiggler element parallelizable

Posted: 02 Nov 2010, 16:40
by ywang25
I did a performance study on another cluster, witch does not have shared CPUs for different jobs, the performance is very good. More than 95% of time is spent on the CWIGGLER element.
Pelegant (8 cores, 7 cores for tracking) 00:04:10
elegant 00:28:34

Yusong

Re: Is CWiggler element parallelizable

Posted: 02 Nov 2010, 22:38
by wmliu
Yusong,

After I enabled DMASTER_READTITLE_ONLY in Makefile.OAG and rebuild the both SDDSlib and Pelegant, I'm now back on track. Is it there any reason not to enable it by default?

Thanks,
Wanming

Re: Is CWiggler element parallelizable

Posted: 03 Nov 2010, 08:22
by ywang25
It depends on which file system you used. I tested with the default configuration on both Lustre and GPFS parallel file system. The time spent on I/O part should be trivial for this test. You can comment out the "track" command and find out how much time spent on I/O before and after you enable DMASTER_READTITLE_ONLY. It will give you some idea if the file system is the bottleneck.

Yusong