Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
documentation:tools:testspgi [2015/04/29 05:44] – [Tests de performance] cicalugadocumentation:tools:testspgi [2023/01/12 09:40] (Version actuelle) – supprimée ltaulell
Ligne 1: Ligne 1:
-====== Tests de fonctionnement et performance PGI et CUDA fortran ====== 
  
-{{INLINETOC}} 
-===== PGI 15.1 sur les systèmes Debian ===== 
- 
-La version de PGI à utiliser sur les systèmes Debian est la 15.1. 
- 
-==== Environnement de travail ==== 
- 
-Pour pouvoir utiliser PGI 15.1, il faut d'abord charger l'environnement correspondant :  
- 
-<code bash>  
-e5-2670comp3:~> source /usr/local/modeles/pgi-15.1  
-</code> 
- 
-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 (les man pages). 
- 
-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 : 
- 
-<code bash>  
-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.  
-</code> 
- 
-==== Compilateurs et autres outils ==== 
- 
-Les compilateurs et les autres binaires fournis par SGI se trouvent dans le répertoire bin de l'installation : 
- 
-<code bash>  
-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 
-</code> 
- 
-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 |  
- 
-==== Options de compilation ==== 
- 
-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 | 
- 
- 
-==== Tests de performance ==== 
- 
-Des exemples type de codes source pour évaluer les capacité du compilateur PGI sont disponibles dans le répertoire /softs/pgi/common/EXAMPLES (des nouveaux exemples n'ont pas été fournis avec la version PGI 2015) : 
- 
-<code bash>  
-e5-2670comp3:~> ls -l /softs/pgi/common/EXAMPLES 
-dr-xr-xr-x 3 root root 4096 mars    2012 fftpde 
-dr-xr-xr-x 4 root root 4096 mars    2012 linpack 
-dr-xr-xr-x 2 root root 4096 mars    2012 matmul 
-dr-xr-xr-x 8 root root 4096 mars    2012 MPI 
--r--r--r-- 1 root root  659 mars    2012 README 
-</code> 
- 
-Pour tester ces benchmarks, il faut copier ces répertoires sur le compte utilisateur. 
- 
-Exemplifions ici l'utilisation du benchmark matmul (multiplication de deux matrices) : 
- 
-<code bash>  
-e5-2670comp3:~> ls -l /softs/pgi/common/EXAMPLES/matmul 
--r-xr-xr-x 1 root root   54 mars    2012 buildf77 
--r-xr-xr-x 1 root root   51 mars    2012 buildf77mp 
--r-xr-xr-x 1 root root   62 mars    2012 buildf90 
--r-xr-xr-x 1 root root   59 mars    2012 buildf90mp 
--r-xr-xr-x 1 root root   64 mars    2012 buildhpf 
--r--r--r-- 1 root root 2556 mars    2012 matmul.F 
--r--r--r-- 1 root root 6464 mars    2012 README 
-</code> 
- 
-Le code source Fortran est donné est contenu dans le fichier matmul.F, alors que les scripts build* contiennent la commande de compilation pour plusieurs modes (compilateurs pgf77, pgf90, pghpf avec ou sans auto-parallélisation/OpenMP). 
- 
-<code bash>  
-e5-2670comp3:~> cat /softs/pgi/common/EXAMPLES/matmul/buildf77 
-pgf77 -fast -Mconcur -Minfo matmul.F -o matmul_f77 -V 
-e5-2670comp3:~> cat /softs/pgi/common/EXAMPLES/matmul/buildf90 
-pgf90 -fast -Mconcur -Minfo -DPGF90 matmul.F -o matmul_f90 -V 
-e5-2670comp3:~> cat /softs/pgi/common/EXAMPLES/matmul/buildf90mp 
-pgf90 -fast -mp -Minfo -DPGF90 matmul.F -o matmul_f90mp -V 
-e5-2670comp3:~> cat /softs/pgi/common/EXAMPLES/matmul/buildf77mp 
-pgf77 -fast -mp -Minfo matmul.F -o matmul_f77mp -V 
-e5-2670comp3:~> cat /softs/pgi/common/EXAMPLES/matmul/buildhpf 
-pghpf -fast -Mautopar -Minfo -DPGF90  matmul.F -o matmul_hpf -V 
-</code> 
- 
-Le lancement de ces scripts génère les exécutables correspondants : matmul_f77, matmul_f77mp, matmul_f90, matmul_f90mp,matmul_hpf. 
- 
-Leur exécution peut alors être faite. Par défaut, on utilise un seul processeur. Le nombre de processeurs utilisés peut être modifié par : 
- 
-- pour l'auto-parallelisation (matmul_f77, matmul_f90) 
-<code bash>  
-setenv NCPUS 2 
-</code> 
- 
-- pour la parallelisation avec OpenMP (matmul_f77mp, matmul_f90mp) 
-<code bash>  
-setenv NCPUS 2 
-</code> 
- 
-- pour HPF : rajouter -pghpf -np 2 au moment de l'exécution. 
- 
-Voici le résultat de ces exécutions pour 1 et 2 processeurs : 
- 
-<code bash>  
-e5-2670comp3:~/Tests/tests_PGI/matmul> ./matmul_f77 
-   2.0000001E-03  0.0000000E+00  9.9999998E-03  9.9999998E-03 
- M =         200, N =         200, P =         200 
- MFLOPS =    7980.000     
- c(1,1) =    200.0000000000000      
-e5-2670comp3:~/Tests/tests_PGI/matmul> setenv NCPUS 2 
-e5-2670comp3:~/Tests/tests_PGI/matmul> ./matmul_f77 
-   4.0000002E-03  0.0000000E+00  2.0000000E-02  2.0000000E-02 
- M =         200, N =         200, P =         200 
- MFLOPS =    3990.000     
- c(1,1) =    200.0000000000000      
- 
-e5-2670comp3:~/Tests/tests_PGI/matmul> setenv NCPUS 1 
-e5-2670comp3:~/Tests/tests_PGI/matmul> ./matmul_f90 
-   2.0000001E-03    0.000000       9.9999998E-03   9.9999998E-03 
- M =          200 , N =          200 , P =          200 
- MFLOPS =     7980.000     
- c(1,1) =     200.0000000000000      
-e5-2670comp3:~/Tests/tests_PGI/matmul> setenv NCPUS 2 
-e5-2670comp3:~/Tests/tests_PGI/matmul> ./matmul_f90 
-   4.0000002E-03    0.000000       2.0000000E-02   2.0000000E-02 
- M =          200 , N =          200 , P =          200 
- MFLOPS =     3990.000     
- c(1,1) =     200.0000000000000      
- 
-e5-2670comp3:~/Tests/tests_PGI/matmul> setenv NCPUS 1 
-e5-2670comp3:~/Tests/tests_PGI/matmul> ./matmul_f77mp  
-   2.0000001E-03  0.0000000E+00  9.9999998E-03  9.9999998E-03 
- M =         200, N =         200, P =         200 
- MFLOPS =    7980.000     
- c(1,1) =    200.0000000000000      
-e5-2670comp3:~/Tests/tests_PGI/matmul> setenv OMP_NUM_THREADS 2 
-e5-2670comp3:~/Tests/tests_PGI/matmul> ./matmul_f77mp 
-   4.0000002E-03  0.0000000E+00  2.0000000E-02  2.0000000E-02 
- M =         200, N =         200, P =         200 
- MFLOPS =    3990.000     
- c(1,1) =    200.0000000000000      
- 
-e5-2670comp3:~/Tests/tests_PGI/matmul> setenv OMP_NUM_THREADS 1 
-e5-2670comp3:~/Tests/tests_PGI/matmul> ./matmul_f90mp 
-   2.0000001E-03    0.000000       9.9999998E-03   9.9999998E-03 
- M =          200 , N =          200 , P =          200 
- MFLOPS =     7980.000     
- c(1,1) =     200.0000000000000      
-e5-2670comp3:~/Tests/tests_PGI/matmul> setenv OMP_NUM_THREADS 2 
-e5-2670comp3:~/Tests/tests_PGI/matmul> ./matmul_f90mp 
-   2.0000001E-03    0.000000       9.9999998E-03   9.9999998E-03 
- M =          200 , N =          200 , P =          200 
- MFLOPS =     7980.000     
- c(1,1) =     200.0000000000000      
- 
-e5-2670comp3:~/Tests/tests_PGI/matmul> setenv NCPUS 1 
-e5-2670comp3:~/Tests/tests_PGI/matmul> setenv OMP_NUM_THREADS 1 
-e5-2670comp3:~/Tests/tests_PGI/matmul> ./matmul_hpf 
-   2.0000001E-03    0.000000       9.9999998E-03   9.9999998E-03 
- M =          200 , N =          200 , P =          200 
- MFLOPS =     7980.000     
- c(1,1) =     200.0000000000000      
-e5-2670comp3:~/Tests/tests_PGI/matmul> ./matmul_hpf -pghpf -np 2 
-   4.0000002E-03    0.000000       2.0000000E-02   2.0000000E-02 
- M =          200 , N =          200 , P =          200 
- MFLOPS =     3990.000     
- c(1,1) =     200.0000000000000        
-</code> 
documentation/tools/testspgi.1430286268.txt.gz · Dernière modification : 2020/08/25 15:58 (modification externe)