run_setup very slow for very long beam line.

Moderators: cyao, michael_borland

yuehao
Posts: 40
Joined: 25 Oct 2011, 14:50

run_setup very slow for very long beam line.

Post by yuehao » 03 Dec 2014, 20:56

Hi, Michael

I generated a quite long lattice and the run_setup takes 8 minutes to finish. Below are the output of run_setup:

Seeding random number generators
length of beamline START_TO_END per pass: 9.175199952533640e+04 m
statistics: ET: 00:07:57 CP: 476.88 BIO:0 DIO:0 PF:0 MEM:0

Is that normal to take so long time to read the lattice in?

Thanks,
Yue

michael_borland
Posts: 1951
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: run_setup very slow for very long beam line.

Post by michael_borland » 10 Dec 2014, 14:48

Yue,

Sorry for the delayed reply. I've been away and very busy since returning.

It is not expected to be that slow. I tried a lattice much bigger than that just now and it took only 5 seconds. Can you upload the lattice so I can have a look?

--Michael

yuehao
Posts: 40
Joined: 25 Oct 2011, 14:50

Re: run_setup very slow for very long beam line.

Post by yuehao » 10 Dec 2014, 14:57

It would be great if you can take a look. Please find the lattice file in attachment.

Also the run_setup is :
&run_setup
lattice = test.lte,
p_central = 12958.9317133,
rootname = 1KPartRAD_MLIGN_1um_CENTER,
centroid = %s.cen,
sigma = %s.sig,
use_beamline = start_to_end,
&end

Thanks a lot.
Yue
Attachments
test.lte
(1.24 MiB) Downloaded 164 times

yuehao
Posts: 40
Joined: 25 Oct 2011, 14:50

Re: run_setup very slow for very long beam line.

Post by yuehao » 10 Dec 2014, 15:05

By the way, I am using the macos binary, version 26.0.2.

michael_borland
Posts: 1951
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: run_setup very slow for very long beam line.

Post by michael_borland » 11 Dec 2014, 18:04

Yue,

I was able to improve this dramatically by using a hash table for some of the lattice parsing. The change will appear in the next version, which I hope to release next week or early in January. If you build from source, I can give it to you sooner.

--Michael

yuehao
Posts: 40
Joined: 25 Oct 2011, 14:50

Re: run_setup very slow for very long beam line.

Post by yuehao » 11 Dec 2014, 19:06

Thank you so much for the great news. I hope to use it ASAP so if the source is available, please let me know.

Best,
Yue

michael_borland
Posts: 1951
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: run_setup very slow for very long beam line.

Post by michael_borland » 12 Dec 2014, 10:42

Yue,

Here's the modified source file. It should build if you replace the existing file of the same name. Let me know of any problems.

--Michael
Attachments
get_beamline.c
(44.37 KiB) Downloaded 161 times

yuehao
Posts: 40
Joined: 25 Oct 2011, 14:50

Re: run_setup very slow for very long beam line.

Post by yuehao » 12 Dec 2014, 14:40

Hi, Michael

I recompiled elegant and the improvement is drastic. Thanks again.

However I failed in compiling Pelegant, with error on missing libSDDSmpi. Do I need any change when I compile SDDS for mpi version?

Best,
Yue

michael_borland
Posts: 1951
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: run_setup very slow for very long beam line.

Post by michael_borland » 12 Dec 2014, 14:42

Yue,

It should work if you do the following:

Code: Select all

% cd ~/epics/extensions/src/SDDS/SDDSlib
% make MPI=1
% cd ~/oag/apps/src/elegant
% make Pelegant
I'm assuming you have oag and epics in your home directory. If not, adjust accordingly.

--Michael

yuehao
Posts: 40
Joined: 25 Oct 2011, 14:50

Re: run_setup very slow for very long beam line.

Post by yuehao » 12 Dec 2014, 16:23

HI, Michael

I compiled the Pelegant without errors. However when I run it, I got errors:

table structure size is inconsistent
Error:
passed size is not equal to expected size for SDDS_DATASET structure
Passed size is 536, library size is 528

Could you advise on where this error comes from?

Thanks,
Yue

Post Reply