PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Course

pgf90 6.2 and NetCDF with FLAG: mcmodel=medium
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
Vincent DANIEL



Joined: 07 Dec 2004
Posts: 2

PostPosted: Fri Jun 01, 2007 4:37 pm    Post subject: pgf90 6.2 and NetCDF with FLAG: mcmodel=medium Reply with quote

Hi there,

I need to use the mcmodel=medium flag in my main program.
With this flag, my calls to the NetCDF routine nf90_get_var returns only 0s
Without the flag, it returns the correct values.

I saw the post: http://www.pgroup.com/userforum/viewtopic.php?t=581&view=previous&sid=454d3d9f959182c48d41e9d43d1ff221
and I tried to compile NetCDF with the following env:

env CC=pgcc CXX=pgCC FC=pgf90 F90=pgf90 CFLAGS=" -O2 -fpic -Mlarge_arrays" CXXFLAGS=" -fpic -Mlarge_arrays" FFLAGS=" -O2 -w -fpic -Mlarge_arrays" F90FLAGS=" -O2 -w -fpic -Mlarge_arrays"


Unfortunately, It was unsuccessful.
Perhaps someone can help me.

Thanks,
Vincent

pgf90 -V
pgf90 6.2-5 64-bit target on x86-64 Linux
(Got the same results with 7.0-4)
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6631
Location: The Portland Group Inc.

PostPosted: Mon Jun 04, 2007 12:15 pm    Post subject: Reply with quote

Hi Vincent,

Unfortunately NetCDF itself hasn't been ported to use the medium memory model or large arrays. However, your application should run correctly so long as you're not trying to pass large arrays to NetCDF. What values are you passing to 'nf90_get_var'?

Thanks,
Mat
Back to top
View user's profile
Vincent DANIEL



Joined: 07 Dec 2004
Posts: 2

PostPosted: Tue Jun 05, 2007 3:02 am    Post subject: Reply with quote

Hi Mat,
I do not pass large arrays from NetCDF to Fortran.
The typical array is a float array of dim(100,100)
And I still have only 0s...
Thanks,
Vincent.
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6631
Location: The Portland Group Inc.

PostPosted: Tue Jun 05, 2007 1:33 pm    Post subject: Reply with quote

Hi Vincent,

I was able to reproduce the issue with "-Mlarge_arrays" and will investigate the cause. Since it's not needed, I think the best thing to do is to simply remove "-Mlarge_arrays" and just compile NetCDF with "-fastsse -fpic".

- Mat
Back to top
View user's profile
ncurtis



Joined: 05 Oct 2007
Posts: 1

PostPosted: Fri Oct 05, 2007 11:05 am    Post subject: Solution found? Reply with quote

Hi All,

I have recently encountered the same problem and I was wondering if you had resolved this?
We have the same situation in PGI 6.1, when we compile with -mcmodel=medium, the results of reading a netcdf file using ncdf_get_var() are 0's. We don't seem to have any problems with reading other details from the netcdf file, its just when we dynamically allocate memory.

Code:
rv = nf90_Inquire_Dimension(FileID, tecId, len=numrec)
print*, 'numrec', numrec
 
allocate(tecarray(0:numRec-1), STAT=allocateStatus)
rv = nf90_get_var(FileID, tecId, tecarray)
print*, tecarray(0:10)


prints:
Code:
 numrec        23752
    0.000000000000000         0.000000000000000         0.000000000000000
    0.000000000000000         0.000000000000000         0.000000000000000
    0.000000000000000         0.000000000000000         0.000000000000000
    0.000000000000000         0.000000000000000


We previously used mcmodel=medium in PGI 5.1, without any issues, so we're a bit baffled why this would show up in 6.1.

We can probably get by w.o using the mcmodel, but we would like to resolve it.
Any help would be greatly appreciated.
Regards,
Natalie
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group