错误
./make_fire_emis
=============================================================================
Using ifort fortran compiler
=============================================================================
=============================================================================
netcdf top level directory = /public/software/mathlib/netcdf/intel/4.6.1
=============================================================================
ifort -g -fpe0 -ftrapuv -c -I/public/software/mathlib/netcdf/intel/4.6.1/include attr_types.f90
ifort -g -fpe0 -ftrapuv -c -I/public/software/mathlib/netcdf/intel/4.6.1/include fire_types.f90
ifort -g -fpe0 -ftrapuv -c -I/public/software/mathlib/netcdf/intel/4.6.1/include netcdf_utils.f90
icc -c hires_timer.c
ifort -g -fpe0 -ftrapuv -c -I/public/software/mathlib/netcdf/intel/4.6.1/include module_timing.f90
ifort -g -fpe0 -ftrapuv -c -I/public/software/mathlib/netcdf/intel/4.6.1/include camse_utils.f90
icc -c PolyUtils.c
PolyUtils.c(49): error: expected an expression
for( int i = 1 ; i < nVtx ; i++ )
^
PolyUtils.c(49): error: identifier "i" is undefined
for( int i = 1 ; i < nVtx ; i++ )
^
PolyUtils.c(69): error: expected an expression
for(int i = 0; i < nVtx; i++)
^
PolyUtils.c(86): error: expected an expression
for( int i = 0 ; i < nVtx ; i++ )
^
PolyUtils.c(129): error: expected an expression
for(int i = 0; i < nVtx; i++)
^
PolyUtils.c(132): error: expected an expression
for(int i = 0; i < nXs; i++)
^
PolyUtils.c(139): error: expected an expression
for(int i = 0; i < nXs-1; i++)
^
PolyUtils.c(140): error: expected an expression
for(int j = i+1; j < nXs; j++)
^
PolyUtils.c(140): error: identifier "j" is undefined
for(int j = i+1; j < nXs; j++)
^
compilation aborted for PolyUtils.c (code 2)
make: *** [PolyUtils.o] Error 2
Failed to build fire_emis
解决办法
修改Makefile文件
ifeq ($(FC),ifort)
FFLAGS += -fpe0 -ftrapuv
CCFLAGS += -O2 -std=c99 -g
endif