Example install of Pelegant from source ... and questions
Posted: 10 Jun 2009, 11:21
Hi,
I've been trying to build Pelegant (and SDDS). I thought it would be useful to post our experience. I have a question for you at the end. Here's what we did...
To build Pelegant on lancs2.nw-grid.ac.uk we needed to make the following changes from the instructions at http://www.aps.anl.gov/Accelerator_Syst ... inux.shtml ...
1. Build a shared version of LAPACK:
Download from here http://www.netlib.org/lapack/
Follow the instructions to build it shared here http://icl.cs.utk.edu/lapack-forum/view ... ?f=2&t=908
2. To build SDDS:
In epics/extensions/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64
we add the lines
USR_CFLAGS+=-L/usr/lib64/curses -L/usr/lib64
USR_LDFLAGS+=-L/usr/lib64/curses -L/usr/lib64 -L/usr/local/lib64
and comment in the lines
MOTIF_LIB=/usr/lib64
MOTIF_INC=/usr/include
Now "make" in /epics/extension/configure.
Then go to epics/extensions/src/SDDS/SDDSlib/Makefile.OAG
Delete the line MPI=0
(!)
Then go to epics/extensions/lib/linux-x86_64 and do
ln -s /usr/lib64/libpng.a libpng.a
Then in /epics/extensions/src/SDDS/SDDSaps/sddsplots/Makefile.OAG
comment out the line
STATIC_LDFLAGS += -L/usr/lib
Now SDDS should build.
2. To build Elegant:
Go to oag/apps/configure/CONFIG
Change SHARED_LIBRARIES=NO to SHARED_LIBRARIES=YES
Go to oag/apps/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64
Change STATIC_BUILD=YES to STATIC_BUILD=NO
Change the last two lines so it can find the lapack you've just built...
LDLIBS_READLINE = -L/usr/lib64/curses -lreadline -lcurses
USR_LDFLAGS+= -L/home/dlphw/lapack-3.2.1
3. module load openmpi
4. On test i find that Pelegant is unable to read in SDDS distributions in ascii format. Do an sddsconvert -binary on the input distribution to read it in binary format.
5. I now have a MPI_File_open failed: MPI_ERR_IO: input/output error
when it tried to write a file ... investigating
... that's what we did. It crashes when writing output files. Serial elegant works ok though. Is it something to do with removing the MPI=0 line, or some static vs shared library inconsistancy. Or something???
I've been trying to build Pelegant (and SDDS). I thought it would be useful to post our experience. I have a question for you at the end. Here's what we did...
To build Pelegant on lancs2.nw-grid.ac.uk we needed to make the following changes from the instructions at http://www.aps.anl.gov/Accelerator_Syst ... inux.shtml ...
1. Build a shared version of LAPACK:
Download from here http://www.netlib.org/lapack/
Follow the instructions to build it shared here http://icl.cs.utk.edu/lapack-forum/view ... ?f=2&t=908
2. To build SDDS:
In epics/extensions/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64
we add the lines
USR_CFLAGS+=-L/usr/lib64/curses -L/usr/lib64
USR_LDFLAGS+=-L/usr/lib64/curses -L/usr/lib64 -L/usr/local/lib64
and comment in the lines
MOTIF_LIB=/usr/lib64
MOTIF_INC=/usr/include
Now "make" in /epics/extension/configure.
Then go to epics/extensions/src/SDDS/SDDSlib/Makefile.OAG
Delete the line MPI=0
(!)
Then go to epics/extensions/lib/linux-x86_64 and do
ln -s /usr/lib64/libpng.a libpng.a
Then in /epics/extensions/src/SDDS/SDDSaps/sddsplots/Makefile.OAG
comment out the line
STATIC_LDFLAGS += -L/usr/lib
Now SDDS should build.
2. To build Elegant:
Go to oag/apps/configure/CONFIG
Change SHARED_LIBRARIES=NO to SHARED_LIBRARIES=YES
Go to oag/apps/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64
Change STATIC_BUILD=YES to STATIC_BUILD=NO
Change the last two lines so it can find the lapack you've just built...
LDLIBS_READLINE = -L/usr/lib64/curses -lreadline -lcurses
USR_LDFLAGS+= -L/home/dlphw/lapack-3.2.1
3. module load openmpi
4. On test i find that Pelegant is unable to read in SDDS distributions in ascii format. Do an sddsconvert -binary on the input distribution to read it in binary format.
5. I now have a MPI_File_open failed: MPI_ERR_IO: input/output error
when it tried to write a file ... investigating
... that's what we did. It crashes when writing output files. Serial elegant works ok though. Is it something to do with removing the MPI=0 line, or some static vs shared library inconsistancy. Or something???