PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Environment Variables

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



Joined: 12 Dec 2005
Posts: 7

PostPosted: Wed Feb 08, 2006 7:22 am    Post subject: Environment Variables Reply with quote

Hi,

This post is related to my recent one titled 'acml'.

I am wondering about environment varaible issues, and optimal code compiling for my system. I have a2 processor, amd 2.4 GHz dual core machine running Suse 10.0 and PGI workstation compilers. In consultation with a partner I have added the following to my .bashrc file

# PGI compiler paths

PGI=/usr/pgi; export PGI
MANPATH=$MANPATH:$PGI/linux86-64/6.1/man
export MANPATH
LM_LICENSE_FILE=$PGI/license.dat
export LM_LICENSE_FILE
PATH=$PGI/linux86-64/6.1/bin:$PATH
export PATH

export CC=pgcc
export CPP=pgCC
export CXX=pgCC
export OPT="-tp=k8-64 -mp -Mcache_align"

Based on Mat's second reply in the 'acml' post I think I should also add...

export NCPUS=2
and change the opt time to have
export OPT="-tp=k8-64 -mp -Mcache_align -Mconcur -Minfo -Mneginfo=concur"

My questions then are....
1. What do all those OPT items do, and is it ok to have them in my .bashrc, or is it better to use the at compile time as needed only
2. what are equivenlant environment variables for fortran 77, 90 and hpf so that if I am build code from a script file it knows to use PG (and not say gnu, or whatever)
3. I will be getting the full acml package per Mats' suggestion. ONce I do that, should I be setting an environment variable to take advantage of the dynamic version of acml_mp?
4. I am new to parallel processing. linux, etc. If I am average, how many years will it take for me to be compotent at this!!!

Thanks
Buddy
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Feb 08, 2006 3:24 pm    Post subject: Reply with quote

Hi Buddy,

Quote:

1. What do all those OPT items do, and is it ok to have them in my .bashrc, or is it better to use the at compile time as needed only


"-tp" selects the executable's target architecture. "k8-64" being Opteron/AMD64. Note when the "-tp" option is not used, the default is to use the architecture of the system your compiling on. Hence, specifying the architecture is generally not needed unless your creating an executable for a different architecture, such as "-tp k8-32" which creates a 32-bit executable.

"-mp" tells the compiler that your code includes OpenMP directives and should generate parallel code. With OpenMP, you've added directives to tell the compiler which portions of code to parallelize. This is different than "-Mconcur". With "-Mconcur", the compiler tries to find portions of your code that it can parallelize. I would not use "-Mconcur" by default yet. There is a certain amount of overhead associated with parallelism and can slow down some programs where there is little opportunity to parallelize.

For more information about OpenMP, please refer to Chapters 5 and 6 of the PGI User's Guide.

"-Mcache_align" aligns data objects which have a size of 16 or more bytes on cache-line boundaries and helps speed data retrieval from memory. This option is on by default for 64-bit architectures.

I think it's up to you if you want to define a list of base options in your rc files. Personally I wouldn't, but could see the benefit if you're always using the same options and only compiling for a single architecture. Keep in mind that "OPT" is not standard and various builds may use "FLAGS", "CFLAGS", FFLAGS", "LDOPT", etc.

Quote:
2. what are equivenlant environment variables for fortran 77, 90 and hpf so that if I am build code from a script file it knows to use PG (and not say gnu, or whatever)

While not standard, often times FC, F77, or F90 are used.
Quote:
3. I will be getting the full acml package per Mats' suggestion. ONce I do that, should I be setting an environment variable to take advantage of the dynamic version of acml_mp?

With the current ACML package direct from AMD, you'd specify the path to the particular library. I've forgotten the actual path names but it would be something like:
Code:
-L/opt/acml/pgi64_mp/lib -lacml

Note that we changed the name of OpenMP ACML library included with the PGI release to "libacml_mp" in order to better accommodate our directory structure.

Quote:
4. I am new to parallel processing. linux, etc. If I am average, how many years will it take for me to be compotent at this!!!

Anywhere between 5 minutes to a lifetime! It all depends on what your trying to do. If your want to create extremely complex, many thousand node MPI programs for use on ASCII Purple, well it may take a while. If you compile your program with "-Mconcur" and the compiler finds good parallel opportunities, then it only takes a few minutes.

Thanks for the questions,
Mat
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