installing elegant on NERSC Cori

Moderators: cyao, soliday

Post Reply
GPenn
Posts: 40
Joined: 28 Aug 2018, 09:46

installing elegant on NERSC Cori

Post by GPenn » 05 Sep 2018, 18:38

Hi,

I just installed SDDS and elegant on the CORI system on NERSC. I haven't seen messages about installing on NERSC, so I thought it was worth mentioning what I did. I can give the full procedure if anyone is interested. Among other things, I had to remove the special
ifeq (cori, $(findstring cori, $(HOSTNAME)))
parts of several Makefiles to get it to compile. I used the PrgEnv-intel module, was I supposed to use the PrgEnv-gnu module instead?
Everything seems to work okay except for sddsbrightness, which failed to build giving the error
sddsurgent.c:322: multiple definition of `main'
Maybe that is also related to using the intel compilers. But I don't think at the ALS we will be using those functions.

Also, the NERSC computers and LBL's LRC cluster all use $GSL_DIR as the environment variable for the path to the GSL installation.
In the Makefiles where SYSGSL is defined, it would simplify things to add the lines

$(GSL_DIR)/lib/libgsl.a \
$(GSL_DIR)/lib/libgsl.so \

to the list of places to look for the GSL libraries. If the ANL system uses a different environment variable, that would be just as good.

Thanks,
Gregg

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: installing elegant on NERSC Cori

Post by soliday » 10 Sep 2018, 14:20

Glad you got it to work. Last time I built it on cori I was using PrgEnv-gnu which probably accounts for the differences. I have found some notes with instructions but I no longer have an active account there.

#Put these inside .bash_profile.ext or execute on the command line
module swap PrgEnv-intel PrgEnv-gnu
module load openmpi
export HOST_ARCH=linux-x86_64
export EPICS_HOST_ARCH=linux-x86_64

#Configure Base rules to use compiler wrappers CC and CCC and build Base
cd base/configure
echo CC=cc >> CONFIG
echo CCC=CC >> CONFIG
echo COMMANDLINE_LIBRARY=READLINE_NCURSES >> CONFIG
echo SHARED_LIBRARIES=NO >> CONFIG
cd ..
make

#Build SDDS stuff. Note we have to build tiff and png first.
cd ../extensions/configure
make
cd ../src/SDDS/tiff
make
cd ../png
make
cd ..
make
#This should fail at building mpl_motif. We need to build it without the CCC wrapper.
cd SDDSaps/sddsplots/motifDriver/O.linux-x86_64

/usr/bin/g++ -o mpl_motif -L/global/u1/s/soliday/cori/epics/extensions/lib/linux-x86_64 -Wl,-rpath,/global/u1/s/soliday/cori/epics/extensions/lib/linux-x86_64 -rdynamic -m64 mpl_motif.o xwdfunc.o -lmdbplt -lSDDS1 -lmdblib -llzma -lgd -lpng -lz -lXm -lXmu -lXt -lX11 -lpthread -lreadline -lncurses -lm -lrt -ldl -lgcc
#NOTE: change the paths to your own paths

cd ../../../..
make

#Time to build Elegant stuff
cd ../../../../oag/apps/configure
#Edit the RELEASE file to set the EPICS_BASE location similar to EPICS_BASE=/global/homes/s/soliday/cori/epics/base
make
cd ../src/physics
make
cd ../xraylib
make
cd ../elegant
#We need nlpp in our path
export PATH=$PATH:/global/u1/s/soliday/cori/epics/extensions/bin/linux-x86_64
make
cd elegantTools
make
cd ../sddsbrightness
#edit Makefile and change F77 for linux-x86_64 to equal ftn instead of gfortran
make

#Now lets build the MPI version
cd ../../../../../epics/extensions/src/SDDS/SDDSlib
make clean
make MPI=1
cd ../pgapack
make clean
make
cd ../../../../../oag/apps/src/elegant
make clean
make Pelegant

Post Reply