From 2a29f4bac5700524c818a33033841260591f3e9a Mon Sep 17 00:00:00 2001
From: Tianyu ZHANG <tianyu@william.ltas.ulg.ac.be>
Date: Thu, 2 Feb 2023 15:06:39 +0100
Subject: [PATCH] add config for William

---
 cfg/william/gmsh.profile      |  5 +++++
 cfg/william/lagamine.profile  |  3 +++
 cfg/william/mumps.profile     |  3 +++
 cfg/william/oneApi.bashrc     | 30 ++++++++++++++++++++++++++++++
 cfg/william/oneApi.profile    | 32 ++++++++++++++++++++++++++++++++
 cfg/william/parasolid.profile |  3 +++
 cfg/william/samcef.profile    | 10 ++++++++++
 7 files changed, 86 insertions(+)
 create mode 100755 cfg/william/gmsh.profile
 create mode 100644 cfg/william/lagamine.profile
 create mode 100644 cfg/william/mumps.profile
 create mode 100644 cfg/william/oneApi.bashrc
 create mode 100644 cfg/william/oneApi.profile
 create mode 100644 cfg/william/parasolid.profile
 create mode 100644 cfg/william/samcef.profile

diff --git a/cfg/william/gmsh.profile b/cfg/william/gmsh.profile
new file mode 100755
index 0000000..e4b9b8c
--- /dev/null
+++ b/cfg/william/gmsh.profile
@@ -0,0 +1,5 @@
+add2env PATH "/opt/gmsh/bin" front
+add2env LD_LIBRARY_PATH "/opt/gmsh/lib"
+add2env PYTHONPATH "/opt/gmsh/lib"
+#add2env INCLUDE "/opt/gmsh/include" front
+#add2env LIB "/opt/gmsh/lib" front
diff --git a/cfg/william/lagamine.profile b/cfg/william/lagamine.profile
new file mode 100644
index 0000000..f8e4775
--- /dev/null
+++ b/cfg/william/lagamine.profile
@@ -0,0 +1,3 @@
+add2env LD_LIBRARY_PATH "/opt/lagamine/lib"
+add2env INCLUDE "/opt/lagamine/include"
+add2env LIB "/opt/lagamine/lib"
diff --git a/cfg/william/mumps.profile b/cfg/william/mumps.profile
new file mode 100644
index 0000000..ad17390
--- /dev/null
+++ b/cfg/william/mumps.profile
@@ -0,0 +1,3 @@
+#add2env LD_LIBRARY_PATH "/opt/mumps/lib"
+add2env LIB "/opt/mumps/lib"
+add2env INCLUDE "/opt/mumps/include"
diff --git a/cfg/william/oneApi.bashrc b/cfg/william/oneApi.bashrc
new file mode 100644
index 0000000..8a45a4a
--- /dev/null
+++ b/cfg/william/oneApi.bashrc
@@ -0,0 +1,30 @@
+# Intel compiler and/or TBB/MKL 
+#
+# EXPLANATIONS [RB]:
+# In practise, the call to "compilervars.sh" or ("mklvars.sh", etc) sets PATH, LD_LIBRARY_PATH.
+# If we want these variables to be set system-wide, it should be run in .profile
+#  
+# BUT
+#  1. the gnome display manager unset LD_LIBRARY_PATH
+#
+#  2. if the login shell is "dash", the script cannot be called 
+#     (we cannot add an extra argument to a sourced script with dash). 
+# THEN
+# => we call the scripts in both places (.bashrc & .profile)
+# => the env is cleaned in "loop.sh", removing duplicates if the .profile was actually read by bash
+#
+# SPECIAL CASE: "at" job
+# => the environment is OK and kept, but "LD_LIBRARY_PATH" is set to nothing by "at"
+# => the .profile is then rerun manually in our scripts (with bash)
+#    should we run also .bashrc as LD_LIBRARY_PATH should be set here on systems with gnome? 
+# => duplicates are finally removed by loop.sh
+
+if [ -d /opt/intel ] ; then
+    . /opt/intel/oneapi/mkl/latest/env/vars.sh intel64
+    . /opt/intel/oneapi/tbb/latest/env/vars.sh intel64
+    #if 2019 version:
+    #. /opt/intel/mkl/bin/mklvars.sh intel64
+    #. /opt/intel/tbb/bin/tbbvars.sh intel64
+fi
+
+#export MKL_DEBUG_CPU_TYPE=5
diff --git a/cfg/william/oneApi.profile b/cfg/william/oneApi.profile
new file mode 100644
index 0000000..9c61339
--- /dev/null
+++ b/cfg/william/oneApi.profile
@@ -0,0 +1,32 @@
+# Intel compiler and/or TBB/MKL 
+#
+# EXPLANATIONS [RB]:
+# In practise, the call to "compilervars.sh" or ("mklvars.sh", etc) sets PATH, LD_LIBRARY_PATH.
+# If we want these variables to be set system-wide, it should be run in .profile
+#  
+# BUT
+#  1. the gnome display manager unset LD_LIBRARY_PATH
+#
+#  2. if the login shell is "dash", the script cannot be called 
+#     (we cannot add an extra argument to a sourced script with dash). 
+# THEN
+# => we call the scripts in both places (.bashrc & .profile)
+# => the env is cleaned in "loop.sh", removing duplicates if the .profile was actually read by bash
+#
+# SPECIAL CASE: "at" job
+# => the environment is OK and kept, but "LD_LIBRARY_PATH" is set to nothing by "at"
+# => the .profile is then rerun manually in our scripts (with bash)
+#    should we run also .bashrc as LD_LIBRARY_PATH should be set here on systems with gnome? 
+# => duplicates are finally removed by loop.sh
+
+if [ -n "$BASH_VERSION" ]; then
+    if [ -d /opt/intel ] ; then
+        . /opt/intel/oneapi/mkl/latest/env/vars.sh intel64
+        . /opt/intel/oneapi/tbb/latest/env/vars.sh intel64
+        #if 2019 version:
+        #. /opt/intel/mkl/bin/mklvars.sh intel64
+        #. /opt/intel/tbb/bin/tbbvars.sh intel64
+    fi
+fi
+
+#export MKL_DEBUG_CPU_TYPE=5
diff --git a/cfg/william/parasolid.profile b/cfg/william/parasolid.profile
new file mode 100644
index 0000000..e24e2e8
--- /dev/null
+++ b/cfg/william/parasolid.profile
@@ -0,0 +1,3 @@
+add2env PATH "/opt/parasolid/shared_object"
+add2env INCLUDE "/opt/parasolid"
+export P_SCHEMA=/opt/parasolid/schema
diff --git a/cfg/william/samcef.profile b/cfg/william/samcef.profile
new file mode 100644
index 0000000..d09d5c3
--- /dev/null
+++ b/cfg/william/samcef.profile
@@ -0,0 +1,10 @@
+export SAM_ZONE=200000000
+add2env PATH "/opt/samcef"
+
+# pas besoin de definir LMS_LICENSE
+# (deja defini dans "/opt/samcef/site" lors de l'install)
+
+# -----------------------------------------------------------
+# version "russe"
+#add2env PATH "/opt/sfield/V8.5-01/Samcef-V151i8/lin/bin"
+#export SAMTECH_LICENSE_FILE=/opt/sfield/V8.5-01/SAMTECH.lic
-- 
GitLab