PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Porting from Solaris to Linux

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



Joined: 23 Nov 2012
Posts: 2

PostPosted: Mon Dec 03, 2012 1:07 pm    Post subject: Porting from Solaris to Linux Reply with quote

I'm trying to port a mixed language (C, C++, Fortran) application from Solaris SPARC (Big Endian) compiled with Greenhills compiler to Linux Redhat x86-64 (little endian) platform. I'm using pgf77 and pgcc. It compiles but gives a seg fault when running. I suspect endianness and alignment issues among other things. What I'm looking for is a porting guide and porting tool that may help facilitate the porting process. Are there any specific compiler options that may help pgcc/pgf77 compile "like" the Greenhills gcc compiler? Thx.
Back to top
View user's profile
mecej4



Joined: 19 Jun 2011
Posts: 55

PostPosted: Mon Dec 03, 2012 4:59 pm    Post subject: Reply with quote

Did the Greenhills compiler give local variables in Fortran subprograms the SAVE attribute, and did the author of the code that you are working on depend on such variables retaining their value from one call to the next?

It is better for you to track down any non-standard Fortran extensions that are used in the application and bring the code into compliance with current Fortran standards, than to look for semi-magical compiler options that help a new compiler emulate the quirks of an old compiler.
Back to top
View user's profile
mcolozzi



Joined: 23 Nov 2012
Posts: 2

PostPosted: Mon Dec 03, 2012 5:14 pm    Post subject: Reply with quote

The only "magical" compiler options I'm using is -Msave and -Mextend. That said, the code is rather old and contains some obsolete but supported contexts (GOTO's, etc.). Exacerbating the problem is that the application is multithreaded... it links to both thread and pthread libraries... and the semaphore libraries are different between Solaris and Linux. Is there a porting guide that may show me what to look for and look out for?
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Dec 04, 2012 11:47 am    Post subject: Reply with quote

Having never ported from Solaris to Linux, unfortunately, I don't have any general advice. Though, if you have a specific question, we may be able to help.

Quote:
Is there a porting guide that may show me what to look for and look out for?
We don't have any PGI specific Solaris to Linux porting guides, but you might be able to find something more general on the web.

- 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