NF_GLOBAL and nfmpi_put_var_real

Jianwei Li jianwei at ece.northwestern.edu
Tue May 10 10:42:48 CDT 2005




On Mon, 9 May 2005, Yu-Heng Tseng wrote:

> Thanks Jianwei and Rene
>
> Your comments are very helpful.
> 1. Adding additional dummy variable helps me to solve problems.
>
> 2. Yes. The test case I am using is in the collective data mode. I found 
> that's the problem.  Here comes another question. What's the corresponding 
> subruotine in nfmpi to replace nf_put_var_real? Normally, we add _all to 
> represent collective mode. Right?

 	Right!
 	To use nfmpi_put_var_real, since it is an independent data
 	access function, the following two functions should be used to
 	after nfmpi_enddef() to mark the beginning and the end of the
 	independent data mode:

 		nfmpi_begin_indep_data()
 		... independent data mode ...
 		nfmpi_end_indep_data()

 	You can also find detailed description in our API document.

 	Thanks,
 	Jianwei

>
> Cheers
>
> Yu-heng
> Jianwei Li wrote:
>
>> 
>> Hi Yu-Heng,
>> 
>> Thanks to Rene sharing the experience with pnetcdf
>> fortran interface.
>> 
>> I have one more comment regarding your point 2:
>> Did you happen to call the independent data access
>> function in the collective data mode?
>> Could you check your "ierr" and print out the
>> error message using our nfmpi_strerror() interface?
>> It might be possible that all the "nfmpi_" functions
>> you added didn't successfully execute at all if they
>> are called in an unexpected mode (as documented in
>> our API docs).
>> 
>> Thanks,
>> Jianwei
>> 
>> On Mon, 9 May 2005, Rene Redler wrote:
>> 
>>> 
>>> P.S.:
>>> 
>>> I forgot to mention that probably all dimensions need to be
>>> declared as I described in my previous mail. For my if was
>>> helpful to take a look into pnetcdf/src/libf/mpifnetcdf.h
>>> to learn what is expected to the respective calls, although
>>> this is probably not the way the developers like us to go ;)
>>> 
>>> In your example below
>>> 
>>> ierr=nfmpi_def_var(ncid,"P0",NF_REAL,0_8,0_8,t_id)
>>> 
>>> will probably help to force the 0 arguments passed as
>>> integer*8 to the lib functions.
>>> 
>>> 
>>> Yu-Heng Tseng schrieb:
>>> 
>>>> Hi,
>>>> 
>>>> I got some problems in the testing.
>>>> 1. It seems  NF_GLOBAL causes some errors in  nfmpi_put_att_text().
>>>> Same thing  happens to NF_UNLIMITED
>>>> Is that right?
>>>> 
>>>> 2. nfmpi_put_var_real() seems not giving me right answer.
>>>> I added a couple of lines within the test program (/fandc/pnf_test.F).
>>>> real*4 pt
>>>> pt=5.0
>>>> ierr=nfmpi_def_var(ncid,"P0",NF_REAL,0,0,t_id)
>>>> ierr=nfmpi_put_var_real(ncid,t_id,pt)
>>>> 
>>>> It goes wrong in the output. Same for nfmpi_put_var_double() etc
>>>> Any idea how to fix this?
>>>> Thanks!
>>>> 
>>>> Cheers
>>>> 
>>>> Yu-heng
>>> 
>>> 
>> 
>
>




More information about the parallel-netcdf mailing list