From 85b0fdeec1846bfb7792a4f370804e7160da8088 Mon Sep 17 00:00:00 2001 From: edmondac-admin Date: Fri, 30 Oct 2020 13:21:42 +0000 Subject: [PATCH 1/8] adding easyconfigs: JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb --- .../JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb diff --git a/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb b/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb new file mode 100644 index 00000000000..998b88b83fb --- /dev/null +++ b/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb @@ -0,0 +1,56 @@ +# This easyconfig was created by the BEAR Software team at the University of Birmingham. +easyblock = 'ConfigureMake' + +name = 'JAX' +version = '0.1.77' +versionsuffix = '-Python-%(pyver)s' + +homepage = "https://github.com/google/jax" +description = """JAX is Autograd and XLA, brought together for high-performance machine learning research.""" + +toolchain = {'name': 'fosscuda', 'version': '2019b'} + +dependencies = [ + ('Python', '3.7.4'), + ('SciPy-bundle', '2019.10', versionsuffix), + ('Bazel', '2.0.0'), + ('cuDNN', '7.6.4.38'), +] + +source_urls = ['https://github.com/google/jax/archive'] +sources = ['jax-v%(version)s.tar.gz'] +checksums = ['18fa3bcebf4b1a526349db5a76a508784ec5d05324c192c40f240ccbf9480e26'] +skipsteps = ['configure', 'build'] + +install_cmd = 'export TF_CUDA_PATHS=${EBROOTCUDA} && ' +# To prevent bazel builds on different hosts/architectures conflicting with each other +# we'll set HOME, inside which Bazel puts active files (in ~/.cache/bazel/...) +install_cmd += 'export HOME=%(builddir)s/.home/ && ' +install_cmd += 'python build/build.py --enable_cuda --cuda_path ${EBROOTCUDA} ' +install_cmd += '--cudnn_path ${EBROOTCUDNN} ' +install_cmd += '--bazel_path ${EBROOTBAZEL}/bin/bazel ' +# Tell Bazel to pass PYTHONPATH through to what it's building, so it can find scipy etc. +install_cmd += '--bazel_options=--action_env=PYTHONPATH ' + +import subprocess as _subprocess # NOQA +_arch = _subprocess.check_output(['uname', '-m'], universal_newlines=True).strip() +if _arch == 'ppc64le': + install_cmd += '--bazel_options=--per_file_copt=.*cu\.cc.*@-nvcc_options=compiler-options=-mno-float128 ' + +install_cmd += '--noenable_mkl_dnn && ' +install_cmd += '(cd build && pip install --prefix %(installdir)s .) && ' # install jaxlib +install_cmd += 'pip install --prefix %(installdir)s .' # install jax + +# We can't evaluate EBROOTCUDA in the module file, because Lmod evaluates it before +# it's loaded CUDA, and it doesn't work. So we HARDCODE it here for now... +modextravars = {'XLA_FLAGS': "--xla_gpu_cuda_data_dir=%(installdir)s/../../CUDA/10.1.243-GCC-8.3.0/bin"} + +modextrapaths = {'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages'} + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/jax', + 'lib/python%(pyshortver)s/site-packages/jaxlib'], +} + +moduleclass = 'data' From ec0a3ca8c0d6d44c49db0649e78314e439b5871a Mon Sep 17 00:00:00 2001 From: Ed Date: Fri, 30 Oct 2020 13:25:36 +0000 Subject: [PATCH 2/8] Update JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb --- .../j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb b/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb index 998b88b83fb..3ca79494807 100644 --- a/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb +++ b/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb @@ -32,10 +32,8 @@ install_cmd += '--bazel_path ${EBROOTBAZEL}/bin/bazel ' # Tell Bazel to pass PYTHONPATH through to what it's building, so it can find scipy etc. install_cmd += '--bazel_options=--action_env=PYTHONPATH ' -import subprocess as _subprocess # NOQA -_arch = _subprocess.check_output(['uname', '-m'], universal_newlines=True).strip() -if _arch == 'ppc64le': - install_cmd += '--bazel_options=--per_file_copt=.*cu\.cc.*@-nvcc_options=compiler-options=-mno-float128 ' +# For ppc64le you need: +# install_cmd += '--bazel_options=--per_file_copt=.*cu\.cc.*@-nvcc_options=compiler-options=-mno-float128 ' install_cmd += '--noenable_mkl_dnn && ' install_cmd += '(cd build && pip install --prefix %(installdir)s .) && ' # install jaxlib From ba8b3e475494f6b1f50b424de91557f735632cfd Mon Sep 17 00:00:00 2001 From: edmondac-admin Date: Fri, 30 Oct 2020 14:09:59 +0000 Subject: [PATCH 3/8] Bazel is just a build dep --- .../j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb b/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb index 3ca79494807..f5c2628cd13 100644 --- a/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb +++ b/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb @@ -10,10 +10,11 @@ description = """JAX is Autograd and XLA, brought together for high-performance toolchain = {'name': 'fosscuda', 'version': '2019b'} +builddependencies = [('Bazel', '2.0.0')] + dependencies = [ ('Python', '3.7.4'), ('SciPy-bundle', '2019.10', versionsuffix), - ('Bazel', '2.0.0'), ('cuDNN', '7.6.4.38'), ] From fbde4aa00e0715c7a4ccba828fa96fa824a5e084 Mon Sep 17 00:00:00 2001 From: Ed Date: Fri, 13 Nov 2020 17:05:23 +0000 Subject: [PATCH 4/8] Update easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb Avoid it using the system `ld.gold` --- .../easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb b/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb index f5c2628cd13..2f27fd9a937 100644 --- a/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb +++ b/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb @@ -24,6 +24,7 @@ checksums = ['18fa3bcebf4b1a526349db5a76a508784ec5d05324c192c40f240ccbf9480e26'] skipsteps = ['configure', 'build'] install_cmd = 'export TF_CUDA_PATHS=${EBROOTCUDA} && ' +install_cmd += 'export GCC_HOST_COMPILER_PREFIX=$EBROOTBINUTILS/bin && ' # To prevent bazel builds on different hosts/architectures conflicting with each other # we'll set HOME, inside which Bazel puts active files (in ~/.cache/bazel/...) install_cmd += 'export HOME=%(builddir)s/.home/ && ' From 7e2a6b771bceadee9f3164da434f397bda2b0660 Mon Sep 17 00:00:00 2001 From: edmondac-admin Date: Wed, 2 Dec 2020 15:58:54 +0000 Subject: [PATCH 5/8] Use the easyblock --- .../JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb | 40 +++++++++---------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb b/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb index 2f27fd9a937..06240d56225 100644 --- a/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb +++ b/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb @@ -1,6 +1,4 @@ # This easyconfig was created by the BEAR Software team at the University of Birmingham. -easyblock = 'ConfigureMake' - name = 'JAX' version = '0.1.77' versionsuffix = '-Python-%(pyver)s' @@ -21,25 +19,25 @@ dependencies = [ source_urls = ['https://github.com/google/jax/archive'] sources = ['jax-v%(version)s.tar.gz'] checksums = ['18fa3bcebf4b1a526349db5a76a508784ec5d05324c192c40f240ccbf9480e26'] -skipsteps = ['configure', 'build'] - -install_cmd = 'export TF_CUDA_PATHS=${EBROOTCUDA} && ' -install_cmd += 'export GCC_HOST_COMPILER_PREFIX=$EBROOTBINUTILS/bin && ' -# To prevent bazel builds on different hosts/architectures conflicting with each other -# we'll set HOME, inside which Bazel puts active files (in ~/.cache/bazel/...) -install_cmd += 'export HOME=%(builddir)s/.home/ && ' -install_cmd += 'python build/build.py --enable_cuda --cuda_path ${EBROOTCUDA} ' -install_cmd += '--cudnn_path ${EBROOTCUDNN} ' -install_cmd += '--bazel_path ${EBROOTBAZEL}/bin/bazel ' -# Tell Bazel to pass PYTHONPATH through to what it's building, so it can find scipy etc. -install_cmd += '--bazel_options=--action_env=PYTHONPATH ' - -# For ppc64le you need: -# install_cmd += '--bazel_options=--per_file_copt=.*cu\.cc.*@-nvcc_options=compiler-options=-mno-float128 ' - -install_cmd += '--noenable_mkl_dnn && ' -install_cmd += '(cd build && pip install --prefix %(installdir)s .) && ' # install jaxlib -install_cmd += 'pip install --prefix %(installdir)s .' # install jax +#skipsteps = ['configure', 'build'] + +#install_cmd = 'export TF_CUDA_PATHS=${EBROOTCUDA} && ' +#install_cmd += 'export GCC_HOST_COMPILER_PREFIX=$EBROOTBINUTILS/bin && ' +## To prevent bazel builds on different hosts/architectures conflicting with each other +## we'll set HOME, inside which Bazel puts active files (in ~/.cache/bazel/...) +#install_cmd += 'export HOME=%(builddir)s/.home/ && ' +#install_cmd += 'python build/build.py --enable_cuda --cuda_path ${EBROOTCUDA} ' +#install_cmd += '--cudnn_path ${EBROOTCUDNN} ' +#install_cmd += '--bazel_path ${EBROOTBAZEL}/bin/bazel ' +## Tell Bazel to pass PYTHONPATH through to what it's building, so it can find scipy etc. +#install_cmd += '--bazel_options=--action_env=PYTHONPATH ' +# +## For ppc64le you need: +## install_cmd += '--bazel_options=--per_file_copt=.*cu\.cc.*@-nvcc_options=compiler-options=-mno-float128 ' +# +#install_cmd += '--noenable_mkl_dnn && ' +#install_cmd += '(cd build && pip install --prefix %(installdir)s .) && ' # install jaxlib +#install_cmd += 'pip install --prefix %(installdir)s .' # install jax # We can't evaluate EBROOTCUDA in the module file, because Lmod evaluates it before # it's loaded CUDA, and it doesn't work. So we HARDCODE it here for now... From 724f5f9f9bf868ac41ea4ca1e1b197d0f926b142 Mon Sep 17 00:00:00 2001 From: edmondac-admin Date: Wed, 2 Dec 2020 21:23:13 +0000 Subject: [PATCH 6/8] Removing everything that's moved to the easyblock --- .../JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb b/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb index 06240d56225..4c55198a818 100644 --- a/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb +++ b/easybuild/easyconfigs/j/JAX/JAX-0.1.77-fosscuda-2019b-Python-3.7.4.eb @@ -19,36 +19,5 @@ dependencies = [ source_urls = ['https://github.com/google/jax/archive'] sources = ['jax-v%(version)s.tar.gz'] checksums = ['18fa3bcebf4b1a526349db5a76a508784ec5d05324c192c40f240ccbf9480e26'] -#skipsteps = ['configure', 'build'] - -#install_cmd = 'export TF_CUDA_PATHS=${EBROOTCUDA} && ' -#install_cmd += 'export GCC_HOST_COMPILER_PREFIX=$EBROOTBINUTILS/bin && ' -## To prevent bazel builds on different hosts/architectures conflicting with each other -## we'll set HOME, inside which Bazel puts active files (in ~/.cache/bazel/...) -#install_cmd += 'export HOME=%(builddir)s/.home/ && ' -#install_cmd += 'python build/build.py --enable_cuda --cuda_path ${EBROOTCUDA} ' -#install_cmd += '--cudnn_path ${EBROOTCUDNN} ' -#install_cmd += '--bazel_path ${EBROOTBAZEL}/bin/bazel ' -## Tell Bazel to pass PYTHONPATH through to what it's building, so it can find scipy etc. -#install_cmd += '--bazel_options=--action_env=PYTHONPATH ' -# -## For ppc64le you need: -## install_cmd += '--bazel_options=--per_file_copt=.*cu\.cc.*@-nvcc_options=compiler-options=-mno-float128 ' -# -#install_cmd += '--noenable_mkl_dnn && ' -#install_cmd += '(cd build && pip install --prefix %(installdir)s .) && ' # install jaxlib -#install_cmd += 'pip install --prefix %(installdir)s .' # install jax - -# We can't evaluate EBROOTCUDA in the module file, because Lmod evaluates it before -# it's loaded CUDA, and it doesn't work. So we HARDCODE it here for now... -modextravars = {'XLA_FLAGS': "--xla_gpu_cuda_data_dir=%(installdir)s/../../CUDA/10.1.243-GCC-8.3.0/bin"} - -modextrapaths = {'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages'} - -sanity_check_paths = { - 'files': [], - 'dirs': ['lib/python%(pyshortver)s/site-packages/jax', - 'lib/python%(pyshortver)s/site-packages/jaxlib'], -} moduleclass = 'data' From fa80d2b30b6098b3c4340147dc70ceb9f5aa26e0 Mon Sep 17 00:00:00 2001 From: edmondac-admin Date: Wed, 2 Dec 2020 21:38:52 +0000 Subject: [PATCH 7/8] Bazel on EL8 has glibc conflicts --- easybuild/easyconfigs/b/Bazel/Bazel-2.0.0-GCCcore-8.3.0.eb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/easybuild/easyconfigs/b/Bazel/Bazel-2.0.0-GCCcore-8.3.0.eb b/easybuild/easyconfigs/b/Bazel/Bazel-2.0.0-GCCcore-8.3.0.eb index 106e2146849..a2c34d02bed 100644 --- a/easybuild/easyconfigs/b/Bazel/Bazel-2.0.0-GCCcore-8.3.0.eb +++ b/easybuild/easyconfigs/b/Bazel/Bazel-2.0.0-GCCcore-8.3.0.eb @@ -15,6 +15,12 @@ checksums = [ '99928d0902beeaf962a8ad14db8432f8e5114645e3caf64c7ee2fa136c31609f', # Bazel-0.29.1_fix-gold-flag.patch ] +# Bazel doesn't pass LD_LIBRARY_PATH etc. through, even to its own "process-wrapper". +# So we'll statically link bazel, to avoid errors like: +# "process-wrapper: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found" +# See https://github.com/bazelbuild/bazel/issues/4137 +prebuildopts = "export BAZEL_LINKOPTS=-static-libstdc++:-static-libgcc BAZEL_LINKLIBS=-l%:libstdc++.a:-lm && " + builddependencies = [ ('binutils', '2.32'), ('Python', '3.7.4'), From 5e0e4cb8b4eb2e06a6965a4d6a90c33966b7d05d Mon Sep 17 00:00:00 2001 From: edmondac-admin Date: Thu, 3 Dec 2020 10:03:57 +0000 Subject: [PATCH 8/8] Move Bazel static linking into easyblock --- easybuild/easyconfigs/b/Bazel/Bazel-2.0.0-GCCcore-8.3.0.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/b/Bazel/Bazel-2.0.0-GCCcore-8.3.0.eb b/easybuild/easyconfigs/b/Bazel/Bazel-2.0.0-GCCcore-8.3.0.eb index a2c34d02bed..fa40feb49fc 100644 --- a/easybuild/easyconfigs/b/Bazel/Bazel-2.0.0-GCCcore-8.3.0.eb +++ b/easybuild/easyconfigs/b/Bazel/Bazel-2.0.0-GCCcore-8.3.0.eb @@ -19,7 +19,7 @@ checksums = [ # So we'll statically link bazel, to avoid errors like: # "process-wrapper: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found" # See https://github.com/bazelbuild/bazel/issues/4137 -prebuildopts = "export BAZEL_LINKOPTS=-static-libstdc++:-static-libgcc BAZEL_LINKLIBS=-l%:libstdc++.a:-lm && " +static = True builddependencies = [ ('binutils', '2.32'),