IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Fortran Discussion :

warnings lors de la compilation


Sujet :

Fortran

  1. #1
    Membre à l'essai
    Femme Profil pro
    Inscrit en
    Octobre 2011
    Messages
    56
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Tunisie

    Informations professionnelles :
    Secteur : Enseignement

    Informations forums :
    Inscription : Octobre 2011
    Messages : 56
    Points : 22
    Points
    22
    Par défaut warnings lors de la compilation
    Bonjour à tous,
    Je viens d'écrire mon programme avec code::blocks en utilisant Fortran comme language de programmation
    mon compilateur est: "GNU Fortran compiler".
    En compilant ,je me retrouve avec O errreurs, 13 warnings, y a-t-il quelq'uun qui pourra m'aider à s'en sortir?
    Dans ci-dessous le programme et le message d'erreur.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    Program MAIN
        use Mod_donnees
        use construction_matrice
     
        implicit none
        Integer :: i,j,l
        Real(8) :: dr,dz
        Real(8) :: somme
        Real(8) :: residu=0.0D0
        Real(8) :: euclid_norm=0.0D0
        Real(8),DIMENSION (m) :: r
        Real(8),DIMENSION (n) :: z
        Real(8),DIMENSION (1:n*m,1:n*m) :: A
        Real(8),DIMENSION (1:n*m,1:1) :: vect
        Real(8),ALLOCATABLE, DIMENSION (:,:) :: Ap
        Real(8),ALLOCATABLE, DIMENSION (:,:) :: vectb
        Real(8),ALLOCATABLE, DIMENSION (:,:) :: T
     
        ALLOCATE (Ap(n*m,n*m),vectb(n*m,1), T(n,m))
     
        !****construction du systéme*****************
        call maillage  ( dr,dz,r,z)
        call MATRICE (r,z,dr,dz,vect,A)
     
        !****impression dans un fichier**************
        open(10,file= 'r(j).dat')
        open(11,file= 'z(i).dat')
        open(12,file= 'A(i,j).dat')
        open(13,file= 'vect(j,1).dat')
        open(15,file= 'T(i,j).dat')
        !*****r(j)***********************************
        do j=1,m
            write(10,*) r(j)
        end do
     
        !*****z(i)***********************************
        do i=1,n
            write(11,*) z(i)
        end do
     
        !*****A(i,j)*********************************
        do i=1,n*m
            do j=1,n*m
     
            write(12,*) A(i,j)
            Ap(i,j)=A(i,j)
        end do
            write(12,*) '     '
            end do
     
        !****vect(j,1)*******************************
        do j=1,n*m
            write(13,*) vect(j,1)
            vectb(j,1)=vect(j,1)
            euclid_norm = euclid_norm + vectb(j,1)**2
        end do
            euclid_norm = sqrt(euclid_norm)
     
         !***application de gauss-j*******************
         CALL gaussj(Ap(1:n*m,1:n*m),vectb(1:n*m,1:1))
     
    	do i = 1,n*m
    		somme = 0.0D0
    		do j =1,n*m
    			somme = somme + A(i,j)*vectb(j,1)
    		end do
    		residu = residu+(vect(i,1)-somme)**2
    	end do
     
    	WRITE(*,*) "residu relatif = ", residu   !/euclid_norm
     
     
    	!*****résultats*******************************
    	do l=1,m*n
    j=(l-1)/n+1
    i=l-n*(j-1)
    T(i,j)=vectb(l,1)
    end do
    do i=1,n
    do j=1,m
    write (15,*) T(i,j)
    end do
    write(15,*) '    '
    end do
     
     
    OPEN(7,FILE='T.PLT')
    	WRITE(7,*)' TITLE = " T"'
    	WRITE(7,*)' VARIABLES = "z","r","T"'          ! ,"QX","QY"'
    	WRITE(7,*)' ZONE T=" ",','i=',n,',j=',m,',F=BLOCK'
    	WRITE(7,*) ((z(i),i=1,n),j=1,m)
    	WRITE(7,*) ((r(j),i=1,n),j=1,m)
    	WRITE(7,*) ((T(i,j),i=1,n),j=1,m)
     
    CLOSE(7)
     
    !******************************************************************
     
        ! Déallocations -------------------------------------------------
     
         DEALLOCATE ( Ap, vectb, T)
    END PROGRAM
    Message d'erreur:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|62|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 62 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|63|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 63 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|64|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 64 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|65|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 65 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|66|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 66 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|67|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 67 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|68|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 68 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|70|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 70 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|74|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 74 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|88|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 88 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|89|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 89 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|90|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 90 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|91|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 91 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|92|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 92 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|93|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 93 .1:|
    ||Warning: Nonconforming tab character  |
    |
    ||=== Build finished: 0 errors, 13 warnings (0 minutes, 0 seconds) ===|

  2. #2
    Membre régulier
    Profil pro
    Étudiant
    Inscrit en
    Septembre 2011
    Messages
    108
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Septembre 2011
    Messages : 108
    Points : 74
    Points
    74
    Par défaut
    serait-il possible de poster la routine maillage de ton domaine pour voir ce quelle fait !! Merci



    Citation Envoyé par manaiilhem Voir le message

    Message d'erreur:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|62|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 62 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|63|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 63 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|64|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 64 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|65|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 65 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|66|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 66 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|67|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 67 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|68|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 68 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|70|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 70 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|74|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 74 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|88|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 88 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|89|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 89 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|90|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 90 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|91|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 91 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|92|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 92 .1:|
    ||Warning: Nonconforming tab character  |
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|93|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 93 .1:|
    ||Warning: Nonconforming tab character  |
    |
    ||=== Build finished: 0 errors, 13 warnings (0 minutes, 0 seconds) ===|

  3. #3
    Membre régulier
    Profil pro
    Étudiant
    Inscrit en
    Septembre 2011
    Messages
    108
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Septembre 2011
    Messages : 108
    Points : 74
    Points
    74
    Par défaut
    donc si possible de nous illustrer ce que fait la routine maillage ( dr,dz,r,z) et matrice aussi .

    Merci

  4. #4
    Membre à l'essai
    Femme Profil pro
    Inscrit en
    Octobre 2011
    Messages
    56
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Tunisie

    Informations professionnelles :
    Secteur : Enseignement

    Informations forums :
    Inscription : Octobre 2011
    Messages : 56
    Points : 22
    Points
    22
    Par défaut
    Je pense que l'erreur n'est pas de la routine maillage ni de matrice parceque j'ai eu des résulats mais je voudrais corriger les warnings.

  5. #5
    Membre éclairé
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Janvier 2013
    Messages
    388
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : Conseil

    Informations forums :
    Inscription : Janvier 2013
    Messages : 388
    Points : 692
    Points
    692
    Par défaut les tabulations !
    Salut.

    C'est rien de grave.
    Sur la première ligne, par exemple :
    C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90|62|C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90 62 .1
    ||Warning: Nonconforming tab character |
    Tu trouves le chemin complet du fichier : "C:\Users\manaii\Desktop\projet2\MAIN_PROGRAM.f90".
    Le nombre 62, c'est la ligne où est levée l'erreur (ou le warning).
    Puis il y a une info sur le type d'erreur : Warning: "Nonconforming tab character".

    Tu peux le vérifier avec ton éditeur de texte (il doit sûrement avoir une option "afficher tous les caractères"), les seules lignes qui posent problèmes sont celles ayant des tabulations.

    Ton EDI interprète d'une manière particulière les tabulations.
    Pourquoi ? Je ne peux pas le dire avec les infos que tu donnes.
    La solution que je te propose est de remplacer les tabulations par des espaces.

  6. #6
    Modérateur

    Profil pro
    Inscrit en
    Août 2006
    Messages
    974
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations forums :
    Inscription : Août 2006
    Messages : 974
    Points : 1 346
    Points
    1 346
    Par défaut
    Les lignes 62, 63, etc. contiennent des tabulations et non des espaces physiques. Tu peux les détecter (même ici sur le forum) en essayant de sélectionner le début de la ligne 62. Compare avec la ligne 60. Le début de la ligne 62 contient un caractère de tabulation (ASCII 09) suivi immédiatement de "do...".

    Ce comportement est fréquent avec un éditeur configuré pour les langages C|C++. Quand tu utilise la touche TAB pour indenter du code, c'est un TAB physique qui est introduit, et non des espaces. Il y a souvent une option qui permet d'insérer des espaces plutôt qu'un TAB.

    Le résultat est que ton programme n'est pas tout à fait standard, mais ce n'est pas une violation très grave pouvant affecter le comportement du programme.

  7. #7
    Membre à l'essai
    Femme Profil pro
    Inscrit en
    Octobre 2011
    Messages
    56
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Tunisie

    Informations professionnelles :
    Secteur : Enseignement

    Informations forums :
    Inscription : Octobre 2011
    Messages : 56
    Points : 22
    Points
    22
    Par défaut
    Je vous remercie pour votre réponse.
    mais j'ai pas compris la notion du tabulation, et comment je pourrais résoudre ce probléme?

  8. #8
    Membre à l'essai
    Femme Profil pro
    Inscrit en
    Octobre 2011
    Messages
    56
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Tunisie

    Informations professionnelles :
    Secteur : Enseignement

    Informations forums :
    Inscription : Octobre 2011
    Messages : 56
    Points : 22
    Points
    22
    Par défaut
    Tu peux les détecter (même ici sur le forum) en essayant de sélectionner le début de la ligne 62. Compare avec la ligne 60. Le début de la ligne 62 contient un caractère de tabulation (ASCII 09) suivi immédiatement de "do...".
    J'ai essayé de suivre ce que t'as noté mais j'ai pas bien vu la différence.
    peux-tu m'explique s'il te plaît?
    Merci

  9. #9
    Modérateur

    Profil pro
    Inscrit en
    Août 2006
    Messages
    974
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations forums :
    Inscription : Août 2006
    Messages : 974
    Points : 1 346
    Points
    1 346
    Par défaut
    Si tu essaies de sélectionner les espaces au début de la ligne 60 avec la souris, tu devrais pouvoir sélectionner les espaces progressivement un par un.

    Si tu essaies la même chose à la ligne 62, tu verras que tu ne peux pas sélectionner les espaces un par un, c'est toutes les espaces ou rien. C'est qu'en fait, il n'y a qu'un caractère (TAB) produisant un déplacement de plusieurs espaces.

    Tu peux aussi déplacer le curseur dans l'éditeur. Si tu vas au début de la ligne 62 et que tu tentes par la flèche d'aller un espace à droite, le curseur devrait aller directement à la colonne 9, et non à la colonne 2.

    Comme a suggéré dardanos, tu peux aussi essayer d'afficher les caractères spéciaux ou de contrôle, ou ...

  10. #10
    Membre à l'essai
    Femme Profil pro
    Inscrit en
    Octobre 2011
    Messages
    56
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Tunisie

    Informations professionnelles :
    Secteur : Enseignement

    Informations forums :
    Inscription : Octobre 2011
    Messages : 56
    Points : 22
    Points
    22
    Par défaut
    Bonjour,
    Merci pour cette explication.
    J'ai corrigé les warnings.

Discussions similaires

  1. Réponses: 3
    Dernier message: 19/03/2009, 10h56
  2. warning lors de la compilation
    Par salseropom dans le forum C
    Réponses: 6
    Dernier message: 04/12/2006, 10h46
  3. JDBC warning lors de la compilation
    Par kichemans dans le forum JDBC
    Réponses: 5
    Dernier message: 27/12/2005, 15h40
  4. Warnings lors de la compilation
    Par polo54 dans le forum C
    Réponses: 5
    Dernier message: 07/02/2003, 09h12

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo