Merge branch '318-build-module-for-elegant-2025-2-0' into 'master'
Resolve "build module for Elegant 2025.2.0" Closes #318 See merge request Pmodules/buildblocks!503
This commit is contained in:
+75
-5
@@ -1,16 +1,86 @@
|
|||||||
#!/usr/bin/env modbuild
|
#!/usr/bin/env modbuild
|
||||||
|
|
||||||
pbuild::add_to_group 'MPI'
|
export LC_ALL=C
|
||||||
|
|
||||||
pbuild::prep() {
|
export HOST_ARCH=linux-x86_64
|
||||||
:
|
export EPICS_HOST_ARCH=linux-x86_64
|
||||||
|
export RPN_DEFNS=${PREFIX}/defns.rpn
|
||||||
|
|
||||||
|
pbuild::pre_prep() {
|
||||||
|
mkdir -p "${PREFIX}/epics"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pbuild::post_prep() {
|
||||||
|
cd "${PREFIX}/epics"
|
||||||
|
ln -s base-* base
|
||||||
|
cd extensions
|
||||||
|
git init
|
||||||
|
git remote add origin https://github.com/epics-extensions/extensions
|
||||||
|
git fetch
|
||||||
|
git checkout master
|
||||||
|
}
|
||||||
|
|
||||||
pbuild::configure() {
|
pbuild::configure() {
|
||||||
:
|
local -- dir="${PREFIX}/epics/base/configure"
|
||||||
|
echo "SHARED_LIBRARIES=NO" >> "${dir}/CONFIG"
|
||||||
|
echo "LINKER_USE_RPATH=NO" >> "${dir}/CONFIG"
|
||||||
|
echo "COMMANDLINE_LIBRARY=" >> "${dir}/CONFIG"
|
||||||
}
|
}
|
||||||
|
|
||||||
pbuild::compile() {
|
pbuild::compile() {
|
||||||
:
|
C_INCLUDE_PATH+=:"${PREFIX}/epics/extensions/src/SDDS/hdf5/src"
|
||||||
|
C_INCLUDE_PATH+=:"${PREFIX}/epics/extensions/src/SDDS/hdf5/src/H5FDsubfiling"
|
||||||
|
export C_INCLUDE_PATH
|
||||||
|
|
||||||
|
cd "${PREFIX}/epics/base"
|
||||||
|
make -j 5 || exit 42
|
||||||
|
|
||||||
|
cd "${PREFIX}/epics/extensions/configure"
|
||||||
|
make clean all || exit 42
|
||||||
|
|
||||||
|
cd "${PREFIX}/epics/extensions/src/SDDS"
|
||||||
|
make clean
|
||||||
|
make || exit 42
|
||||||
|
make || exit 42
|
||||||
|
make || exit 42
|
||||||
|
|
||||||
|
cd "${PREFIX}/epics/extensions/src/oagca"
|
||||||
|
make clean
|
||||||
|
make -j || exit 42
|
||||||
|
|
||||||
|
cd "${PREFIX}/epics/extensions/src/SDDSepics"
|
||||||
|
make clean
|
||||||
|
make -j || exit 42
|
||||||
|
|
||||||
|
cd "${PREFIX}/oag/apps/configure"
|
||||||
|
echo "EPICS_BASE=${PREFIX}/epics/base" >> RELEASE
|
||||||
|
echo "EPICS_EXTENSIONS=${PREFIX}/epics/extensions" >> RELEASE
|
||||||
|
make clean all || exit 42
|
||||||
|
|
||||||
|
cd "${PREFIX}/oag/apps/src/tcltklib"
|
||||||
|
make clean all || exit 42
|
||||||
|
|
||||||
|
cd "${PREFIX}/oag/apps/src/tcltkapp/oagapp"
|
||||||
|
make clean all || exit 42
|
||||||
|
|
||||||
|
cd "${PREFIX}/oag/apps/src/elegant"
|
||||||
|
make clean || exit 42
|
||||||
|
make -j || exit 42
|
||||||
|
|
||||||
|
# build the parallel version of Elegant
|
||||||
|
mpicc="${OPENMPI_DIR}/bin/mpicc"
|
||||||
|
mpicxx="${OPENMPI_DIR}/bin/mpic++"
|
||||||
|
fortran="${GCC_DIR}/bin/gfortran -m64 -ffixed-line-length-132"
|
||||||
|
|
||||||
|
cd "${PREFIX}/epics/extensions/src/SDDS/SDDSlib"
|
||||||
|
make clean
|
||||||
|
make -e -j F77="${fortran}" MPI_CC="${mpicc}" MPI_CCC="${mpicxx}"
|
||||||
|
|
||||||
|
cd "${PREFIX}/oag/apps/src/elegant"
|
||||||
|
make clean
|
||||||
|
make -e -j F77="${fortran}" MPI_CC="${mpicc}" MPI_CCC="${mpicxx}"
|
||||||
}
|
}
|
||||||
|
|
||||||
pbuild::install() {
|
pbuild::install() {
|
||||||
:
|
:
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
--- 12.3.0.orig/oag/apps/src/elegant/src/Makefile.mpi 2025-07-07 11:16:47.000000000 +0200
|
||||||
|
+++ 12.3.0/oag/apps/src/elegant/src/Makefile.mpi 2025-07-07 16:42:24.000000000 +0200
|
||||||
|
@@ -210,7 +210,7 @@
|
||||||
|
include ../Makefile.build
|
||||||
|
|
||||||
|
$(OBJ_DIR)/Pelegant$(EXEEXT): $(Pelegant_OBJS) $(PROD_DEPS)
|
||||||
|
- $(LINKEXE) $(OUTPUTEXE) $(Pelegant_OBJS) $(LDFLAGS) $(LIB_LINK_DIRS) $(PROD_LIBS) $(PROD_LIBS_SDDS) $(PROD_SYS_LIBS)
|
||||||
|
+ LD_LIBRARY_PATH=/opt/psi/Programming/cuda/12.2.0/lib64:/opt/cray/libfabric/1.22.0/lib64 $(LINKEXE) $(OUTPUTEXE) $(Pelegant_OBJS) $(LDFLAGS) $(LIB_LINK_DIRS) $(PROD_LIBS) $(PROD_LIBS_SDDS) $(PROD_SYS_LIBS)
|
||||||
|
cp -f $@ $(BIN_DIR)/
|
||||||
|
@if [ -n "$(EPICS_BIN_DIR)" ]; then echo cp -f $@ $(EPICS_BIN_DIR)/; fi
|
||||||
|
@if [ -n "$(EPICS_BIN_DIR)" ]; then cp -f $@ $(EPICS_BIN_DIR)/; fi
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
---
|
||||||
|
# yamllint disable rule:line-length
|
||||||
|
format: 1
|
||||||
|
elegant:
|
||||||
|
defaults:
|
||||||
|
group: MPI
|
||||||
|
overlay: base
|
||||||
|
relstage: stable
|
||||||
|
compile_in_sourcetree: true
|
||||||
|
systems: [.*]
|
||||||
|
shasums:
|
||||||
|
|
||||||
|
versions:
|
||||||
|
2025.2.0:
|
||||||
|
config:
|
||||||
|
sources:
|
||||||
|
- url: https://epics.anl.gov/download/base/base-7.0.9.tar.gz
|
||||||
|
unpack_dir: ${PREFIX}/epics
|
||||||
|
strip_dirs: 0
|
||||||
|
- url: https://ops.aps.anl.gov/downloads/SDDS.5.8.tar.gz
|
||||||
|
name: SDDS-5.8.tar.gz
|
||||||
|
unpack_dir: ${PREFIX}
|
||||||
|
strip_dirs: 0
|
||||||
|
- url: https://ops.aps.anl.gov/downloads/SDDSepics.5.8.tar.gz
|
||||||
|
name: SDDSepics-5.8.tar.gz
|
||||||
|
unpack_dir: ${PREFIX}
|
||||||
|
strip_dirs: 0
|
||||||
|
- url: https://ops.aps.anl.gov/downloads/oag.apps.configure.tar.gz
|
||||||
|
unpack_dir: ${PREFIX}
|
||||||
|
strip_dirs: 0
|
||||||
|
- url: https://ops.aps.anl.gov/downloads/oag.1.29.tar.gz
|
||||||
|
name: oag-1.29.tar.gz
|
||||||
|
unpack_dir: ${PREFIX}
|
||||||
|
strip_dirs: 0
|
||||||
|
- url: https://ops.aps.anl.gov/downloads/elegant.2025.2.0.tar.gz
|
||||||
|
name: elegant-2025.2.0.tar.gz
|
||||||
|
unpack_dir: ${PREFIX}
|
||||||
|
strip_dirs: 0
|
||||||
|
- url: https://ops.aps.anl.gov/downloads/defns.rpn
|
||||||
|
unpack_dir: ${PREFIX}
|
||||||
|
unpacker: none
|
||||||
|
- patch_file: elegant.diff
|
||||||
|
patch_strip: 1
|
||||||
|
unpack_dir: ${PREFIX}
|
||||||
|
- patch_file: MPI.diff
|
||||||
|
patch_strip: 1
|
||||||
|
unpack_dir: ${PREFIX}
|
||||||
|
build_requires: []
|
||||||
|
variants:
|
||||||
|
- systems: [merlin-.*.psi.ch]
|
||||||
|
group_deps:
|
||||||
|
compiler: {gcc: [12.3.0]}
|
||||||
|
mpi: {openmpi: [4.1.6_slurm]}
|
||||||
|
relstage: unstable
|
||||||
|
- target_cpus: [x86_64]
|
||||||
|
systems: [.*.merlin7.psi.ch]
|
||||||
|
overlay: Alps
|
||||||
|
relstage: unstable
|
||||||
|
group_deps:
|
||||||
|
compiler: {gcc: [12.3.0]}
|
||||||
|
mpi: {openmpi: [5.0.5]}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
diff '--color=auto' -ur 12.4.0/epics/extensions/src/SDDS/hdf5/Makefile 12.4.0.psi/epics/extensions/src/SDDS/hdf5/Makefile
|
||||||
|
--- 12.4.0/epics/extensions/src/SDDS/hdf5/Makefile 2025-04-16 00:04:10.000000000 +0200
|
||||||
|
+++ 12.4.0.psi/epics/extensions/src/SDDS/hdf5/Makefile 2025-06-27 11:36:23.000000000 +0200
|
||||||
|
@@ -371,7 +371,6 @@
|
||||||
|
src/H5Znbit.c \
|
||||||
|
src/H5Zshuffle.c \
|
||||||
|
src/H5Zscaleoffset.c \
|
||||||
|
- src/H5Zszip.c \
|
||||||
|
src/H5Ztrans.c
|
||||||
|
|
||||||
|
# Corresponding object files (.o for gcc) for each source
|
||||||
|
diff '--color=auto' -ur 12.4.0/epics/extensions/src/SDDS/hdf5/src/H5config.h 12.4.0.psi/epics/extensions/src/SDDS/hdf5/src/H5config.h
|
||||||
|
--- 12.4.0/epics/extensions/src/SDDS/hdf5/src/H5config.h 2025-04-16 00:04:38.000000000 +0200
|
||||||
|
+++ 12.4.0.psi/epics/extensions/src/SDDS/hdf5/src/H5config.h 2025-06-27 11:35:20.000000000 +0200
|
||||||
|
@@ -341,7 +341,7 @@
|
||||||
|
#define HAVE_SYS_TYPES_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <szlib.h> header file. */
|
||||||
|
-#define HAVE_SZLIB_H 1
|
||||||
|
+#undef HAVE_SZLIB_H
|
||||||
|
|
||||||
|
/* Define if we have thread safe support */
|
||||||
|
/* #undef HAVE_THREADSAFE */
|
||||||
|
diff '--color=auto' -ur 12.4.0/epics/extensions/src/SDDS/hdf5/src/H5pubconf.h 12.4.0.psi/epics/extensions/src/SDDS/hdf5/src/H5pubconf.h
|
||||||
|
--- 12.4.0/epics/extensions/src/SDDS/hdf5/src/H5pubconf.h 2025-04-16 00:04:41.000000000 +0200
|
||||||
|
+++ 12.4.0.psi/epics/extensions/src/SDDS/hdf5/src/H5pubconf.h 2025-06-27 11:57:25.000000000 +0200
|
||||||
|
@@ -134,7 +134,7 @@
|
||||||
|
#define H5_HAVE_FILTER_DEFLATE 1
|
||||||
|
|
||||||
|
/* Define if support for szip filter is enabled */
|
||||||
|
-#define H5_HAVE_FILTER_SZIP 1
|
||||||
|
+#undef H5_HAVE_FILTER_SZIP
|
||||||
|
|
||||||
|
/* Determine if __float128 will be used in the Fortran wrappers */
|
||||||
|
/* #undef H5_HAVE_FLOAT128 */
|
||||||
|
@@ -341,7 +341,7 @@
|
||||||
|
#define H5_HAVE_SYS_TYPES_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <szlib.h> header file. */
|
||||||
|
-#define H5_HAVE_SZLIB_H 1
|
||||||
|
+#undef H5_HAVE_SZLIB_H
|
||||||
|
|
||||||
|
/* Define if we have thread safe support */
|
||||||
|
/* #undef H5_HAVE_THREADSAFE */
|
||||||
|
diff '--color=auto' -ur 12.4.0/epics/extensions/src/SDDS/Makefile 12.4.0.psi/epics/extensions/src/SDDS/Makefile
|
||||||
|
--- 12.4.0/epics/extensions/src/SDDS/Makefile 2025-04-16 00:03:33.000000000 +0200
|
||||||
|
+++ 12.4.0.psi/epics/extensions/src/SDDS/Makefile 2025-06-27 12:18:14.000000000 +0200
|
||||||
|
@@ -63,14 +63,14 @@
|
||||||
|
DIRS += png
|
||||||
|
DIRS += gd
|
||||||
|
DIRS += tiff
|
||||||
|
-DIRS += SDDSaps
|
||||||
|
-DIRS += SDDSaps/sddsplots
|
||||||
|
+#DIRS += SDDSaps
|
||||||
|
+#DIRS += SDDSaps/sddsplots
|
||||||
|
#DIRS += SDDSaps/sddsplots/winMotifDriver
|
||||||
|
#DIRS += SDDSaps/sddsplots/motifDriver
|
||||||
|
-DIRS += $(PLOT_DRIVER)
|
||||||
|
-DIRS += SDDSaps/sddscontours
|
||||||
|
-DIRS += SDDSaps/pseudoInverse
|
||||||
|
-DIRS += levmar
|
||||||
|
+#DIRS += $(PLOT_DRIVER)
|
||||||
|
+#DIRS += SDDSaps/sddscontours
|
||||||
|
+#DIRS += SDDSaps/pseudoInverse
|
||||||
|
+#DIRS += levmar
|
||||||
|
ifneq ($(MPI_CC),)
|
||||||
|
DIRS += pgapack
|
||||||
|
endif
|
||||||
|
diff '--color=auto' -ur 12.4.0/oag/apps/configure/RELEASE 12.4.0.psi/oag/apps/configure/RELEASE
|
||||||
|
--- 12.4.0/oag/apps/configure/RELEASE 2020-10-28 16:39:15.000000000 +0100
|
||||||
|
+++ 12.4.0.psi/oag/apps/configure/RELEASE 2025-06-27 12:20:31.000000000 +0200
|
||||||
|
@@ -9,3 +9,5 @@
|
||||||
|
EPICS_EXTENSIONS=$(TOP)/../../epics/extensions
|
||||||
|
|
||||||
|
OAG_APPS=$(TOP)/../apps
|
||||||
|
+EPICS_BASE=/opt/psi/overlays/Alps/MPI/elegant/openmpi/5.0.5/gcc/12.4.0/epics/base
|
||||||
|
+EPICS_EXTENSIONS=/opt/psi/overlays/Alps/MPI/elegant/openmpi/5.0.5/gcc/12.4.0/epics/extensions
|
||||||
@@ -18,7 +18,7 @@ and ramping machines. The code provides simulation of various collective
|
|||||||
effects, such as wakes and coherent synchrotron radiation.
|
effects, such as wakes and coherent synchrotron radiation.
|
||||||
"
|
"
|
||||||
|
|
||||||
setenv RPN_DEFNS $PREFIX/RPN_DEFNS
|
setenv RPN_DEFNS $PREFIX/defns.rpn
|
||||||
setenv HOST_ARCH linux-x86_64
|
setenv HOST_ARCH linux-x86_64
|
||||||
setenv EPICS_HOST_ARCH linux-x86_64
|
setenv EPICS_HOST_ARCH linux-x86_64
|
||||||
setenv OAG_TOP_DIR $PREFIX
|
setenv OAG_TOP_DIR $PREFIX
|
||||||
|
|||||||
Reference in New Issue
Block a user