From 37348c7fd6f3ef69c427bba858b6f9cc539cb77d Mon Sep 17 00:00:00 2001
From: Sebastian Achilles <s.achilles@fz-juelich.de>
Date: Wed, 12 May 2021 18:56:33 +0200
Subject: [PATCH] add easyconfig gomkl v2021 and imkl v2021.2.0

---
 Custom_EasyBlocks/README.md                   |  7 ++++
 Golden_Repo/g/gomkl/gomkl-2021.eb             | 29 +++++++++++++
 .../i/imkl/imkl-2021.2.0-gompi-2021.eb        | 37 +++++++++++++++++
 Golden_Repo/i/imkl/imkl-2021.2.0.eb           | 41 +++++++++++++++++++
 4 files changed, 114 insertions(+)
 create mode 100644 Golden_Repo/g/gomkl/gomkl-2021.eb
 create mode 100644 Golden_Repo/i/imkl/imkl-2021.2.0-gompi-2021.eb
 create mode 100644 Golden_Repo/i/imkl/imkl-2021.2.0.eb

diff --git a/Custom_EasyBlocks/README.md b/Custom_EasyBlocks/README.md
index 1b38678e1..d9cf4d6fe 100644
--- a/Custom_EasyBlocks/README.md
+++ b/Custom_EasyBlocks/README.md
@@ -9,6 +9,13 @@ Overview of the custom EasyBlocks.
 - __*difference compared to upstream*__ Same as upstream EasyBlocks 4.3.2
 - __*can be removed*__ when we upgread EasyBlocks 4.3.2+
 
+## imkl
+
+- __*added by*__ s.achilles
+- __*needed because*__ support oneAPI versions (>= 2021.x)
+- __*difference compared to upstream*__ Same as upstream EasyBlocks 4.3.5
+- __*can be removed*__ when we upgread EasyBlocks 4.3.5+
+
 ## Quantum ESPRESSO
 
 - __*added by*__ s.achilles
diff --git a/Golden_Repo/g/gomkl/gomkl-2021.eb b/Golden_Repo/g/gomkl/gomkl-2021.eb
new file mode 100644
index 000000000..3521b374e
--- /dev/null
+++ b/Golden_Repo/g/gomkl/gomkl-2021.eb
@@ -0,0 +1,29 @@
+easyblock = "Toolchain"
+
+name = 'gomkl'
+version = '2021'
+
+homepage = '(none)'
+description = """GCC and GFortran based compiler toolchain, ParaStation MPICH variant for MPI support and MKL"""
+
+site_contacts = 'sc@fz-juelich.de'
+
+toolchain = SYSTEM
+
+local_comp_name = 'GCC'
+local_comp_version = '10.3.0'
+local_comp = (local_comp_name, local_comp_version)
+
+# toolchain used to build  dependencies
+local_comp_mpi_tc_name = 'gompi'
+local_comp_mpi_tc_ver = version
+local_comp_mpi_tc = (local_comp_mpi_tc_name, local_comp_mpi_tc_ver)
+
+# compiler toolchain dependencies
+dependencies = [
+    local_comp,
+    ('OpenMPI', '4.1.1', '', local_comp),  # part of gompi toolchain
+    ('imkl', '2021.2.0', '', local_comp_mpi_tc),
+]
+
+moduleclass = 'toolchain'
diff --git a/Golden_Repo/i/imkl/imkl-2021.2.0-gompi-2021.eb b/Golden_Repo/i/imkl/imkl-2021.2.0-gompi-2021.eb
new file mode 100644
index 000000000..cf7bd1a08
--- /dev/null
+++ b/Golden_Repo/i/imkl/imkl-2021.2.0-gompi-2021.eb
@@ -0,0 +1,37 @@
+name = 'imkl'
+version = '2020.2.0'
+
+homepage = 'http://software.intel.com/en-us/intel-mkl/'
+description = """Intel Math Kernel Library is a library of highly optimized,
+ extensively threaded math routines for science, engineering, and financial
+ applications that require maximum performance. Core math functions include
+ BLAS, LAPACK, ScaLAPACK, Sparse Solvers, Fast Fourier Transforms, Vector Math,
+ and more.
+"""
+
+site_contacts = 'Sebastian Achilles <s.achilles@fz-juelich.de>'
+
+toolchain = {'version': '2021', 'name': 'gompi'}
+
+# see https://software.intel.com/content/www/us/en/develop/articles/oneapi-standalone-components.html
+source_urls = [
+    'https://registrationcenter-download.intel.com/akdlm/irc_nas/17757']
+sources = ['l_onemkl_p_%(version)s.296_offline.sh']
+checksums = ['816e9df26ff331d6c0751b86ed5f7d243f9f172e76f14e83b32bf4d1d619dbae']
+
+dontcreateinstalldir = 'True'
+
+postinstallcmds = [
+    # extract the examples
+    'tar xvzf %(installdir)s/mkl/examples/examples_cluster_c.tgz -C %(installdir)s/mkl/examples/',
+    'tar xvzf %(installdir)s/mkl/examples/examples_cluster_f.tgz -C %(installdir)s/mkl/examples/',
+    'tar xvzf %(installdir)s/mkl/examples/examples_core_c.tgz -C %(installdir)s/mkl/examples/',
+    'tar xvzf %(installdir)s/mkl/examples/examples_core_f.tgz -C %(installdir)s/mkl/examples/',
+    'tar xvzf %(installdir)s/mkl/examples/examples_f95.tgz -C %(installdir)s/mkl/examples/',
+]
+
+modextravars = {
+    'MKL_EXAMPLES': '%(installdir)s/mkl/examples/',
+}
+
+moduleclass = 'numlib'
diff --git a/Golden_Repo/i/imkl/imkl-2021.2.0.eb b/Golden_Repo/i/imkl/imkl-2021.2.0.eb
new file mode 100644
index 000000000..3f87fb53a
--- /dev/null
+++ b/Golden_Repo/i/imkl/imkl-2021.2.0.eb
@@ -0,0 +1,41 @@
+name = 'imkl'
+version = '2020.2.0'
+
+homepage = 'http://software.intel.com/en-us/intel-mkl/'
+description = """Intel Math Kernel Library is a library of highly optimized,
+ extensively threaded math routines for science, engineering, and financial
+ applications that require maximum performance. Core math functions include
+ BLAS, LAPACK, ScaLAPACK, Sparse Solvers, Fast Fourier Transforms, Vector Math,
+ and more.
+"""
+
+site_contacts = 'Sebastian Achilles <s.achilles@fz-juelich.de>'
+
+toolchain = SYSTEM
+
+# see https://software.intel.com/content/www/us/en/develop/articles/oneapi-standalone-components.html
+source_urls = [
+    'https://registrationcenter-download.intel.com/akdlm/irc_nas/17757']
+sources = ['l_onemkl_p_%(version)s.296_offline.sh']
+checksums = ['816e9df26ff331d6c0751b86ed5f7d243f9f172e76f14e83b32bf4d1d619dbae']
+
+dontcreateinstalldir = 'True'
+
+interfaces = False
+
+hidden = True
+
+postinstallcmds = [
+    # extract the examples
+    'tar xvzf %(installdir)s/mkl/examples/examples_cluster_c.tgz -C %(installdir)s/mkl/examples/',
+    'tar xvzf %(installdir)s/mkl/examples/examples_cluster_f.tgz -C %(installdir)s/mkl/examples/',
+    'tar xvzf %(installdir)s/mkl/examples/examples_core_c.tgz -C %(installdir)s/mkl/examples/',
+    'tar xvzf %(installdir)s/mkl/examples/examples_core_f.tgz -C %(installdir)s/mkl/examples/',
+    'tar xvzf %(installdir)s/mkl/examples/examples_f95.tgz -C %(installdir)s/mkl/examples/',
+]
+
+modextravars = {
+    'MKL_EXAMPLES': '%(installdir)s/mkl/examples/',
+}
+
+moduleclass = 'numlib'
-- 
GitLab