I generated the kspaceFirstOrder-CUDA.exe with the provided GPU K-Wave code. Then I ran example_cpp_running_simulations.m with (example_number = 4; input_filename = 'example_input.h5';
output_filename = 'example_output.h5'; pathname = 'E:\K-Wave\';input_args = {'PMLSize', pml_size,'DataName','example','DataPath','E:\K-Wave\','BinaryPath','E:\K-Wave\kspaceFirstOrder-CUDA\x64\Debug'};) I got an error that the output_file can't be opended. I checked the fold and found that the output_file was not generated. By checking the code, I found that (run_string = ['system(''' system_string ' cd /d "' binary_path '" & ' binary_name ' -i "' input_filename '" -o "' output_filename '" ' options_string ''' ,''-echo'');']; eval(run_string);) at lines of 551-552 of kspaceFirstOrder3DC.m is not excecuted successfully. I also tried to excecute (cmd=['E:\K-Wave\kspaceFirstOrder-CUDA\x64\Debug\kspaceFirstOrder-CUDA.exe -i "E:\K-Wave\example_input.h5" -o "E:\K-Wave\example_output.h5" --p_max --p_final'];[status,cmdout]=system(cmd,'-echo')) at the command windows of matlab. The execution failed too. I employed the system() to execute deviceQuery-1.exe which is an example from CUDA. There was no problem. When I ran the kspaceFirstOrder-CUDA.exe with VS2019 or cmd by using the same command "-i E:\K-Wave\example_input.h5 -o E:\K-Wave\example_output.h5 --p_max --p_final", it just worked fine. The correct output_file was generated. Would someone be so kind as to check the problem for me? I use matlab 2020b,VS2019,Win10 x64, Cuda11.4,HDF5 1.8.18.
k-Wave
A MATLAB toolbox for the time-domain
simulation of acoustic wave fields
GPU code can't be run from matlab
(1 post) (1 voice)-
Posted 2 years ago #
Reply
You must log in to post.