Hi Wei-keng,<br><br>The workaround that you propose below won't work for me since in general I would need<br>var2(1), var2(1,1), var2(1,1,1) etc but my template generated code won't be easy to modify to do that <br>
and I cannot currently go back to include pnetcdf.inc since these functions are not defined in that<br>file.<br>"pionfput_mod.F90", 1516-036 (S) Entity nfmpi_bput_vara_text has undefined type.<br><br>Jim<br><br>
<div class="gmail_quote">On Wed, Oct 31, 2012 at 9:59 AM, Jim Edwards <span dir="ltr"><<a href="mailto:edwards.jim@gmail.com" target="_blank">edwards.jim@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Okay that works as a workaround, but it doesn't strike me as an acceptable long term solution.<div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">On Tue, Oct 30, 2012 at 4:21 PM, Wei-keng Liao <span dir="ltr"><<a href="mailto:wkliao@ece.northwestern.edu" target="_blank">wkliao@ece.northwestern.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Please try "var2(1)". i.e.<br>
<br>
err = nfmpi_put_var_text(ncid, varid(2), var2(1))<br>
<br>
Wei-keng<br>
<div><div><br>
On Oct 30, 2012, at 5:02 PM, Jim Edwards wrote:<br>
<br>
> Hi,<br>
><br>
> The attached program writes a file of form<br>
><br>
> netcdf test {<br>
> // file format: CDF-5 (big variables)<br>
> dimensions:<br>
> Clen1 = 12 ;<br>
> Clen2 = 6 ;<br>
> variables:<br>
> char string1(Clen1) ;<br>
> char string2(Clen2, Clen1) ;<br>
> data:<br>
><br>
> string1 = "abcdefghijkl" ;<br>
><br>
> string2 =<br>
> "1bcdefghijkl",<br>
> "2bcdefghijkl",<br>
> "3bcdefghijkl",<br>
> "4bcdefghijkl",<br>
> "5bcdefghijkl",<br>
> "6bcdefghijkl" ;<br>
> }<br>
><br>
> The program works fine when using #include <pnetcdf.inc> but when trying to use pnetcdf.mod<br>
> it incorrectly gives an error, I believe that the module interface just needs to be expanded to include multi-dimensional character strings. I am using code from the repository svn v1100<br>
><br>
> mpxlf95_r pnetcdf-write-bug.F -I/contrib/parallel-netcdf/svn1100/include -L/contrib/parallel-netcdf/svn1100/lib -lpnetcdf -qfixed<br>
> "pnetcdf-write-bug.F", line 79.48: 1513-061 (S) Actual argument attributes do not match those specified by an accessible explicit interface.<br>
> ** main === End of Compilation 1 ===<br>
> 1501-511 Compilation failed for file pnetcdf-write-bug.F.<br>
><br>
> --<br>
> Jim Edwards<br>
><br>
> CESM Software Engineering Group<br>
> National Center for Atmospheric Research<br>
> Boulder, CO<br>
> <a href="tel:303-497-1842" value="+13034971842" target="_blank">303-497-1842</a><br>
><br>
</div></div>> <pnetcdf-write-bug.F><br>
<br>
</blockquote></div><br><br clear="all"><br></div></div><span class="HOEnZb"><font color="#888888">-- <br><pre>Jim Edwards<br><br><br></pre><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><pre>Jim Edwards<br><br><br></pre><br>