<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>k-Wave User Forum &#187; Topic: GPU code can&#039;t be run from matlab</title>
		<link>http://www.k-wave.org/forum/topic/gpu-code-cant-be-run-from-matlab</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Fri, 15 May 2026 02:33:43 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.k-wave.org/forum/search.php</link>
		</textInput>
		<atom:link href="http://www.k-wave.org/forum/rss/topic/gpu-code-cant-be-run-from-matlab" rel="self" type="application/rss+xml" />

		<item>
			<title>pk82418 on "GPU code can&#039;t be run from matlab"</title>
			<link>http://www.k-wave.org/forum/topic/gpu-code-cant-be-run-from-matlab#post-8528</link>
			<pubDate>Sun, 08 May 2022 05:33:30 +0000</pubDate>
			<dc:creator>pk82418</dc:creator>
			<guid isPermaLink="false">8528@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;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';&#60;br /&#62;
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 &#34;' binary_path '&#34; &#38;amp; ' binary_name ' -i &#34;' input_filename '&#34; -o &#34;' output_filename '&#34; ' 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 &#34;E:\K-Wave\example_input.h5&#34; -o &#34;E:\K-Wave\example_output.h5&#34; --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 &#34;-i E:\K-Wave\example_input.h5 -o E:\K-Wave\example_output.h5 --p_max --p_final&#34;, 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.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
