<?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: CUDA/OMP (C++) file I/O problems</title>
		<link>http://www.k-wave.org/forum/topic/cudaomp-c-file-io-problems</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:38:51 +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/cudaomp-c-file-io-problems" rel="self" type="application/rss+xml" />

		<item>
			<title>frli8848 on "CUDA/OMP (C++) file I/O problems"</title>
			<link>http://www.k-wave.org/forum/topic/cudaomp-c-file-io-problems#post-8476</link>
			<pubDate>Mon, 14 Mar 2022 08:36:37 +0000</pubDate>
			<dc:creator>frli8848</dc:creator>
			<guid isPermaLink="false">8476@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thanks Bradley, this solved it (I'm on 2020b Update 3 on Gentoo Linux)!&#60;/p&#62;
&#60;p&#62;/Fredrik
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "CUDA/OMP (C++) file I/O problems"</title>
			<link>http://www.k-wave.org/forum/topic/cudaomp-c-file-io-problems#post-8475</link>
			<pubDate>Fri, 11 Mar 2022 19:15:07 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">8475@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Fredrick,&#60;/p&#62;
&#60;p&#62;Have you tried the solution &#60;a href=&#34;http://www.k-wave.org/forum/topic/error-reading-h5-files-when-using-binaries&#34;&#62;here&#60;/a&#62;?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>frli8848 on "CUDA/OMP (C++) file I/O problems"</title>
			<link>http://www.k-wave.org/forum/topic/cudaomp-c-file-io-problems#post-8473</link>
			<pubDate>Fri, 11 Mar 2022 16:23:34 +0000</pubDate>
			<dc:creator>frli8848</dc:creator>
			<guid isPermaLink="false">8473@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;I made a small test program:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;#include &#38;lt;assert.h&#38;gt;
#include &#38;lt;stdlib.h&#38;gt;
#include &#38;quot;hdf5.h&#38;quot;
#include &#38;quot;hdf5_hl.h&#38;quot;

int main()
{
    herr_t  status;

    hid_t file_id = H5Fopen(&#38;quot;/tmp/example_input.h5&#38;quot;, H5F_ACC_RDONLY, H5P_DEFAULT);
    assert(file_id &#38;gt;= 0);

    char string[256] = &#38;quot;&#38;quot;;

    fprintf(stderr, &#38;quot;string : %s\n&#38;quot;, string);

    fprintf(stderr, &#38;quot;---- reading attribute ----\n&#38;quot;);
    status = H5LTget_attribute_string(file_id, &#38;quot;/&#38;quot;,
                                      &#38;quot;file_type&#38;quot;, string);
    assert(status &#38;gt;= 0);

    fprintf(stderr, &#38;quot;string : %s\n&#38;quot;, string);

    status = H5Fclose(file_id);
    assert(status &#38;gt;= 0);
}&#60;/code&#62;&#60;/pre&#62;
&#60;pre&#62;&#60;code&#62;$ gcc test_attribute.c -lhdf5  -lhdf5_hl -o test_h5_attr
$ ./test_h5_attr
string :
---- reading attribute ----
string : @u�U&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Not sure why this fails since the Attribute looks OK in hdfview?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>frli8848 on "CUDA/OMP (C++) file I/O problems"</title>
			<link>http://www.k-wave.org/forum/topic/cudaomp-c-file-io-problems#post-8472</link>
			<pubDate>Fri, 11 Mar 2022 15:15:52 +0000</pubDate>
			<dc:creator>frli8848</dc:creator>
			<guid isPermaLink="false">8472@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;After some more debuggin i realized that &#60;code&#62;file_type&#60;/code&#62; is an h5 Attribute and not a Dataset:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$ h5dump -a file_type  /tmp/example_input.h5
HDF5 &#38;quot;/tmp/example_input.h5&#38;quot; {
ATTRIBUTE &#38;quot;file_type&#38;quot; {
   DATATYPE  H5T_STRING {
      STRSIZE H5T_VARIABLE;
      STRPAD H5T_STR_NULLTERM;
      CSET H5T_CSET_UTF8;
      CTYPE H5T_C_S1;
   }
   DATASPACE  SCALAR
   DATA {
   (0): &#38;quot;input&#38;quot;
   }
}
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;but reading that Attribute seems to fail.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>frli8848 on "CUDA/OMP (C++) file I/O problems"</title>
			<link>http://www.k-wave.org/forum/topic/cudaomp-c-file-io-problems#post-8471</link>
			<pubDate>Fri, 11 Mar 2022 13:55:33 +0000</pubDate>
			<dc:creator>frli8848</dc:creator>
			<guid isPermaLink="false">8471@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Looking closer at the &#60;code&#62;/tmp/example_input.h5&#60;/code&#62; file there seems to be no &#60;code&#62;file_type&#60;/code&#62; entry (Dataset):&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$ h5ls  /tmp/example_input.h5 &#124; grep file_type&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;returns nothing.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>frli8848 on "CUDA/OMP (C++) file I/O problems"</title>
			<link>http://www.k-wave.org/forum/topic/cudaomp-c-file-io-problems#post-8470</link>
			<pubDate>Fri, 11 Mar 2022 13:38:38 +0000</pubDate>
			<dc:creator>frli8848</dc:creator>
			<guid isPermaLink="false">8470@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi all,&#60;/p&#62;
&#60;p&#62;I'm new to k-Wave and trying out the demos but I run into problems with the CUDA and C++ (OMP) code. I tried the &#60;code&#62;example_cpp_running_simulations.m&#60;/code&#62; demo and I just get:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$ ./kspaceFirstOrder-OMP -i /tmp/example_input.h5 -o /tmp/example_output.h5 --p_final --p_max

-snip-

 Error: Invalid format of the input file: iostream error  

-snip-&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I have traced that down to the file:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;kspaceFirstOrder-OMP/Hdf5/Hdf5FileHeader.cpp&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;where &#60;code&#62;getFileType()&#60;/code&#62; returns 3 and &#60;code&#62;FileType::kInput&#60;/code&#62; is 0 in the function:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;void Hdf5FileHeader::readHeaderFromInputFile(Hdf5File&#38;amp; inputFile)&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Is this an installation issue or a bug? (the pre-compiled binaries have the same problem).&#60;/p&#62;
&#60;p&#62;/Fredrik
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
