peng-lab / BaSiCPy

MIT License
61 stars 20 forks source link

Unable to run on Windows #121

Closed caolonghao closed 1 year ago

caolonghao commented 1 year ago

I follow the instructions in README and install BaSicPy on Windows. However, when I run the WSI_Brain sample code, it crashed and the error code is as follows:

2023-02-23 22:37:08.381422: E external/org_tensorflow/tensorflow/tsl/platform/windows/subprocess.cc:287] Call to CreateProcess failed. Error code: 2, command: '"ptxas.exe" "--version"'
2023-02-23 22:37:08.382497: E external/org_tensorflow/tensorflow/tsl/platform/windows/subprocess.cc:287] Call to CreateProcess failed. Error code: 2, command: '"ptxas.exe" "--version"'
2023-02-23 22:37:08.382947: W external/org_tensorflow/tensorflow/compiler/xla/stream_executor/gpu/asm_compiler.cc:85] Couldn't get ptxas version string: INTERNAL: Couldn't invoke ptxas.exe --version
2023-02-23 22:37:08.401883: E external/org_tensorflow/tensorflow/tsl/platform/windows/subprocess.cc:287] Call to CreateProcess failed. Error code: 2, command: '"ptxas.exe" "C:\Users\Dawei\AppData\Local\Temp\/tempfile-DESKTOP-ONLMAA9-1bf4-12544-5f55ef289865c" "-o" "C:\Users\Dawei\AppData\Local\Temp\/tempfile-DESKTOP-ONLMAA9-1bf4-12544-5f55ef289c8cf" "-arch=sm_75" "--warn-on-spills" "-c"'
2023-02-23 22:37:08.403079: F external/org_tensorflow/tensorflow/compiler/xla/service/gpu/nvptx_compiler.cc:454] ptxas returned an error during compilation of ptx to sass: 'INTERNAL: Failed to launch ptxas'  If the error message indicates that a file could not be written, please verify that sufficient filesystem space is provided.

It seems like the windows version of jax is not running well?

yfukai commented 1 year ago

Hi, thanks @caolonghao for your report! I think JAX is not correctly running (maybe there's a mismatch with the CUDA version?). If you would not need to use GPU, just switching to CPU might solve the problem. Could you please try adding

import jax
jax.config.update('jax_platform_name', 'cpu')

to your script and see how it works?

caolonghao commented 1 year ago

Thanks, it works! The cuda version jax on Windows seems to be a little buggy.