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
en:documentation:tutorials:build:fortran [2018/11/20 10:31] cicalugaen:documentation:tutorials:build:fortran [2023/12/12 12:59] (Version actuelle) – supprimée ltaulell
Ligne 1: Ligne 1:
-====== Compilation and execution of a program (Fortran) ====== 
  
-{{INLINETOC}} 
-===== Language Fortran 90, sequential code ===== 
- 
-The program [[documentation:examples:sommevecvecseq.f90|SommeVecVecSEQ.f90]] makes the sum of the two vectors A and B. The result is put in C. 
- 
-==== Compilation of a program :==== 
- 
-**Definition of the environment** :  
- 
-  * definition of the environment : 
-<code bash> 
-module avail  
-</code> 
- 
-<code bash> 
-module load GCC/7.2.0  
-</code> 
- 
-  * checking the compiler version 
-<code> 
-gfortran --version 
-GNU Fortran (GCC) 7.2.0 
-Copyright (C) 2017 Free Software Foundation, Inc.  
-</code> 
- 
-**Compilation** : 
- 
-<code> 
-gfortran -o SommeVecVecSEQ.exe SommeVecVecSEQ.f90  
-</code> 
- 
- 
-The binary file (executable) ''SommeVecVecSEQ.f90.exe'' has been generated. 
-====Exécution du programme :==== 
- 
-=== Running on the build server : === 
- 
-<code> 
-./SommeVecVecSEQ.exe 
-</code> 
- 
-The result is displayed on the screen : 
- 
-<code> 
-Les deux vecteurs : 
- 
-A =            1                                                                                9          10 
- 
-B =            9                                                                                1           0 
- 
-Le vecteur somme : 
- 
-C =           10          10          10          10          10          10          10          10         10          10 
-</code> 
- 
-=== Running on the cluster : === 
- 
- 
-We use a submission script [[http://www.ens-lyon.fr/PSMN/doku.php?id=en:documentation:tutorials:submit:jobsequentielbash|batch.sh]] to submit the job on compute clusters. 
- 
-It is the submission script that configures the environment and then calls your binary (with its options, if any) on the execution node. 
- 
-''SGE -> batch.csh -> binaire'' 
- 
-<code> 
-qsub batch.csh 
-Your job 335982 ("SommeVecVecSEQ") has been submitted 
-qstat 
- 
-job-ID  prior   name             user         state submit/start at     queue                  slots ja-task-ID  
------------------------------------------------------------------------------------------------------------------ 
- 335982 0.00000 SommeVecVecSEQ   ccalugar     qw    02/14/2018 10:37:46 
- 
-qstat 
- 
-job-ID  prior   name             user         state submit/start at     queue                  slots ja-task-ID  
------------------------------------------------------------------------------------------------------------------ 
- 335982 0.07300 SommeVecVecSEQ   ccalugar        02/14/2018 10:38:54  E5_test@c8220node145          
-</code> 
- 
-  * The output of the screen (standard output) is redirected to the file ''SommeVecVecSEQ.o335982'' 
-  * The error output (standard error) is redirected to the file ''SommeVecVecSEQ.e335982'' 
-   
-<code> 
-cat SommeVecVecSEQ.o335982 
- 
-Les deux vecteurs : 
-A =            1                                                                                          10 
-B =            9                                                                                           0 
-Le vecteur somme : 
-C =           10          10          10          10          10          10          10          10          10          10 
-</code>  
en/documentation/tutorials/build/fortran.1542709865.txt.gz · Dernière modification : 2020/08/25 15:58 (modification externe)