主题:[讨论]求助:Intel Forran12编译Bernese LIB和INC报错
问题解决了,我在我在项目右键-属性-Fortran-Processor-preprocessor definition里边加了一个DIM_LARGE, 貌似成功了.
我用的Intel fortran12编译Bernese的Lib和INC,我新建了一个静态链接库Lib工程,然后我把所有f文件和f90文件(1100个)、inc文件都放到Lib工程下,一起编译,编译之前,我改了两个地方:
一、首先,在Properties-Fortran-Diagnostics-Check Routine interface选为NO;
二、把项目属性->Fortran->Preprocessor->Preprocessor Source file选项选择yes。
然后开始编译,一共有7个module文件,编译出来7个.mod文件(mod文件编译出来了,看到了),供其它f文件调用,但是报错如下:
error #6580: Name in only-list does not exist. [MAXPAR]
源代码如下:
1、module的定义:
MODULE p_addold
#ifdef DIM_SMALL
PARAMETER (MAXAMB= 20,MAXFRQ= 2,MAXFIL= 200,MAXSTA= 100, &
MAXARC= 3,MAXPAR= 300,MAXAMP= 200,MAXLOC= 300, &
MAXCMP= 6,MAXTRM= 200,MAXTRP= 10,MAXSNG= 150, &
MAXLCQ= 7,MAXFRS= 5,MAXWGT= 20,MAXPOL= 200, &
MAXSTP= 30,MAXOFF= 24,MAXHIL= 250,MAXPOT= 20, &
MAXALB= 10,MAXNEQ= 50,MAXTYP= 25,MAXAPR= 50, &
MAXORB= 30,MAXDYN= 9,MAXCOE=1000,MAXSTD= 3, &
MAXBAD= 30,MAXBSL= 300,MAXVAR= 15,MAXMEA= 3, &
MAXLIN= 30)
#endif
#ifdef DIM_MEDIUM
PARAMETER (MAXAMB= 20,MAXFRQ= 2,MAXFIL= 200,MAXSTA= 200, &
MAXARC= 10,MAXPAR=1200,MAXAMP= 700,MAXLOC=1200, &
MAXCMP= 6,MAXTRM= 800,MAXTRP= 100,MAXSNG= 150, &
MAXLCQ= 7,MAXFRS= 5,MAXWGT= 20,MAXPOL=1300, &
MAXSTP= 30,MAXOFF= 24,MAXHIL= 250,MAXPOT= 20, &
MAXALB= 10,MAXNEQ= 200,MAXTYP= 25,MAXAPR= 100, &
MAXORB= 30,MAXDYN= 10,MAXCOE=5000,MAXSTD= 10, &
MAXBAD= 30,MAXBSL= 300,MAXVAR= 15,MAXMEA= 3, &
MAXLIN= 50)
#endif
#ifdef DIM_LARGE
PARAMETER (MAXAMB= 20,MAXFRQ= 2,MAXFIL=2520,MAXSTA= 250, &
MAXARC= 10,MAXPAR=5000,MAXAMP=1250,MAXLOC=5000, &
MAXCMP= 6,MAXTRM=1200,MAXTRP= 100,MAXSNG= 150, &
MAXLCQ= 7,MAXFRS= 5,MAXWGT= 20,MAXPOL=1800, &
MAXSTP= 30,MAXOFF= 27,MAXHIL= 250,MAXPOT= 20, &
MAXALB= 10,MAXNEQ= 15,MAXTYP= 25,MAXAPR= 500, &
MAXORB= 30,MAXDYN= 12,MAXCOE=5000,MAXSTD= 10, &
MAXBAD= 100,MAXBSL= 300,MAXVAR= 15,MAXMEA= 3, &
MAXLIN= 200)
#endif
!
! MAXSAT: MAXIMUM NUMBER OF SATELLITES
! MAXSAC: MAXIMUM NUMBER OF SATELLITE CLOCK PARAMETERS
! MAXAMB: MAXIMUM NUMBER OF AMBIGUITIES FOR ONE SATELLITE IN A FILE
! MAXFRQ: MAXIMUM NUMBER OF DIFFERENT FREQ. TO BE PROCESSED PER FILE
! MAXFIL: MAXIMUM NUMBER OF FILES TO BE PROCESSED
! MAXSTA: MAXIMUM NUMBER OF STATIONS INVOLVED
! MAXARC: MAXIMUM NUMBER OF SATELLITE ARCS
! MAXPAR: MAXIMUM NUMBER OF PARAMETERS SIMULTANEOUSLY PROCESSED
! MAXAMP: MAXIMUM NUMBER OF AMBIGUITY PARAMETERS SIMULTAN. PROCESSED AND
! MAXIMUM NUMBER OF PARAMETERS TO BE PRE-ELIMINATED IN ONE STEP
! MAXLOC: MAXIMUM NUMBER OF PARAMETERS TO BE PROCESSED
! MAXCMP: MAXIMUM NUMBER OF CAMPAIGNS TO BE PROCESSED
! MAXTRM: MAXIMUM NUMBER OF TROPOSPHERE MODELS
! MAXTRP: MAXIMUM NUMBER OF TROPOSPHERE PARAMETERS PER MODEL
! MAXSNG: MAXIMUM NUMBER OF NON-ZERO ELEMENTS IN ONE LINE OF FIRST DE-
! SIGN MATRIX
! MAXFLS: MAXIMUM NUMBER OF FILES IN A SESSION
! MAXSAS: MAXIMUM NUMBER OF SATELLITES AT ONE EPOCH
! MAXEQN=MAXFLS*MAXSAS
! MAXLCQ: MAXIMUM NUMBER OF ITEMS PER PARAMETER IN ARRAY "LOCQ"
! MAXFRS: MAXIMUM NUMBER OF DIFFERENT FREQUENCIES ALLOWED
! MAXWGT: MAXIMUM NUMBER OF SATELLITE SPECIFIC WEIGHT INTERVALS
! MAXPOL: MAXIMUM NUMBER OF EARTH ROTATION PARAMETER SETS
! MAXSTC: MAXIMUM NUMBER OF STOCHASTIC EPOCHS PER ARC
! MAXSTP: MAXIMUM NUMBER OF STOCHASTIC SPECIAL REQUESTS
! MAXOFF: MAXIMUM NUMBER OF SATELLITE ANTENNA OFFSET GROUPS
! MAXNEQ: MAXIMUM NUMBER OF NORMAL EQUATION FILES
! MAXTYP: MAXIMUM NUMBER OF PARAMETER TYPES
! MAXAPR: MAXIMUM OF APRIORI POLE INFORMATIN
! MAXORB: MAXIMUM NUMBER OF FILES CONTAINING STOCH. ORBIT INFO
! MAXDYN: MAXIMUM NUMBER OF DYNAMIC PARAMETER
! MAXCOE: MAXIMUM NUMBER OF NON-ZERO ELEMENTS IN ARRAYS COETRA, INDCOE.
! MAXCOE = 6*3*(#FILES)*(#SATS)
! MAXSTD: MAXIMUM NUMBER OF DIFFERENT A PRIORI ARCS
! MAXBAD: MAXIMUM NUMBER OF ENTRIES IN STATION PROBLEM FILE
! MAXBSL: MAXIMUM NUMBER OF BASELINES
! MAXVAR: MAXIMUM NUMBER OF DYNAMICAL PARAMETERS
! MAXMEA: MAXIMUM NUMBER OF OBSERVATION TYPE (CODE,PHASE,RANGE)
!
END MODULE p_addold
2、f调用mod:
USE p_addold, ONLY: MAXPAR,MAXLIN
IMPLICIT REAL*8 (A-H,O-Z)
C
C MAXLIN : MAXIMUM NUMBER OF NON-ZERO ELEMENTS PER COL OF MATRIX COETRA
C MAXPAR : MAXIMUM NUMBER OF PARAMETERS
INTEGER*4 INDCOE(2,*)
REAL*8 ANOR(*),BNOR(*),COETRA(*)
REAL*8 ANEW(*),BNEW(*)
INTEGER*4 NLPCOL(MAXPAR),IDXCOE(2,MAXLIN,MAXPAR)