CERN / TIGRE

TIGRE: Tomographic Iterative GPU-based Reconstruction Toolbox
BSD 3-Clause "New" or "Revised" License
550 stars 182 forks source link

Add MVS 2022 Support #348

Closed AnderBiguri closed 2 years ago

AnderBiguri commented 2 years ago

related #347

tsadakane commented 2 years ago

Hi,

CUDA 11.6 released. It supports VS2022.

I tried...

As for python, the package was build successfully and example.py seemed to work.

As for Matlab, >> mex -setup -v could not find VS2022; 2021b does not support VS2022 yet.

FYI

AnderBiguri commented 2 years ago

Fantastik @tsadakane . This would need indeed a change in MATLAB. Even if mex seems not to support it, a correct xml file may make it work.

tsadakane commented 2 years ago

Modifying the XML file to specify 2022 as the c++ compiler used by nvcc was straight forward. ([15.0, 16.0) => [16.0, 17.0) ).

But, there is another issue. It seems that mex searches for cl (vc compiler) if the file list only includes .cpp files. If vs2019 is installed too, no problem. but if only vs2022 was installed, it fails. Adding a dummy .cu file solves this problem:

        mex -largeArrayDims ./Utilities/IO/VarianCBCT/mexReadXim.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win64

Of course, gpuUtils.cu is unnecessary for mexReadXim.cpp. Ugly solution.

What do you think?

AnderBiguri commented 2 years ago

I'd say go for it. Its ugly, but so is the way nvcc and mex search for compilers, so I'd say if it works, its fine!

tsadakane commented 2 years ago

@AnderBiguri , I think you can close this issue.

Before being closed, I report that I could run d03_generateData.m successfully under the following environment:

AnderBiguri commented 2 years ago

Fantastic! Good to know!