<div dir="ltr">Yes.<div><br></div><div>Originally, __attribute__ is a built-in keyword for the compiler. It is not a macro, as others suggested earlier. If you #define it to be empty, then the compiler will never see the keyword, as the preprocessor deletes it. So using #undef exactly undoes the action of the HDF5 header file, making the original keyword again visible to the compiler.<div><br></div><div>-erik</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 28, 2015 at 4:36 AM, Ian Hinder <span dir="ltr">&lt;<a href="mailto:ian.hinder@aei.mpg.de" target="_blank">ian.hinder@aei.mpg.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><div>On 28 May 2015, at 01:03, Erik Schnetter &lt;<a href="mailto:schnetter@cct.lsu.edu" target="_blank">schnetter@cct.lsu.edu</a>&gt; wrote:</div><br><blockquote type="cite"><div dir="ltr">Instead of changing the order, can we add &quot;#undef __attribute__&quot; after #inluding &lt;hdf5.h&gt;, with a respective comment? This would undo more of the damage.</div></blockquote><div><br></div></span><div>So the definition of __attribute__ in hdf5 is overriding the built-in symbol with a macro, which allows us to then undefine the macro afterwards, which allows the built-in symbol to be visible again?  I was confused because I was thinking that undefining __attribute__ was the cause of the original problem.</div><div><div class="h5"><div><br></div><br><blockquote type="cite"><div dir="ltr"><div><br></div><div>-erik</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 27, 2015 at 10:48 AM, Ian Hinder <span dir="ltr">&lt;<a href="mailto:ian.hinder@aei.mpg.de" target="_blank">ian.hinder@aei.mpg.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span><div>On 27 May 2015, at 16:30, Roberto De Pietri &lt;<a href="mailto:roberto.depietri@unipr.it" target="_blank">roberto.depietri@unipr.it</a>&gt; wrote:</div><br><blockquote type="cite">Dear Comer:<br><br>I would like to confirm you that Ian and Eric were able to correctly find out the problem that originated  the build<br>problem on build using macports <br>* The HDF5 MacPorts port was updated from 1.8.14 to 1.8.15 on 16-May-2015<br>  (<a href="https://trac.macports.org/log/trunk/dports/science/hdf5/Portfile" target="_blank">https://trac.macports.org/log/trunk/dports/science/hdf5/Portfile</a>), 2 days before the ET release<br>* HDF5 is undefining __attribute__, and this is creating site effect  (caused by including hdf5.h)<br>  that have standard c++ include to fail. This is true for gcc4.8 and gcc5.1<br>* A simple solution is to change the order of includes in the include  file: <br>  arrangements/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.hh. you can replace this include with the <br>  one attached to the present mail.<br></blockquote><div><br></div></span><div>This seems like a viable workaround until the problem is fixed in HDF5, so I propose that it be implemented in CarpetIOHDF5 and backported to the release branch.</div><div><br></div><br><blockquote type="cite"><div><div>* to have a fast start you may also copy the attached file: osx-macports.run in <br>   simfactory/mdb/runscript.<br>* then set your local machine with the command<br><br><blockquote type="cite">simfactory/bin/sim setup<br></blockquote><br>* edit the local machine file you created (using the previous command) in simfactory/mdb/machine <br>  to have:<br><br><br>*** ASSUMING MACPORT IS INSTALLED (subversion is needed cause the version that comes with XCOde<br>*** will not work [new XCODE 6.3.2 and MacPorts 2.3.3]<br><br><br>sudo port install subversion<br>sudo port install pkgconfig gcc49 fftw-3 gsl jpeg zlib hdf5 +fortran +gfortran openmpi openssl<br><br>###  [FROM a MAIN DIRECTORY for the Cactus tree]  <br><br>curl -kLO <a href="https://raw.githubusercontent.com/gridaphobe/CRL/ET_2015_05/GetComponents" target="_blank">https://raw.githubusercontent.com/gridaphobe/CRL/ET_2015_05/GetComponents</a><br>chmod a+x GetComponents<br>./GetComponents --parallel <a href="https://bitbucket.org/einsteintoolkit/manifest/raw/ET_2015_05/einsteintoolkit.th" target="_blank">https://bitbucket.org/einsteintoolkit/manifest/raw/ET_2015_05/einsteintoolkit.th</a><br><br>### [the enter in the cactus directory]<br><br>cd Cactus<br><br>cp [where_you_save_it]/CarpetIOHDF5.hh   arrangements/Carpet/CarpetIOHDF5/src/<br>cp [where_you_save_it]/osx-macports.run  simfactory/mdb/runscript<br>simfactory/bin/sim setup<br><br>### [DO the local editing. In my case was the file named]<br>### the following line should be present<br>###<br>###  optionlist      = osx-macports.cfg<br>###  runscript       = osx-macports.run<br>###  ppn             = 4<br>###  max-num-threads = 4<br>###  num-threads     = 1<br>###  nodes           = 1<br>###<br>### NOT: my machine is “iMac (27-inch, Late 2009)”<br>###   OS X Yosemite 10.10.3<br>###<br>###   Processor Name:<span style="white-space:pre-wrap">        </span>Intel Core i5<br>###   Processor Speed:<span style="white-space:pre-wrap">        </span>2,66 GHz<br>###   Number of Processors:<span style="white-space:pre-wrap">        </span>1<br>###   Total Number of Cores:<span style="white-space:pre-wrap">        </span>4<br>###   L2 Cache (per Core):<span style="white-space:pre-wrap">        </span>256 KB<br>###   L3 Cache:<span style="white-space:pre-wrap">        </span>8 MB<br>###   Memory:<span style="white-space:pre-wrap">        </span>8 GB<br><br><br>simfactory/bin/sim build --thornlist thornlists/<a href="http://einsteintoolkit.th/" target="_blank">einsteintoolkit.th</a> <br>simfactory/bin/sim create-run static_tov --parfile=par/static_tov.par --proc=4 --num-threads=2 <br><br>### Now the test TOV simulations should be running code is running on two process using two cores each.<br><br><br>## sudo port install python27<br>## sudo port select —set python python27<br>## sudo port install py-numpy py-scipy <br>## sudo port install py-matplotlib <br>## sudo port install py-h5py<br>## sudo port install py-ipython<br>## sudo port select —set ipython ipython27<br>##<br>##<br>## TO SEE THE RESULTS: <br><br><blockquote type="cite">ipython —-pylab<br></blockquote>In [..]: FILE=&#39;/Users/depietri/simulations/static_tov/output-0000/static_tov/hydrobase-rho.maximum.asc&#39;<br>In [..]: d=loadtxt(FILE)<br>In [..]: plot(d[:,1],d[:,2]*1e3,&#39;k-&#39;)<br>In [..]: ylim(1.25,1.30)<br>In [..]: xlabel(r’time   [CU c=1, G=1, $M_\odot$=1]&#39;)<br>In [..]: ylabel(r&#39;max($\rho \cdot 10^3$)   [CU c=1, G=1, $M_\odot$=1]&#39;)<br>In [..]: <br><br><br><br></div></div><span>&lt;CarpetIOHDF5.hh&gt;</span><span>&lt;osx-macports.run&gt;</span><br>------------------------------------------------------------------<br>Roberto De Pietri        e-mail:roberto.depietri@<a href="http://fis.unipr.it/" target="_blank">fis.unipr.it</a><br>Dipartimento di Fisica   <a href="http://www.fis.unipr.it/~roberto.depietri" target="_blank">http://www.fis.unipr.it/~roberto.depietri</a><br>Universita&#39; di Parma     tel: <a href="tel:%2B39%20%280521%29%20905280" value="+390521905280" target="_blank">+39 (0521) 905280</a><br>Via G.P.Usberti 7/A      fax: <a href="tel:%2B39%20%280521%29%20905223" value="+390521905223" target="_blank">+39 (0521) 905223</a><br>I-43100 PARMA --- ITALY<br><br><br><br><br><br></blockquote></div><span><font color="#888888"><br><div>
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div>-- </div><div>Ian Hinder</div><div><a href="http://members.aei.mpg.de/ianhin" target="_blank">http://members.aei.mpg.de/ianhin</a></div></div></div></div></div>
</div>
<br></font></span></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Erik Schnetter &lt;<a href="mailto:schnetter@cct.lsu.edu" target="_blank">schnetter@cct.lsu.edu</a>&gt;<br><a href="http://www.perimeterinstitute.ca/personal/eschnetter/" target="_blank">http://www.perimeterinstitute.ca/personal/eschnetter/</a></div>
</div>
</blockquote></div></div></div><div><div class="h5"><br><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div>-- </div><div>Ian Hinder</div><div><a href="http://members.aei.mpg.de/ianhin" target="_blank">http://members.aei.mpg.de/ianhin</a></div></div></div></div></div>
</div>
<br></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Erik Schnetter &lt;<a href="mailto:schnetter@cct.lsu.edu" target="_blank">schnetter@cct.lsu.edu</a>&gt;<br><a href="http://www.perimeterinstitute.ca/personal/eschnetter/" target="_blank">http://www.perimeterinstitute.ca/personal/eschnetter/</a></div>
</div>