From e43ac63efde2fdce940cd27b9d6588f39d317cc7 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Fri, 17 Jun 2022 12:53:01 +0200 Subject: [PATCH 1/3] elegant, modulefile: set OAG_TOP_DIR --- MPI/elegant/modulefile | 1 + 1 file changed, 1 insertion(+) 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 From 3c53916ff31b9e8fe2d944b8bc12293fb7ead024 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Tue, 5 Jul 2022 09:45:43 +0200 Subject: [PATCH 2/3] elegant: patch OAG Tcl scripts --- MPI/elegant/files/oag-apps.patch | 79 ++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 MPI/elegant/files/oag-apps.patch 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 } From bfd5bcc1d5f485bfa2333241518ccb9d9239dec6 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Tue, 5 Jul 2022 11:04:29 +0200 Subject: [PATCH 3/3] elegant: update rel.stages, use YAML variants file --- MPI/elegant/files/variants.merlin6 | 1 - MPI/elegant/files/variants.rhel6 | 5 ---- MPI/elegant/files/variants.yaml | 41 ++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 6 deletions(-) delete mode 100644 MPI/elegant/files/variants.merlin6 delete mode 100644 MPI/elegant/files/variants.rhel6 create mode 100644 MPI/elegant/files/variants.yaml 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 +