PDA

Afficher la version complète : [Réglé] Différence pgf90 - ifort -gfortran



berny
04/01/2011, 13h14
Bonjour à tous,

J'ai malheureusement un problème de compilateur et j'ai besoin de votre aide.

J'ai reçu un programme fortran d'un collègue scientifique pour localiser la glace de mer. Il me dit que cela fonctionne avec pgf90. Je n'ai pas ce compilateur... J'essaie donc de le compiler avec ifort ou gfortran mais de nombreuses erreurs s'impriment dans la console. :-(
Voici la liste des erreurs avec ifort:

fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 318: Syntax error, found ',' when expecting one of: => = . ( : %
print7,"IN ",infile," OUT ",outfile
---------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 63: The initialization shall not appear for this object name. [NX]
integer :: nx=304 ! 25 km resolution sea ice data
-------------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 64: The initialization shall not appear for this object name. [NY]
integer :: ny=448 ! 25 km resolution sea ice data
-------------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 318: This format specifier must be of type INTEGER. [PRINT7]
print7,"IN ",infile," OUT ",outfile
---------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 69: An automatic object is invalid in a main program. [DATA]
integer*2 data(nx*ny)
-------------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 63: A specification expression object must be a dummy argument, a COMMON block object, or an object accessible through host or use association [NX]
integer :: nx=304 ! 25 km resolution sea ice data
-------------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 64: A specification expression object must be a dummy argument, a COMMON block object, or an object accessible through host or use association [NY]
integer :: ny=448 ! 25 km resolution sea ice data
-------------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 89: An automatic object is invalid in a main program. [SLAB]
real, dimension(nx,ny) :: slab,slab2,slab3,slabt,slabt2,slabt3 ! The 2-d array holding the data
---------------------------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 89: An automatic object is invalid in a main program. [SLAB2]
real, dimension(nx,ny) :: slab,slab2,slab3,slabt,slabt2,slabt3 ! The 2-d array holding the data
--------------------------------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 89: An automatic object is invalid in a main program. [SLAB3]
real, dimension(nx,ny) :: slab,slab2,slab3,slabt,slabt2,slabt3 ! The 2-d array holding the data
--------------------------------------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 89: An automatic object is invalid in a main program. [SLABT]
real, dimension(nx,ny) :: slab,slab2,slab3,slabt,slabt2,slabt3 ! The 2-d array holding the data
--------------------------------------------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 89: An automatic object is invalid in a main program. [SLABT2]
real, dimension(nx,ny) :: slab,slab2,slab3,slabt,slabt2,slabt3 ! The 2-d array holding the data
--------------------------------------------------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 89: An automatic object is invalid in a main program. [SLABT3]
real, dimension(nx,ny) :: slab,slab2,slab3,slabt,slabt2,slabt3 ! The 2-d array holding the data
---------------------------------------------------------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 90: An automatic object is invalid in a main program. [SLABS]
real, dimension(nx,ny) :: slabs,slaba,slabs2,slaba2,slabs3,slaba3 ! The 2-d array holding snow on sea ice and sea ice albedo
---------------------------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 90: An automatic object is invalid in a main program. [SLABA]
real, dimension(nx,ny) :: slabs,slaba,slabs2,slaba2,slabs3,slaba3 ! The 2-d array holding snow on sea ice and sea ice albedo
---------------------------------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 90: An automatic object is invalid in a main program. [SLABS2]
real, dimension(nx,ny) :: slabs,slaba,slabs2,slaba2,slabs3,slaba3 ! The 2-d array holding snow on sea ice and sea ice albedo
---------------------------------------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 90: An automatic object is invalid in a main program. [SLABA2]
real, dimension(nx,ny) :: slabs,slaba,slabs2,slaba2,slabs3,slaba3 ! The 2-d array holding snow on sea ice and sea ice albedo
----------------------------------------------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 90: An automatic object is invalid in a main program. [SLABS3]
real, dimension(nx,ny) :: slabs,slaba,slabs2,slaba2,slabs3,slaba3 ! The 2-d array holding snow on sea ice and sea ice albedo
-----------------------------------------------------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 90: An automatic object is invalid in a main program. [SLABA3]
real, dimension(nx,ny) :: slabs,slaba,slabs2,slaba2,slabs3,slaba3 ! The 2-d array holding snow on sea ice and sea ice albedo
------------------------------------------------------------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 117: An automatic object is invalid in a main program. [LATW]
real, dimension(nx,ny) :: latw,lonw
---------------------------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 117: An automatic object is invalid in a main program. [LONW]
real, dimension(nx,ny) :: latw,lonw
--------------------------------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 118: An automatic object is invalid in a main program. [LATA]
real, dimension(nx,ny) :: lata,lona
---------------------------------^
fortcom: Error: seaice-thicknes_write.NH.25km.F90, line 118: An automatic object is invalid in a main program. [LONA]
real, dimension(nx,ny) :: lata,lona
--------------------------------------^
compilation aborted for seaice-thicknes_write.NH.25km.F90 (code 1)
Apparemment, ce programme ne fonctionne qu'avec pgf90. Ca m'embête un peu (beaucoup même). Que faire? Corriger les erreurs? Connaissez-vous les grandes différences entre le compilateur pgf90 et les autres (ifort ou gfortran) ?

Merci d'avance de votre aide!

Berny

Silfax
04/01/2011, 14h26
Salut,

Le plus simple serait certainement de télécharger pgf90 .. Une version "trial" est dispo sur leur site ..