Ceci est une ancienne révision du document !
La version de PGI à utiliser sur les systèmes Debian est la 15.1.
Pour pouvoir utiliser PGI 15.1, il faut d'abord charger l'environnement correspondant :
e5-2670comp3:~> source /usr/local/modeles/pgi-15.1
Cette commande redéfinit les variables d'environnement PATH, LD_LIBRARY_PATH et MANPATH pour contenir les chemins vers les répertoires des binaires PGI (compilateurs, debugger, profiler, …), des libraires PGI et respectivement des manuels en ligne d'utilisation.
Pour vérifier que cette étape s'est bien effectuée, on peut par exemple chercher si la commande pgfortran est reconnue et voir si elle concerne bien la version 15.1 :
e5-2670comp3:~> which pgfortran /softs/pgi/linux86-64/15.1/bin/pgfortran e5-2670comp3:~> pgfortran -V pgfortran 15.1-0 64-bit target on x86-64 Linux -tp sandybridge The Portland Group - PGI Compilers and Tools Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.
Les compilateurs et les autres binaires fournis par SGI se trouvent dans le répertoire bin de l'installation :
e5-2670comp3:~> ls /softs/pgi/linux86-64/15.1/bin/ acc1rc pgacclnk pgf901 pgnvvm acclin8664rc pgappend pgf902 pgobjinfo CcffReader.jar pgasm pgf90_ex pgocld ccrc pgc pgf90rc pgocld64rc change-pgi-hostid pgc++ pgf95 pgocldlinrc cppcurc pgcc pgfortran pgocldrc cpprc pgCC pgftnc pgoffcl c++rc pgc_ex pgftn_ex pgoprun fnativerc pgcollect pgftnrc pgprepro ganymed-ssh2-build251.jar pgcollectrc pggdecode pgprof iparc pgcollin64rc pggpp1 pgprofrc jide-common.jar pgcollinrc pggpp2 pgroupd jide-dock.jar PGcomp.jar pggpp2ex pgsampt jpgdbg.jar pgcpp pghpf pgserv Jpgprof.jar pgcpp1 pghpf1 pgsize libamdocl64.so pgcpp2 pghpf1_ex pgsmart lin8664rc pgcpp2ex pghpf2 pgsupport lin86rc pgcpuid pghpfrc pgtjavarc llvm-as pgcudainit pgicg pgtlinrc llvm-link pgdbg pgi_license_tool pgtoolsrc lmborrow pgdbglinrc pgimport pgtxwinrc lmgrd pgdbgrc pgipa pgunzip lmgrd.rc pgdebug PGlaf.jar PGutil.jar lmutil pgdecode pgmicd pgzip localrc pgdisasm pgmicd64rc rsyntaxtextarea.jar makelocalrc pgevtofq pgmicdlinrc sqlite4java.jar mpirun_dbg.pgdbg pgexplain.xml pgmicdrc versionrc nativerc pgextract pgnvd x8664rc optopgprof pgf77 pgnvd64rc x86rc pgaccelerror pgf77rc pgnvdlinrc pgaccelinfo pgf90 pgnvdrc
Notons les binaires suivants :
Binaire | Description |
---|---|
pgfortran | compilateur Fortran 2003 capable OpenMP et auto-parallélisation |
pgcc | compilateur ANSI C capable OpenMP et auto-parallélisation |
pgc++ | compilateur ANSI C++ capable OpenMP et auto-parallélisation |
pgprof | profileur graphique MPI, OpenMP et multi-thread |
pgdbg | débogueur graphique MPI, OpenMP et multi-thread |
Parmi les options des compilateurs, notons les plus courrantes (pour une liste complète de ces options ou pour plus de détails pour chaque option, consulter la page de manuel, p.ex. man pgfortran) :
Option | Description |
---|---|
-c | Generate intermediate object file but does not attempt to link |
-g | Adds information for debugging to the object file and/or executable |
-I <directory> | Tells the preprocessor to search in directory for include or module files |
-L <directory> | Tells the linker to search in directory for libraries |
-r8 | Promotes REALs from the default size of 4 bytes to 8 bytes |
-i8 | Promotes INTEGERs from the default size of 4 bytes to 8 bytes |
-O3 | Higher level of optimization than -O2 (the default optimization level) |
-fast | Higher optimization level than -O3 |
-Mipa | Tells the compiler to perform interprocedural analysis. Can be very time consuming toperform. This flag should also be used in both compilation and linking steps |
-Mconcur | Enables autoparallelization. Additional options can be used with -Mconcur to provide morefine-grained control of autoparallelization |
-Minfo | Instructs the compiler to report optimizations that are made |
-Mneginfo | Instructs the compiler to report optimizations that are not made |
-mp | Enables parallelization via OpenMP directives |