Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Qiskit dependencies for StdEnv/2020 #80

Open
wants to merge 2 commits into
base: computecanada-main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
easyblock = 'Tarball'

name = 'cuQuantum'
version = '23.10.0.6'

homepage = 'https://developer.nvidia.com/cuquantum-sdk'
description = """NVIDIA cuQuantum SDK is a high-performance library for
quantum information science and beyond"""

toolchain = {'name': 'gompic', 'version': '2023a'}
toolchainopts = {'optarch': 'False'}
local_cuda_major = '12'

# By downloading, you accept the cuQuantum Software License Agreement
# (https://developer.nvidia.com/cuquantum-license-agreement)
# accept_eula = True
source_urls = ['https://developer.download.nvidia.com/compute/cuquantum/redist/cuquantum/linux-x86_64/']
sources = ['cuquantum-linux-x86_64-%%(version)s_cuda%s-archive.tar.xz' %local_cuda_major]
checksums = [
'5ff77bd5cf62fab02e598fe5e1b1617d521207552808173e135f9a9607f56bad', #sources
]

dependencies = [
('cuTENSOR', '1.7.0.1'),
('SciPy-Stack', '2023b'),
]

builddependencies = { #required by Python extension
('python-build-bundle', '2023b'),
('pytest', '7.4.0'),
}

multi_deps = {'Python' : ['3.10', '3.11']}

#build optional cutensornet-mpi library
preinstall_cmd = ' && '.join([
'cd distributed_interfaces',
'export MPI_PATH=$EBROOTOPENMPI',
'bash activate_mpi.sh',
])

multi_deps_extensions_only = True

postinstallcmds = [
'mv %(installdir)s/distributed_interfaces/libcutensornet_distributed_interface_mpi.so %(installdir)s/lib',
'/cvmfs/soft.computecanada.ca/easybuild/bin/setrpaths.sh --path %(installdir)s/lib --any_interpreter --add_path $EBROOTCUDA/lib:%(installdir)s/lib:$EBROOTCUTENSOR/lib',
]

local_extoptions = ' && '.join([
'export CUQUANTUM_ROOT=$EBROOTCUQUANTUM',
'export CUTENSOR_ROOT=$EBROOTCUTENSOR',
'cd python',
#cupy is required for cuquantum python extension
'pip install cupy==12.2.0 --no-index --prefix=%(installdir)s',
'', #for trailing character
])

exts_defaultclass = "PythonPackage"
exts_list = [
('cuquantum', '23.10.0', {
'source_urls' : ['https://github.com/NVIDIA/cuQuantum/archive/refs/tags/'],
'sources' : ["v%(version)s.tar.gz"],
'checksums' : ['837d345eb520388c4dfac33fdd1e8b90c001cb751dd90626589870f35ac9b3e0'],
'prebuildopts' : local_extoptions,
'preinstallopts' : local_extoptions,
'use_pip' : True,
'installopts' : '--no-deps',
}),
]

keepsymlinks = True

sanity_check_paths = {
'files': [
'include/cutensornet.h',
'include/custatevec.h',
'lib/libcutensornet.so',
'lib/libcustatevec.so',
'lib/libcutensornet_distributed_interface_mpi.so',
'lib/libcutensornet_static.a',
'lib/libcustatevec_static.a',
],
'dirs': ['include', 'lib'],
}

sanity_check_commands = [
'python -c "from cuquantum import custatevec"',
'python -c "from cuquantum import cutensornet"',
'python -c "from cuquantum import contract"',
'python -c "from cuquantum import Network"',
]

modextrapaths = {'EBPYTHONPREFIXES': ''}
modextravars = {'CUTENSORNET_COMM_LIB': '%(installdir)s/lib/libcutensornet_distributed_interface_mpi.so'}

moduleclass = 'numlib'
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
easyblock = 'CMakeMake'

name = 'muparserx'
version = '4.0.12'

homepage = 'beltoforion.de/en/muparserx'
description = 'A C++ Library for Parsing Expressions with Strings, Complex Numbers, Vectors, Matrices and more.'
toolchain = {'name': 'GCCcore', 'version': '12.3.0'}

source_urls = ['https://github.com/beltoforion/muparserx/archive/refs/tags/']
sources = ['v%(version)s.tar.gz']
checksums = ['941c79f9b8b924f2f22406af8587177b4b185da3c968dbe8dc371b9dbe117f6e']

builddependencies = [
('CMake', '3.27.7'),
]

configopts = ' -DBUILD_SHARED_LIBS=ON '

sanity_check_paths = {
'files': ['lib/libmuparserx.so'],
'dirs': ['include/muparserx', 'share/cmake/muparserx'],
}

moduleclass = 'lib'
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ multi_deps_extensions_only = True

exts_defaultclass = 'PythonPackage'
exts_list = [
('symengine', '0.10.0', {
('symengine', '0.11.0', {
'sources': [{
'source_urls': ["https://github.com/symengine/symengine.py/releases/download/v%(version)s/"],
'filename': "symengine.py-0.10.0.tar.gz",
'filename': "symengine.py-0.11.0.tar.gz",
}],
'checksums': ['923944ab54aa0a787629424c101f5ec6a87b44177c669d21c7d3b0257f725927'],
'checksums': ['702fc5e5640e81714eacecf9da03ba1d9cc2f49fc8c4c6154b57d3d7dfacc698'],
'use_pip': True,
}),
]
Expand Down