Open PhysXu opened 1 month ago
Hi @PhysXu , no problem! Sharing the code and data is my core believe of reproducible science and especially for computational microscopy like ptychography. If anything, I hope this encourages people to do the same for the community.
mex -setup
shows a bit more information of the path, so I wonder would it help if you reinstall the MSVS 2022 or maybe 2019 and see if your Matlab can correctly identify it. Some people mentioned that you need to install 'MSVC v140 - VS 2015 c++ build tools' for Matlab 2024a to recognize MSVS 2022.
Hope these helps!
Hi, @chiahao3 , thanks very much for your reply and suggestions. Here is a quick feedback.
Sorry, I found that I made a stupid mistake. I have not installed the CUDA locally before.
After the installation of NVIDIA CUDA toolkit, now I have win 11, matlab2023b, Microsoft Visual Studio 2022, CUDA 12.2 on my local computer. The GPU in my PC is NVIDIA GeForce RTX 4080 SUPER.
I also tried to reinstall Microsoft Visual Studio 2022 with 'MSVC v140 - VS 2015 c++ build tools' by following your suggestion:
However, the same error still exists:
Need I uninstall MSVS 2022 and try MSVS 2019?
Hi, although I'm no expert in neither Matlab, CUDA, or C++, I'll suggest let's try to split the problem into smaller chunks.
nvcc -V
and nvidia-smi
to check the version, and see if you have newer driver for your 4080 Super. If possible, find some simple CUDA task. In Python there're lots of packages that uses GPU via cudatoolkit
like pytorch
, tensorflow
, cupy
. If they can work, that means at least you have the GPU correctly identified and the driver should be ok.gpuDevice
in Matlab and see if it at least recognize your GPU deviceOverall I'll suggest that if you already spent more than 3 days on the environment setup, try to find someone with IT background, ideally with Matlab + GPU experience. I'm an electron microscopist by training and this is pretty much the best I can do 😂
Hi, chiahao3,
Thanks very much for the sharing of your scripts and data.
When I tried the script of Fig_1d_10p3mrad_Talos_runPtycho.m, some warnings appeared. Please see the two snapshot below:
I am not sure whether it is OK, as the process could still continue.
However, when the script ran to the step of GPU l initialized ..., an error appeared.
it looks like a Compiler issue. I tried to check the VS version. The version is 2022, which should be compatible:
I get confused by the error above and want to know how to solve it.