Bend
Bend copied to clipboard
Build failed for hvm
Describe the bug
Build failed for hvm under nvcc command, also multiple variables errors.
To Reproduce Steps to reproduce the behavior:
- Install HVM with the same device information as mine
error: failed to run custom build command for `hvm v2.0.12`
Caused by:
process didn't exit successfully: `C:\Users\User\AppData\Local\Temp\cargo-install3h6L76\release\build\hvm-5f1044a6b8476071\build-script-build` (exit code: 1)
--- stdout
cargo:rerun-if-changed=src/hvm.c
cargo:rerun-if-changed=src/hvm.cu
TARGET = Some("x86_64-pc-windows-msvc")
HOST = Some("x86_64-pc-windows-msvc")
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-msvc
CC_x86_64-pc-windows-msvc = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_msvc
CC_x86_64_pc_windows_msvc = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("cmpxchg16b,fxsr,lahfsahf,sse,sse2,sse3")
DEBUG = Some("false")
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-msvc
CFLAGS_x86_64-pc-windows-msvc = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_msvc
CFLAGS_x86_64_pc_windows_msvc = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
hvm.c
src/hvm.c(3): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory
cargo:warning=WARNING: Failed to compile hvm.c: ToolExecError: Command "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.35.32215\\bin\\HostX64\\x64\\cl.exe" "-nologo" "-MD" "-O2" "-Brepro" "-DTPC_L2=4" "-FoC:\\Users\\User\\AppData\\Local\\Temp\\cargo-install3h6L76\\release\\build\\hvm-07292d060c7a436a\\out\\2e40c9e35e9506f4-hvm.o" "-c" "src/hvm.c" with args cl.exe did not execute successfully (status code exit code: 2).
cargo:warning=Ignoring hvm.c and proceeding with build. The C runtime will not be available.
cargo:rustc-link-search=native=/usr/local/cuda/lib64
TARGET = Some("x86_64-pc-windows-msvc")
OPT_LEVEL = Some("3")
HOST = Some("x86_64-pc-windows-msvc")
cargo:rerun-if-env-changed=CXX_x86_64-pc-windows-msvc
CXX_x86_64-pc-windows-msvc = None
cargo:rerun-if-env-changed=CXX_x86_64_pc_windows_msvc
CXX_x86_64_pc_windows_msvc = None
cargo:rerun-if-env-changed=HOST_CXX
HOST_CXX = None
cargo:rerun-if-env-changed=CXX
CXX = None
cargo:rerun-if-env-changed=NVCC_x86_64-pc-windows-msvc
NVCC_x86_64-pc-windows-msvc = None
cargo:rerun-if-env-changed=NVCC_x86_64_pc_windows_msvc
NVCC_x86_64_pc_windows_msvc = None
cargo:rerun-if-env-changed=HOST_NVCC
HOST_NVCC = None
cargo:rerun-if-env-changed=NVCC
NVCC = None
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
cargo:warning=Compiler family detection failed due to error: ToolExecError: Command "nvcc" "-E" "C:\\Users\\User\\AppData\\Local\\Temp\\cargo-install3h6L76\\release\\build\\hvm-07292d060c7a436a\\out\\16107288331581443839detect_compiler_family.c" with args nvcc did not execute successfully (status code exit code: 1).
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("cmpxchg16b,fxsr,lahfsahf,sse,sse2,sse3")
DEBUG = Some("false")
cargo:rerun-if-env-changed=CXXFLAGS_x86_64-pc-windows-msvc
CXXFLAGS_x86_64-pc-windows-msvc = None
cargo:rerun-if-env-changed=CXXFLAGS_x86_64_pc_windows_msvc
CXXFLAGS_x86_64_pc_windows_msvc = None
cargo:rerun-if-env-changed=HOST_CXXFLAGS
HOST_CXXFLAGS = None
cargo:rerun-if-env-changed=CXXFLAGS
CXXFLAGS = None
C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hvm-2.0.12\src\hvm.cu(907): warning #550-D: variable "old" was set but never used
Pair old;
^
Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"
C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hvm-2.0.12\src\hvm.cu(921): warning #550-D: variable "old" was set but never used
Port old;
^
C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hvm-2.0.12\src\hvm.cu(1146): warning #177-D: variable "lps" was declared but never referenced
u32 lps = 0;
^
C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hvm-2.0.12\src\hvm.cu(1147): warning #177-D: variable "init" was declared but never referenced
Port init = var;
^
C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hvm-2.0.12\src\hvm.cu(1170): warning #177-D: variable "INI_A" was declared but never referenced
Port INI_A = A;
^
C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hvm-2.0.12\src\hvm.cu(1171): warning #177-D: variable "INI_B" was declared but never referenced
Port INI_B = B;
^
C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hvm-2.0.12\src\hvm.cu(1173): warning #177-D: variable "lps" was declared but never referenced
u32 lps = 0;
^
C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hvm-2.0.12\src\hvm.cu(1329): warning #20039-D: a __host__ function("interact_eras") redeclared with __device__, hence treated as a __host__ __device__ function
__declspec(__device__) bool interact_eras(Net* net, TM* tm, Port a, Port b);
^
C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hvm-2.0.12\src\hvm.cu(1846): warning #177-D: variable "chkt" was declared but never referenced
u32 chkt = 0;
^
C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hvm-2.0.12\src\hvm.cu(1847): warning #177-D: variable "chka" was declared but never referenced
u32 chka = 1;
^
C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hvm-2.0.12\src\hvm.cu(1933): warning #550-D: variable "itrs" was set but never used
u64 itrs = 0;
^
C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hvm-2.0.12\src\hvm.cu(2482): warning #177-D: variable "pos" was declared but never referenced
u32 pos = gnet->rbag_pos[gid];
^
C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hvm-2.0.12\src\hvm.cu(241): warning #177-D: variable "S" was declared but never referenced
const u64 S = 2520000000;
^
C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hvm-2.0.12\src\hvm.cu(293): warning #177-D: variable "FREE" was declared but never referenced
const Port FREE = 0x00000000;
^
C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hvm-2.0.12\src\hvm.cu(431): warning #177-D: variable "NIL" was declared but never referenced
const u32 NIL = 0;
^
C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hvm-2.0.12\src\hvm.cu(432): warning #177-D: variable "CONS" was declared but never referenced
const u32 CONS = 1;
^
hvm.cu
tmpxft_000008d0_00000000-10_hvm.cudafe1.cpp
C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hvm-2.0.12\src\hvm.cu(351): error C2148: total size of array must not exceed 0x7fffffff bytes
C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hvm-2.0.12\src\hvm.cu(352): error C2148: total size of array must not exceed 0x7fffffff bytes
C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hvm-2.0.12\src\hvm.cu(1972): warning C4244: 'return': conversion from 'Pair' to 'Port', possible loss of data
--- stderr
error occurred: Command "nvcc" "-ccbin=C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.35.32215\\bin\\HostX64\\x64\\cl.exe" "-Xcompiler" "-nologo" "-Xcompiler" "-MD" "-Xcompiler" "-O2" "-Xcompiler" "-Brepro" "-Xcompiler" "-W4" "-o" "C:\\Users\\User\\AppData\\Local\\Temp\\cargo-install3h6L76\\release\\build\\hvm-07292d060c7a436a\\out\\2e40c9e35e9506f4-hvm.o" "-c" "src/hvm.cu" with args nvcc did not execute successfully (status code exit code: 2).
error: failed to compile `hvm v2.0.12`, intermediate artifacts can be found at `C:\Users\User\AppData\Local\Temp\cargo-install3h6L76`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Expected behavior
I can install hvm and use it for bend-lang.
Desktop (please complete the following information):
- OS: MINGW64_NT-10.0-22621 DESKTOP-69TAUPC 3.3.4-341.x86_64 2022-05-13 22:10 UTC x86_64 Msys
uname -a - CPU:
processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 151 model name : 12th Gen Intel(R) Core(TM) i7-12700F stepping : 2 microcode : 0x23 cpu MHz : 2120.000 cache size : 25600 KB physical id : 0 siblings : 20 core id : 0 cpu cores : 10 apicid : 0 initial apicid : 0
- GPU:
$ nvidia-smi
Mon May 20 07:08:53 2024
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.84 Driver Version: 545.84 CUDA Version: 12.3 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce RTX 3060 WDDM | 00000000:01:00.0 On | N/A |
| 31% 40C P0 53W / 170W | 2509MiB / 12288MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
- Cuda Version: 12.3
Additional context I'm not sure is it problem from Cuda or HVM.
For cargo nightly version:
$ cargo +nightly --version
cargo 1.80.0-nightly (0de7f2ec6 2024-05-17)
You're using msys2 but your target is set to windows. Also, if you are in msys then you also haven't installed the pthreads package.
Compiling directly on windows is not yet supported, so either commit to using msys or move to wsl or wait a little bit
Have you managed to get it working?
I think I'm having a similar issue when I try to run files in VScode,
The code I'm trying to run (just copied from an example):
def sum (depth, x):
switch depth:
case 0:
return x;
case _:
fst = sum(depth-1, x*2+0)
snd = sum(depth-1, x*2+1)
return fst + snd;
def main():
return sum(30, 0)
The error it gives:
PS C:\Users\james\Documents\codePractice> bend run myBendFile.bend
Errors:
Failed to start hvm process.
program not found
I assume it's related to my installation of bend because I had several errors during installation, none that I didn't fix, but they still happened so not sure if it's just a corrupted install. (The errors were things like trying to rename/delete temporary files while a process was using it, and also just not having nightly installed, so I had to install that and restart my pc to kill any processes that were using cargo.)
I might just uninstall and reinstall bend later to see if that helps.
Have you managed to get it working?
I move to WSL, and it's working smoothly!
I think I'm having a similar issue when I try to run files in VScode,
The code I'm trying to run (just copied from an example):
def sum (depth, x): switch depth: case 0: return x; case _: fst = sum(depth-1, x*2+0) snd = sum(depth-1, x*2+1) return fst + snd; def main(): return sum(30, 0)The error it gives:
PS C:\Users\james\Documents\codePractice> bend run myBendFile.bend Errors: Failed to start hvm process. program not foundI assume it's related to my installation of bend because I had several errors during installation, none that I didn't fix, but they still happened so not sure if it's just a corrupted install. (The errors were things like trying to rename/delete temporary files while a process was using it, and also just not having nightly installed, so I had to install that and restart my pc to kill any processes that were using cargo.)
I might just uninstall and reinstall bend later to see if that helps.
Have you installed HVM?
I think I'm having a similar issue when I try to run files in VScode, The code I'm trying to run (just copied from an example):
def sum (depth, x): switch depth: case 0: return x; case _: fst = sum(depth-1, x*2+0) snd = sum(depth-1, x*2+1) return fst + snd; def main(): return sum(30, 0)The error it gives:
PS C:\Users\james\Documents\codePractice> bend run myBendFile.bend Errors: Failed to start hvm process. program not foundI assume it's related to my installation of bend because I had several errors during installation, none that I didn't fix, but they still happened so not sure if it's just a corrupted install. (The errors were things like trying to rename/delete temporary files while a process was using it, and also just not having nightly installed, so I had to install that and restart my pc to kill any processes that were using cargo.) I might just uninstall and reinstall bend later to see if that helps.
Have you installed HVM?
oh yeah my bad :P