PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Installing 5.2 on AMD64 running Gentoo linux

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Licenses and Installation
View previous topic :: View next topic  
Author Message
vsm8



Joined: 18 Aug 2004
Posts: 3

PostPosted: Mon Sep 20, 2004 9:04 am    Post subject: Installing 5.2 on AMD64 running Gentoo linux Reply with quote

We are migrating from 32 bit to an Opteron system running the latest Gentoo Linux with both 64 and 32 bit support and the gcc 3.3.3 compiler, licensing issues are taken care of with a permanent license (no errors).

Following the install instructions we know that:

gcc –m32 hello.c
and gcc –mcmodel=medium hello.c
gcc –m64 hello.c
work.

We got errors on crtbegin.o which was resolved for the 64 bit compiler by
defining (in /usr/pgi/linux86-64/5.2/bin/lin86rc)
#set GCCINC=/usr/i386-redhat-linux/include
set GCCINC=/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.3/include
;
#set GCCDIR=/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3
set GCCDIR=/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.3
;
#set G77DIR=/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3
set G77DIR=/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.3
;


So now a simple test.F program that looks like so:
program test
print*,'Test me out'
stop
end

compiles with the 64 bit compiler:
oberon ekv3 # /usr/pgi/linux86-64/5.2/bin/pgf90 test.F
oberon ekv3 # ./a.out
-bash: ./a.out: Accessing a corrupted shared library

With the 32 bit compiler we cannot compiler given the same settings or adding the trailing /32 to the /usr/pgi/linux86/5.2/bin/lin86rc:
set GCCINC=/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.3/include
;
set GCCDIR=/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.3/32
;
set G77DIR=/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.3/32
;

oberon ekv3 # /usr/pgi/linux86/5.2/bin/pgf90 test.F
/usr/bin/ld: cannot find -lpgc

Any help on both these issues would be great! I need to get MM5 going on this box, although the version compiled for the 5.0 compiler seems to run with only one processor (the box is a dual 248 with 8GB of RAM), as does openoffice.org, both of which are 32 bit programs. Also, the test.F program compiled on the 32 bit box works on the Opteron box.

Thanks!
Back to top
View user's profile
jrm



Joined: 30 Jun 2004
Posts: 34
Location: PGI

PostPosted: Wed Sep 22, 2004 10:34 am    Post subject: Reply with quote

Gentoo is not one of the distributions that PGI has in-house, though there
should be no reason why the PGI compilers cannot be made to work.

For starters, you should make your changes in the localrc file. Changes
made in there will override any settings in any *rc file. No one should be
changing the other *rc files, because unintended consequences can happen.

If you haven't tried running the install script to install the compilers, you
really should start with that. The configuration that you describe should
be supported by the 5.2 installer by default.

After installing, next check the localrc file in $PGI/linux86/5.2/bin and
$PGI/linux86-64/bin. There should be some differences. Especially,
make sure that GCCDIR, GCCINC, and G77DIR are set properly. The
install script uses the gcc binary that it finds in $PATH to detemine
these settings.

I've downloaded the Gentoo amd64 2004.2 ISO and will get it installed so
we can test this out for ourselves.

John
Back to top
View user's profile
vsm8



Joined: 18 Aug 2004
Posts: 3

PostPosted: Wed Oct 20, 2004 10:19 am    Post subject: Any progress? Reply with quote

Just checking in to see if progress has been made. We might just switch the license to an intel box if we cannot use amd64 version to cross compile on Gentoo.

Thanks!
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Oct 20, 2004 2:44 pm    Post subject: Reply with quote

If I'm understanding this correctly, your wanting to use your AMD64 system to build both 64 and 32-bit executables?

This is my personal opinion so take it for what it worth, but you might consider using SuSE9.1 instead of Gentoo. It's my understanding that by default Gentoo only supports 64-bit applications. For 32-bit applications, you must install a separate emulation package. SuSE9.1 supports both.

You can then use the PGI "-tp" flag to target various systems. For example, if you build an application on an AMD64 using "-tp piv", you've created a 32-bit executable targeting an Intel Pentium IV.

Good Luck,
Mat
Back to top
View user's profile
vsm8



Joined: 18 Aug 2004
Posts: 3

PostPosted: Wed Nov 17, 2004 10:50 am    Post subject: Fixed Reply with quote

I fixed the installation.

Steps:

1. A full system update including gcc-3.3.4-R1, glibc-2.3.4.20040808-r1 - this forced an update of emulation libraries.

2. Running ./makelocalrc in the /usr/pgi/linux86/5.2/bin and /usr/pgi/linux86-64/5.2/bin and adding the ourput to lin86rc (cat localrc >> lin86rc and lin8664rc) and removing duplicate old entries.

So both 32 and 64 bit versions of pgf90 are working.

---Venkat.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Licenses and Installation 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