diff --git a/MPI/elegant/files/oag-apps.patch b/MPI/elegant/files/oag-apps.patch new file mode 100644 index 0000000..41e6841 --- /dev/null +++ b/MPI/elegant/files/oag-apps.patch @@ -0,0 +1,79 @@ +diff -u linux-x86_64.orig/computeQuadFringeIntegrals linux-x86_64/computeQuadFringeIntegrals +--- linux-x86_64.orig/computeQuadFringeIntegrals 2022-05-11 17:16:01.000000000 +0200 ++++ linux-x86_64/computeQuadFringeIntegrals 2022-05-12 16:36:53.000000000 +0200 +@@ -2,8 +2,9 @@ + # \ + exec oagtclsh "$0" "$@" + +-set auto_path [linsert $auto_path 0 /usr/local/oag/apps/lib/$env(HOST_ARCH)] +-set auto_path [linsert $auto_path 0 /usr/local/oag/lib_patch/$env(HOST_ARCH)] ++if {![info exists env(OAG_TOP_DIR)]} { set env(OAG_TOP_DIR) /usr/local } ++set auto_path [linsert $auto_path 0 $env(OAG_TOP_DIR)/oag/apps/lib/$env(HOST_ARCH)] ++ + APSStandardSetup + + # +diff -u linux-x86_64.orig/computeSCTuneSpread linux-x86_64/computeSCTuneSpread +--- linux-x86_64.orig/computeSCTuneSpread 2022-05-11 17:16:01.000000000 +0200 ++++ linux-x86_64/computeSCTuneSpread 2022-05-12 16:39:28.000000000 +0200 +@@ -2,11 +2,8 @@ + # \ + exec oagtclsh "$0" "$@" + +-if [info exists $env(OAG_TOP_DIR)] { +- set auto_path [linsert $auto_path 0 $env(OAG_TOP_DIR)/oag/apps/lib/$env(HOST_ARCH)] +-} else { +- set auto_path [linsert $auto_path 0 /usr/local/oag/apps/lib/$env(HOST_ARCH)] +-} ++if {![info exists env(OAG_TOP_DIR)]} { set env(OAG_TOP_DIR) /usr/local } ++set auto_path [linsert $auto_path 0 $env(OAG_TOP_DIR)/oag/apps/lib/$env(HOST_ARCH)] + + APSStandardSetup + +diff -u linux-x86_64.orig/elegant2track linux-x86_64/elegant2track +--- linux-x86_64.orig/elegant2track 2022-05-11 17:16:00.000000000 +0200 ++++ linux-x86_64/elegant2track 2022-05-12 16:38:20.000000000 +0200 +@@ -2,8 +2,9 @@ + # \ + exec oagtclsh "$0" "$@" + +-set auto_path [linsert $auto_path 0 /usr/local/oag/apps/lib/$env(HOST_ARCH)] +-set auto_path [linsert $auto_path 0 /usr/local/oag/lib_patch/$env(HOST_ARCH)] ++if {![info exists env(OAG_TOP_DIR)]} { set env(OAG_TOP_DIR) /usr/local } ++set auto_path [linsert $auto_path 0 $env(OAG_TOP_DIR)/oag/apps/lib/$env(HOST_ARCH)] ++ + APSStandardSetup + package require rpn + +diff -u linux-x86_64.orig/spectra2sdds linux-x86_64/spectra2sdds +--- linux-x86_64.orig/spectra2sdds 2022-05-11 17:15:10.000000000 +0200 ++++ linux-x86_64/spectra2sdds 2022-05-12 16:38:55.000000000 +0200 +@@ -2,8 +2,9 @@ + # \ + exec oagtclsh "$0" "$@" + +-set auto_path [linsert $auto_path 0 /usr/local/oag/apps/lib/$env(HOST_ARCH)] +-set auto_path [linsert $auto_path 0 /usr/local/oag/lib_patch/$env(HOST_ARCH)] ++if {![info exists env(OAG_TOP_DIR)]} { set env(OAG_TOP_DIR) /usr/local } ++set auto_path [linsert $auto_path 0 $env(OAG_TOP_DIR)/oag/apps/lib/$env(HOST_ARCH)] ++ + APSStandardSetup + + set usage {usage: spectra2sdds2 -input -output } +diff -u linux-x86_64.orig/track2mag linux-x86_64/track2mag +--- linux-x86_64.orig/track2mag 2022-05-11 17:16:00.000000000 +0200 ++++ linux-x86_64/track2mag 2022-05-12 16:31:42.000000000 +0200 +@@ -2,8 +2,11 @@ + # \ + exec oagtclsh "$0" "$@" + +-set auto_path [linsert $auto_path 0 /usr/local/oag/apps/lib/$env(HOST_ARCH)] +-set auto_path [linsert $auto_path 0 /usr/local/oag/lib_patch/$env(HOST_ARCH)] ++if {![info exists env(OAG_TOP_DIR)] || [string length $env(OAG_TOP_DIR)]==0} { ++ set env(OAG_TOP_DIR) /usr/local ++} ++set auto_path [linsert $auto_path 0 $env(OAG_TOP_DIR)/oag/apps/lib/$env(HOST_ARCH)] ++ + APSStandardSetup + + set usage {usage: track2mag -input -output } diff --git a/MPI/elegant/files/variants.merlin6 b/MPI/elegant/files/variants.merlin6 deleted file mode 100644 index 44201a1..0000000 --- a/MPI/elegant/files/variants.merlin6 +++ /dev/null @@ -1 +0,0 @@ -elegant/2020.2.0_merlin6 stable gcc/8.4.0 openmpi/3.1.6_slurm gsl/2.6 diff --git a/MPI/elegant/files/variants.rhel6 b/MPI/elegant/files/variants.rhel6 deleted file mode 100644 index 7d0d9a9..0000000 --- a/MPI/elegant/files/variants.rhel6 +++ /dev/null @@ -1,5 +0,0 @@ -elegant/2020.2.0 stable gcc/8.4.0 openmpi/3.1.6 gsl/2.6 -elegant/32.0.0 deprecated gcc/5.4.0 openmpi/1.10.4 -elegant/33.1.2 deprecated gcc/5.4.0 openmpi/1.10.4 -elegant/34.2.0 deprecated gcc/7.3.0 mpich/3.2.1 - diff --git a/MPI/elegant/files/variants.yaml b/MPI/elegant/files/variants.yaml new file mode 100644 index 0000000..e5a0dc2 --- /dev/null +++ b/MPI/elegant/files/variants.yaml @@ -0,0 +1,41 @@ +overlay: base +relstage: stable + +elegant/32.0.0: + - with: gcc/5.4.0 openmpi/1.10.4 + systems: rhel6 + relstage: deprecated + +elegant/33.1.2: + - with: gcc/5.4.0 openmpi/1.10.4 + systems: rhel6 + relstage: deprecated + +elegant/34.2.0: + - with: gcc/7.3.0 mpich/3.2.1 + systems: rhel6 + relstage: deprecated + +elegant/2020.2.0: + - with: gcc/8.4.0 openmpi/3.1.6 + systems: rhel6 + +elegant/2020.2.0_merlin6: + - with: gcc/8.4.0 openmpi/3.1.6_slurm + systems: slurm + +elegant/2021.4.0: + - with: gcc/10.3.0 openmpi/4.0.5 + systems: rhel6 +elegant/2021.4.0_slurm: + - with: gcc/10.3.0 openmpi/4.0.5-1_slurm + relstage: deprecated + systems: slurm +elegant/2021.4.0-1_slurm: + - with: gcc/10.3.0 openmpi/4.0.5-1_slurm + relstage: deprecated + systems: slurm +elegant/2021.4.0-2_slurm: + - with: gcc/10.3.0 openmpi/4.0.5-1_slurm + systems: slurm + diff --git a/MPI/elegant/modulefile b/MPI/elegant/modulefile index 040d321..b7894c6 100644 --- a/MPI/elegant/modulefile +++ b/MPI/elegant/modulefile @@ -21,6 +21,7 @@ effects, such as wakes and coherent synchrotron radiation. setenv RPN_DEFNS $PREFIX/RPN_DEFNS setenv HOST_ARCH linux-x86_64 setenv EPICS_HOST_ARCH linux-x86_64 +setenv OAG_TOP_DIR $PREFIX append-path PATH $PREFIX/epics/extensions/bin/linux-x86_64 append-path PATH $PREFIX/oag/apps/bin/linux-x86_64