<?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: Precission error at 1024x1024</title>
		<link>http://www.k-wave.org/forum/topic/precission-error-at-1024x1024</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 22:00:36 +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/precission-error-at-1024x1024" rel="self" type="application/rss+xml" />

		<item>
			<title>bISHOP on "Precission error at 1024x1024"</title>
			<link>http://www.k-wave.org/forum/topic/precission-error-at-1024x1024#post-32</link>
			<pubDate>Wed, 21 Jul 2010 11:27:21 +0000</pubDate>
			<dc:creator>bISHOP</dc:creator>
			<guid isPermaLink="false">32@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;I´ve replicated the error and it is a memory error, as you say. The interpolation is set to nearest, as you suggest, so my I think my results will be fair enough to demonstrate that we should adquire a Tesla or similar. I´m going to install latest MATLAB in a desktop machine (quad core, 4GB and Zotac GT240) and I will repeat the measures to compare GPUs and multi-threading.&#60;/p&#62;
&#60;p&#62;Thanks again.&#60;/p&#62;
&#60;p&#62;Daniel.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Precission error at 1024x1024"</title>
			<link>http://www.k-wave.org/forum/topic/precission-error-at-1024x1024#post-30</link>
			<pubDate>Wed, 21 Jul 2010 10:47:46 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">30@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Daniel,&#60;/p&#62;
&#60;p&#62;Unfortunately I have not been able to replicate this error, however, it is likely your PC is running out of memory when it tries to compute the Delaunay triangulation on a matrix of this size. This triangulation is computed once in advance and then continually used to calculate the pressure at Cartesian sensor coordinates that do not lie exactly on the rectangular grid using linear interpolation. You could try to use the MATLAB delaunay function outside of k-Wave to see if you get the same problem using a 1024x1024 matrix.&#60;/p&#62;
&#60;p&#62;When running simulations on the GPU, if you have &#60;code&#62;&#38;#39;CartInterp&#38;#39;&#60;/code&#62; set to &#60;code&#62;&#38;#39;nearest&#38;#39;&#60;/code&#62;, the Delaunay triangulation is not calculated, so you wouldn't see the error.&#60;/p&#62;
&#60;p&#62;To make the comparison between GPU and CPU fair, I would suggest using the options &#60;code&#62;&#38;#39;CartInterp&#38;#39;, &#38;#39;nearest&#38;#39;, &#38;#39;DataCast&#38;#39;, &#38;#39;single&#38;#39;&#60;/code&#62; for the simulations run on the CPU. You would also see a slight speed-up when using the CPU if you used a later version of MATLAB that supports multi-threading.&#60;/p&#62;
&#60;p&#62;The GPU speed is also quite dependent on the card. For example, I can run a simulation on a 128x128x128 grid with 1000 time steps in around 1 minutes 30 seconds on a Tesla T10 and 6 minutes on a Quadro FX 3700. This is compared to about 18 minutes 30 seconds on a fast quad-core PC.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bISHOP on "Precission error at 1024x1024"</title>
			<link>http://www.k-wave.org/forum/topic/precission-error-at-1024x1024#post-28</link>
			<pubDate>Wed, 21 Jul 2010 10:16:33 +0000</pubDate>
			<dc:creator>bISHOP</dc:creator>
			<guid isPermaLink="false">28@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi again.&#60;/p&#62;
&#60;p&#62;I'm testing GPU simulations against CPU ones. I´ve modified only the size of the k-space for the same configuration in all tests. I´ve tried 128, 256, 512 and 1024, apart from other sizes to test non-power of two yield. I´m doing this to prove my boss that we should buy some CUDA compatible hardware, so it is just orientative.&#60;/p&#62;
&#60;p&#62;Simulations for GPU at 128, 256, 512 and 1024 went right, but for CPU only, MATLAB crashes at 1024 with this message:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;Running k-space simulation...
  WARNING: visualisation plot scale may not be optimal for given source
  dt: 20ns, t_end: 96.54us, time steps: 4828
  input grid size: 1024 by 1024 pixels (102.4 by 102.4mm)
  maximum supported frequency: 7.5MHz
  smoothing p0 distribution...
  smoothing density distribution...
  calculating Delaunay triangulation...
??? Error using ==&#38;gt; qhullmx

While executing:  &#124; qhull d Qt Qbb Qc

Options selected for Qhull 2003.1 2003/12/30:
  delaunay  Qtriangulate  Qbbound-last  Qcoplanar-keep  _pre-merge
  _zero-centrum  Pgood  Qinterior-keep  _max-width 0.1  Error-roundoff 1.4e-016
  _one-merge 9.9e-016  Visible-distance 2.8e-016  U-coplanar-distance 2.8e-016
  Width-outside 5.7e-016  _wide-facet 1.7e-015

Last point added to hull was p276113.
  Last merge was #1742388.

Qhull has finished constructing the hull.

At error exit:

precision problems (corrected unless &#38;#39;Q0&#38;#39; or an error)

1742388
 coplanar horizon facets for new vertices

      1
 degenerate hyperplanes recomputed with gaussian elimination

      1
 nearly singular or axis-parallel hyperplanes

Error in ==&#38;gt; delaunayn at 117
t = qhullmx(x&#38;#39;, &#38;#39;d &#38;#39;, opt);

Error in ==&#38;gt; gridDataFast at 55
    tri = delaunayn([x y]);

Error in ==&#38;gt; kspaceFirstOrder2D at 952
        [zi del_tri] = gridDataFast(kgrid.z, kgrid.x, p, sensor_z, sensor_x);

Error in ==&#38;gt; ej211 at 71
sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;And I don´t have any idea of where the error is. I think it is interesting because GPU handles it and I just expected eons in the CPU simulation time, but not a crash.&#60;/p&#62;
&#60;p&#62;Thank you in advance.&#60;/p&#62;
&#60;p&#62;Daniel.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
