PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Read Namelist problem, version 13.7

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
junfengliu



Joined: 30 Mar 2013
Posts: 2

PostPosted: Wed Jul 24, 2013 5:36 am    Post subject: Read Namelist problem, version 13.7 Reply with quote

Hi

I recently updated my pgi complier to 13.7 and I got a very strange problem. There are no problem to compile the Fortran-based model. However, when I run the model, it will stop at mo_inirun.F90 where it reads the namelist file. It is not working even if I removed most or all the variables in the namelist file. The only message is:

Segmentation fault

There is no problem to compile and run the model with pgi10.x or pgi7.x. So I'd like to know how to deal with this errors.


In addition, I have another question. When I use the pretty old version pgi7.x, if there is an error reading namelist file it will print out the error message 'inirun: Failed to open namelist file' in the log file (see the code below). However, since I use version 10.xx or newer, iostat=iret doesn't work. It always gives me the meaningless "Segmentation fault". Is there any compiler flags option to turn this error information on. Otherwise it is very difficult to figure out where is the error. I am running a chemical transport model with hundreds of modules and I really need these code generated error information.

Thank you for your help in advance.

Liu


Below is the code and namelist file
......
file = 26
open( unit = file, file = trim(nml_file),iostat=iret )
if( iret /= 0 ) then
write(*,*) 'inirun: Failed to open namelist file'
call endrun
end if
read(file,nlist,iostat=iret) !!!!!!!!!!!! the code stops at here
if( iret /= 0 ) then
write(*,*) 'inirun: Failed to read namelist file ',trim(nml_file),'; error = ',iret
call endrun
end if
close( file )
.......

-------a.nml
&NLIST
aa = 1.0
/
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Jul 24, 2013 9:37 am    Post subject: Reply with quote

Hi Lui,

Can you either post or send to PGI Customer Support (trs@pgroup.com) a reproducing example?

Thanks,
Mat
Back to top
View user's profile
junfengliu



Joined: 30 Mar 2013
Posts: 2

PostPosted: Wed Jul 24, 2013 10:01 am    Post subject: Reply with quote

Hi Mat:

May I send the whole model and input data or just the mo_inirun.F90 and the namelist file to the customer support?

Thanks!

JF
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Jul 24, 2013 11:13 am    Post subject: Reply with quote

Sure, so long as you send everything we need to build the full code and instructions on how to reproduce the error.

- Mat
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
Page 1 of 1

 
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