<?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; User Favorites: hko</title>
		<link><a href='http://www.k-wave.org/forum/profile/hko'>hko</a></link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 00:07:25 +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/profile/" rel="self" type="application/rss+xml" />

		<item>
			<title>Bradley Treeby on "Multiple GPUs, k-Wave 1.1"</title>
			<link>http://www.k-wave.org/forum/topic/multiple-gpus-k-wave-11#post-7864</link>
			<pubDate>Mon, 05 Oct 2020 09:24:14 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">7864@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi qzshi,&#60;/p&#62;
&#60;p&#62;The best way with the current version of k-Wave is to use the native GPU code by calling &#60;code&#62;kspaceFirstOrder3DG&#60;/code&#62; with the optional input &#60;code&#62;&#38;#39;DeviceNum&#38;#39;&#60;/code&#62; set to 0 or 1 (etc). You don't need to call &#60;code&#62;gpuDevice&#60;/code&#62; from within MATLAB.&#60;/p&#62;
&#60;p&#62;Brad
&#60;/p&#62;</description>
		</item>
		<item>
			<title>qzshi on "Multiple GPUs, k-Wave 1.1"</title>
			<link>http://www.k-wave.org/forum/topic/multiple-gpus-k-wave-11#post-7863</link>
			<pubDate>Fri, 02 Oct 2020 04:21:36 +0000</pubDate>
			<dc:creator>qzshi</dc:creator>
			<guid isPermaLink="false">7863@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;hi, Brad&#60;/p&#62;
&#60;p&#62;I use the function gpuDevice(1) and gpuDevice(2) on two matlab sessions, but when I run the function kspaceFirstOrder2DG respectively, only one GPU(GPU 0 of 8 GPU) is selected on both two matlab sessions.&#60;/p&#62;
&#60;p&#62;So, is it right for this approach to call multiple GPUs?&#60;/p&#62;
&#60;p&#62;best regards&#60;br /&#62;
qzshi
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Equivalent Source Holography for 1D Measured Data"</title>
			<link>http://www.k-wave.org/forum/topic/equivalent-source-holography-for-1d-measured-data#post-7797</link>
			<pubDate>Wed, 09 Sep 2020 19:45:38 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">7797@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Khan,&#60;/p&#62;
&#60;p&#62;In principle, you could run a similar type of optimisation, but I don't imagine it will be very well posed as you will be trying to fit a large number of unknowns (amplitude and phase or driving signal over a plane) with only a small amount of measurement data.&#60;/p&#62;
&#60;p&#62;As an aside, running the simulations in 2D only makes sense if your experimental geometry is 2D (e.g., you have a transducer that is very large in the out of plane direction).&#60;/p&#62;
&#60;p&#62;An alternative approach would be to setup an equivalent transducer (e.g., using a bowl if your transducer is bowl shaped, etc), and then run a simple optimisation over the transducer properties, e.g., radius of curvature, aperture diameter, etc. This problem will be much better posed as you will be fitting only a small number of parameters to your data. You could perform the optimisation using the inbuilt MATLAB routines which are relatively straightforward to use.&#60;/p&#62;
&#60;p&#62;Hope that helps,&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>hko on "Equivalent Source Holography for 1D Measured Data"</title>
			<link>http://www.k-wave.org/forum/topic/equivalent-source-holography-for-1d-measured-data#post-7772</link>
			<pubDate>Tue, 25 Aug 2020 16:07:41 +0000</pubDate>
			<dc:creator>hko</dc:creator>
			<guid isPermaLink="false">7772@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I was wondering if it is possible to use calculateMassSourceCW with the measured data given as a 1D matrix of complex pressure values. For instance, if I only have the azimuth beam profile (1D) measured for a linear array, can I calculate the equivalent source, which would give me the amplitude and phase of each element in the array? &#60;/p&#62;
&#60;p&#62;I have tried to modify the &#34;Equivalent Source Holography Example&#34; by simulating the measured data using kspaceFirstOrder2D with no luck yet. I wanted to know if I am missing anything before I continue.&#60;/p&#62;
&#60;p&#62;Thank you in advance,&#60;br /&#62;
Khan
&#60;/p&#62;</description>
		</item>
		<item>
			<title>JoanOS on "Parallel Computing Installation"</title>
			<link>http://www.k-wave.org/forum/topic/parallel-computing-installation#post-6016</link>
			<pubDate>Mon, 26 Jun 2017 13:22:12 +0000</pubDate>
			<dc:creator>JoanOS</dc:creator>
			<guid isPermaLink="false">6016@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Perfect! Thank you very much. &#60;/p&#62;
&#60;p&#62;Awesome toolbox, congrats.&#60;/p&#62;
&#60;p&#62;Joan
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Parallel Computing Installation"</title>
			<link>http://www.k-wave.org/forum/topic/parallel-computing-installation#post-6011</link>
			<pubDate>Sun, 25 Jun 2017 19:09:42 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">6011@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi JoanOS,&#60;/p&#62;
&#60;p&#62;This advice is no longer relevant to the latest versions of k-Wave. You now have two options:&#60;/p&#62;
&#60;p&#62;(1) To use the GPU via MATLAB, you need the parallel computing toolbox. Then, just add the optional input parameter &#60;code&#62;&#38;#39;DataCast&#38;#39;, &#38;#39;gpuArray-single&#38;#39;&#60;/code&#62;. &#60;/p&#62;
&#60;p&#62;(2) To use the native CUDA GPU code, download the relevant binary from the k-Wave download page, and then replace calls to &#60;code&#62;kspaceFirstOrder3D&#60;/code&#62; with &#60;code&#62;kspaceFirstOrder3DG&#60;/code&#62;.&#60;/p&#62;
&#60;p&#62;The second option gives better performance.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>JoanOS on "Parallel Computing Installation"</title>
			<link>http://www.k-wave.org/forum/topic/parallel-computing-installation#post-6007</link>
			<pubDate>Thu, 22 Jun 2017 17:29:06 +0000</pubDate>
			<dc:creator>JoanOS</dc:creator>
			<guid isPermaLink="false">6007@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello all, &#60;/p&#62;
&#60;p&#62;I am trying to install all the necessary packages  to run my simulation parallel in the GPU. I have never tried it before so please excuse me if something is wrong. &#60;/p&#62;
&#60;p&#62;If I am not wrong I should install all these packages: &#60;a href=&#34;http://www.k-wave.org/forum/topic/getting-started-with-gpumat&#34; rel=&#34;nofollow&#34;&#62;http://www.k-wave.org/forum/topic/getting-started-with-gpumat&#60;/a&#62; . I did but when I introduce the command &#60;code&#62;GPUstart&#60;/code&#62; I obtain: &#60;/p&#62;
&#60;p&#62;&#34;GPUmat, Copyright (C) 2012  GP-you Group (&#60;a href=&#34;http://gp-you.org&#34; rel=&#34;nofollow&#34;&#62;http://gp-you.org&#60;/a&#62;)&#60;/p&#62;
&#60;p&#62;By using GPUmat, you accept all the terms and conditions&#60;br /&#62;
specified in the license.txt file.&#60;/p&#62;
&#60;p&#62;Please send any suggestion or bug report to &#60;a href=&#34;mailto:gp-you@gp-you.org&#34;&#62;gp-you@gp-you.org&#60;/a&#62;.&#60;br /&#62;
Starting GPU&#60;br /&#62;
- GPUmat version: 0.280&#60;br /&#62;
- Required CUDA version: 5.0&#60;br /&#62;
Unable to run TEST MEX file. Microsoft Visual C++ 2008 Redistributable Package should be installed in your system. &#34;&#60;/p&#62;
&#60;p&#62;Current CUDA version: 8.0&#60;br /&#62;
Current Microsoft Visual C++: 2017&#60;br /&#62;
GPU: nvidia gforce 740m&#60;br /&#62;
Matlab version: R2016b&#60;/p&#62;
&#60;p&#62;Thank you in advance
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Multiple GPUs, k-Wave 1.1"</title>
			<link>http://www.k-wave.org/forum/topic/multiple-gpus-k-wave-11#post-4949</link>
			<pubDate>Thu, 22 Jan 2015 22:00:58 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">4949@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Andy,&#60;/p&#62;
&#60;p&#62;In the &#60;a href=&#34;http://www.k-wave.org/documentation/example_us_bmode_linear_transducer.php&#34;&#62;Simulating B-mode Ultrasound Images Example&#60;/a&#62;, the simulated ultrasound image is formed by performing multiple k-Wave simulations. These can be performed separately (with separate calls to &#60;code&#62;kspaceFirstOrder3D&#60;/code&#62;), and thus can be run on different GPUs. &#60;/p&#62;
&#60;p&#62;If you want to do the same thing running multiple 2D simulations, this can be done in the same way. However, it is not possible to split a single simulation over multiple GPUs. The main reason is that the simulations rely on the FFT, which requires an all-to-all communication. This becomes very slow when data has to pass along the PCIe links between the GPUs (if you're interested, you can read more about this &#60;a href=&#34;http://www.homepages.ucl.ac.uk/~rmapbtr/papers/CONF_11_2012_Nandapalan_PDCAT_MultiGPU.pdf&#34;&#62;here&#60;/a&#62;).&#60;/p&#62;
&#60;p&#62;Hope that helps,&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>acarlson on "Multiple GPUs, k-Wave 1.1"</title>
			<link>http://www.k-wave.org/forum/topic/multiple-gpus-k-wave-11#post-4939</link>
			<pubDate>Fri, 16 Jan 2015 20:38:55 +0000</pubDate>
			<dc:creator>acarlson</dc:creator>
			<guid isPermaLink="false">4939@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Johan and Brad,&#60;/p&#62;
&#60;p&#62;I was wondering if there is a way to &#34;split&#34; the example file kspaceFirstOrder2D? I think I followed the original post of splitting into scan lines, but it is not as clear if is possible to do this with firstorder2d problem&#60;/p&#62;
&#60;p&#62;I would appreciate any help, I currently have the following hardware, and was hoping to utilize multipe GPU's, if possible.&#60;/p&#62;
&#60;p&#62;(2X) 12-core Xeon E5-2680v3 CPUs&#60;br /&#62;
(2x) NVIDIA Tesla K40's&#60;br /&#62;
128GB DDR4 2133MHz Memory&#60;/p&#62;
&#60;p&#62;The system has Scientific Linux 6.5 with NVIDIA CUDA and MATLAB R2014b &#60;/p&#62;
&#60;p&#62;Andy
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Multiple GPUs, k-Wave 1.1"</title>
			<link>http://www.k-wave.org/forum/topic/multiple-gpus-k-wave-11#post-4811</link>
			<pubDate>Sat, 01 Nov 2014 11:32:44 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">4811@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Johan,&#60;/p&#62;
&#60;p&#62;Thanks for the update, very interesting. Glad to see you got it working!&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ceke on "Multiple GPUs, k-Wave 1.1"</title>
			<link>http://www.k-wave.org/forum/topic/multiple-gpus-k-wave-11#post-4788</link>
			<pubDate>Thu, 23 Oct 2014 19:07:45 +0000</pubDate>
			<dc:creator>ceke</dc:creator>
			<guid isPermaLink="false">4788@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Oh, it might be possible to run this in one MATLAB session if you can execute the two scripts with directing the to two different MATLAB workers using something like:&#60;/p&#62;
&#60;p&#62;parpool(2);&#60;br /&#62;
parfor gpu = 1:2,&#60;br /&#62;
  if gpu == 1,&#60;br /&#62;
    gpuDevice(1)&#60;br /&#62;
  else&#60;br /&#62;
    gpuDevice(2)&#60;br /&#62;
  end&#60;br /&#62;
  run_the_simulation_script&#60;br /&#62;
end&#60;br /&#62;
parpool close;&#60;/p&#62;
&#60;p&#62;I have had some problems, though, since the parfor construction doesn't work so well with struct variables. The solution was to write a wrapper function for the kspace...  with all individual struct fields as separate arguments, and then call this wrapper from parfor. Then, inside the wrapper, re-pack the struct and call the k-wave function.&#60;/p&#62;
&#60;p&#62;Haven't tried the trick above, but I can't see why it shouldn't work. &#60;/p&#62;
&#60;p&#62;Cheers,&#60;br /&#62;
/Johan
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ceke on "Multiple GPUs, k-Wave 1.1"</title>
			<link>http://www.k-wave.org/forum/topic/multiple-gpus-k-wave-11#post-4787</link>
			<pubDate>Thu, 23 Oct 2014 18:55:37 +0000</pubDate>
			<dc:creator>ceke</dc:creator>
			<guid isPermaLink="false">4787@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thanks for the quick response, almost too quick for me :-)&#60;/p&#62;
&#60;p&#62;So, below is what I tried, which appears to be working fine:&#60;/p&#62;
&#60;p&#62;1) I took the script &#34;example_us_bmode_linear_transducer.m&#34; and split it into two parts, where the for loop for the simulation is split so that the scripts take half of the scan lines each and then save the results in separate .mat files.&#60;/p&#62;
&#60;p&#62;2) I started two MATLAB sessions and called gpuDevice(1) in the first and gpuDevice(2) in the other. &#60;/p&#62;
&#60;p&#62;3) In a terminal windows I typed nvidia-smi a few times to see what happened to memory usage and it seems like it uses about 750-780 MB of GPU RAM on each, and that the GPU temperature slowly ramps up on both.&#60;/p&#62;
&#60;p&#62;When starting the first MATLAB session the estimated computation time was about 1.5 minutes/scan line. When starting the second session (on the other GPU) it first increased to 2.5 minurts/scan line, but after a minute or so they both dropped back down to 1.5.&#60;/p&#62;
&#60;p&#62;All in all, it appears that the speedup of this scheme is about two times when adding the extra GPU.&#60;/p&#62;
&#60;p&#62;For your reference, I'm running a system with:&#60;br /&#62;
1) Intel Xeon CPU E5-1650 v2 @ 3.5 GHz   (6 cores in HyperThreading -&#38;gt; 12 threads)&#60;br /&#62;
2) 64 GB of RAM&#60;br /&#62;
3) GeForce GTX Titan Z with dual GPUs with 6 GB of GPU RAM each&#60;br /&#62;
4) Ubuntu 14.04.1 LTS (x64)&#60;br /&#62;
5) MATLAB 2014a with the Parallel Computing Toolbox&#60;br /&#62;
6) NVIDIA Driver version 343.22 (v. 6.5)&#60;br /&#62;
7) NVIDIA Toolkit v. 5.5&#60;/p&#62;
&#60;p&#62;Many thanks!&#60;br /&#62;
/Johan
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Multiple GPUs, k-Wave 1.1"</title>
			<link>http://www.k-wave.org/forum/topic/multiple-gpus-k-wave-11#post-4776</link>
			<pubDate>Sun, 19 Oct 2014 21:58:00 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">4776@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Johan,&#60;/p&#62;
&#60;p&#62;You can use the MATLAB function &#60;code&#62;gpuDevice&#60;/code&#62; with no inputs to query which device is currently selected, and then &#60;code&#62;gpuDevice(1)&#60;/code&#62; or &#60;code&#62;gpuDevice(2)&#60;/code&#62; (etc) to select which one you'd like to use. I've not tried using multiple GPU devices with multiple MATLAB sessions, so I'd be interested to know if you can get it to work.&#60;/p&#62;
&#60;p&#62;Hope that helps,&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ceke on "Multiple GPUs, k-Wave 1.1"</title>
			<link>http://www.k-wave.org/forum/topic/multiple-gpus-k-wave-11#post-4775</link>
			<pubDate>Sun, 19 Oct 2014 20:23:46 +0000</pubDate>
			<dc:creator>ceke</dc:creator>
			<guid isPermaLink="false">4775@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;So, I just installed k-Wave 1.1 on my Ubuntu 14.04 (x64) system. It features a GTX Titan Z dual GPU card, with 6 GB of GPU memory per GPU.&#60;/p&#62;
&#60;p&#62;Running, for example 'example_us_bmode_phased_array.m' with data_cast = 'gpuArray-single' works, out of the box. It does, however, only use one of the GPUs.&#60;/p&#62;
&#60;p&#62;I tried starting two MATLAB sessions, and then launching two separate MATLAB scripts like the example above, hoping that the OS would schedule the second job to the other GPU (since the first one was already working at full load). This was not the case.&#60;/p&#62;
&#60;p&#62;So, now to the question: How can I direct my scripts to a specific GPU in the case I have more than one?&#60;/p&#62;
&#60;p&#62;I run the Parallel Computing Toolbox, but none of the other GPU solutions (except, of course, for NVIDIAs drivers and toolkit).&#60;/p&#62;
&#60;p&#62;Best regards,&#60;br /&#62;
/Johan
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Working within memory limits"</title>
			<link>http://www.k-wave.org/forum/topic/working-within-memory-limits#post-3962</link>
			<pubDate>Mon, 14 Oct 2013 16:30:12 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">3962@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Charles,&#60;/p&#62;
&#60;p&#62;For a CW source, I think the situation is slightly more complicated. If you have a homogeneous medium, when you enforce the source in your second simulation as a Dirichlet boundary condition, the resulting wavefield downstream from the 2D plane will be the same as if you had run one big simulation. &#60;/p&#62;
&#60;p&#62;However, in a heterogeneous medium, the waves scattered from your imaging target will then also be reflected from the source plane over which the Dirichlet boundary condition is being applied. This is easiest to imagine in the case of the source pressure being zero. This will result in a pressure of zero being enforced across the 2D plane, which will reflect the sound waves. &#60;/p&#62;
&#60;p&#62;You could avoid this by using a source signal that has finished being transmitted before any reflections reach the source plane.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>chuck_c on "Working within memory limits"</title>
			<link>http://www.k-wave.org/forum/topic/working-within-memory-limits#post-3961</link>
			<pubDate>Mon, 14 Oct 2013 16:16:36 +0000</pubDate>
			<dc:creator>chuck_c</dc:creator>
			<guid isPermaLink="false">3961@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thank you for the reply. I think this should help me get started. I would possibly like to measure the sound reflected back at some point, but I will try to focus on one thing at a time! It seems the reverse of your suggestion (ie. propagate back via a plane on the left side of the second space into the first space) might be a possible solution. Also, I am using a ~10 msec pulse, so I think it can be viewed as somewhat continuous.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Working within memory limits"</title>
			<link>http://www.k-wave.org/forum/topic/working-within-memory-limits#post-3960</link>
			<pubDate>Mon, 14 Oct 2013 14:55:01 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">3960@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Charles,&#60;/p&#62;
&#60;p&#62;One possibility would be to setup a simulation just containing the transducer in water, and record the time varying pressure over a 2D plane on one side of the domain, say the right. In a new simulation containing your imaging target, you could then enforce this pre-recorded pressure over an identical 2D plane as a Dirichlet boundary condition on the left of the domain. This should give you the same acoustic field as if you had performed one larger simulation (keeping in mind the time-staggering between inputs and outputs as described in the k-Wave manual).&#60;/p&#62;
&#60;p&#62;Do you want to measure the reflected sound back at the transducer surface, or just look at the scattered waves around your imaging target? Also, are you using a CW or pulsed source?&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>chuck_c on "Working within memory limits"</title>
			<link>http://www.k-wave.org/forum/topic/working-within-memory-limits#post-3954</link>
			<pubDate>Fri, 11 Oct 2013 15:56:17 +0000</pubDate>
			<dc:creator>chuck_c</dc:creator>
			<guid isPermaLink="false">3954@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I am trying to simulate a scenario using a GPU but the space is too large for my GPU's memory. The scenario is a spherically focused ultrasound transducer with a large amount of water stand-off, so I think the propagation from the transducer face through the initial water section should be quite similar regardless of my imaging target. I was wondering whether it would be possible to simulate the transducer one time and then use the output from that as input into the smaller target space. I am open to other solutions to this problem but this seemed intuitive.&#60;/p&#62;
&#60;p&#62;Thanks for the nice simulation package.&#60;/p&#62;
&#60;p&#62;-Charles
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
