Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
en:documentation:tutorials:build:fortran [2018/11/20 10:31] – cicaluga | en: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: | ||
- | |||
- | ==== Compilation of a program :==== | ||
- | |||
- | **Definition of the environment** : | ||
- | |||
- | * definition of the environment : | ||
- | <code bash> | ||
- | module avail | ||
- | </ | ||
- | |||
- | <code bash> | ||
- | module load GCC/ | ||
- | </ | ||
- | |||
- | * checking the compiler version | ||
- | < | ||
- | gfortran --version | ||
- | GNU Fortran (GCC) 7.2.0 | ||
- | Copyright (C) 2017 Free Software Foundation, Inc. | ||
- | </ | ||
- | |||
- | **Compilation** : | ||
- | |||
- | < | ||
- | gfortran -o SommeVecVecSEQ.exe SommeVecVecSEQ.f90 | ||
- | </ | ||
- | |||
- | |||
- | The binary file (executable) '' | ||
- | ====Exécution du programme :==== | ||
- | |||
- | === Running on the build server : === | ||
- | |||
- | < | ||
- | ./ | ||
- | </ | ||
- | |||
- | The result is displayed on the screen : | ||
- | |||
- | < | ||
- | Les deux vecteurs : | ||
- | |||
- | A = 1 | ||
- | |||
- | B = 9 | ||
- | |||
- | Le vecteur somme : | ||
- | |||
- | C = | ||
- | </ | ||
- | |||
- | === Running on the cluster : === | ||
- | |||
- | |||
- | We use a submission script [[http:// | ||
- | |||
- | It is the submission script that configures the environment and then calls your binary (with its options, if any) on the execution node. | ||
- | |||
- | '' | ||
- | |||
- | < | ||
- | qsub batch.csh | ||
- | Your job 335982 (" | ||
- | qstat | ||
- | |||
- | job-ID | ||
- | ----------------------------------------------------------------------------------------------------------------- | ||
- | | ||
- | |||
- | qstat | ||
- | |||
- | job-ID | ||
- | ----------------------------------------------------------------------------------------------------------------- | ||
- | | ||
- | </ | ||
- | |||
- | * The output of the screen (standard output) is redirected to the file '' | ||
- | * The error output (standard error) is redirected to the file '' | ||
- | | ||
- | < | ||
- | cat SommeVecVecSEQ.o335982 | ||
- | |||
- | Les deux vecteurs : | ||
- | A = 1 | ||
- | B = 9 | ||
- | Le vecteur somme : | ||
- | C = | ||
- | </ |