// HPCG CUDA 10 requires Open MPI 3.1 and HPCG CUDA 11 requires Open MPI 4.0
vm.Install("openmpi")
if FLAGS.cuda_toolkit_version not in CUDA_FILES:
raise cuda_toolkit.UnsupportedCudaVersionException(
f"HPCG only supports CUDA {sorted(CUDA_FILES)}")
hpcg_tar, hpcg_binary = CUDA_FILES[FLAGS.cuda_toolkit_version]
vm.InstallPreprovisionedPackageData(PACKAGE_NAME, [hpcg_tar],
linux_packages.INSTALL_DIR)
vm.RemoteCommand("rm -rf %s" % HPCG_DIR)
vm.RemoteCommand("mkdir %s" % HPCG_DIR)
vm.RemoteCommand(
"cd %s && tar xvf %s --directory=%s --strip-components=1" %
(linux_packages.INSTALL_DIR, hpcg_tar, HPCG_DIR))
// Create a symlink from the hpcg binary to "hpcg"
if FLAGS.cuda_toolkit_version == "11.0":
// HPCG only release the binary that supports CUDA 11. Use the data from
// HPCG CUDA 10 package.
vm.InstallPreprovisionedPackageData(PACKAGE_NAME, [hpcg_binary], HPCG_DIR)
vm.RemoteCommand(f"chmod +x {posixpath.join(HPCG_DIR, hpcg_binary)}")
vm.RemoteCommand("cd %s && ln -s %s %s" % (HPCG_DIR, hpcg_binary, "hpcg"))
def YumInstall(_):