Can't compile the fire_emis with ifort

181 views
Skip to first unread message

Xin Zhang

unread,
Mar 6, 2022, 5:51:00 PM3/6/22
to wrf-chem-fire_emiss
Dear all,

I met a problem when using the ifort compiler to compile fire_emis.
I will appreciate it a lot if you have any advice.

./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

Best regards,
Xin

Xin Zhang

unread,
Mar 6, 2022, 5:57:52 PM3/6/22
to wrf-chem-fire_emiss, Xin Zhang
OK. Find the answer from the old question. Adding these to the Makefile solves:

ifeq ($(FC),ifort)
  FFLAGS += -fpe0 -ftrapuv
  CCFLAGS += -O2 -std=c99 -g #added by Elham
endif

I suppose it's better to update the file on the WRF-Chem website, in case anyone meets this issue again in the future.

Best,
Xin

Naser Mohammadzadeh

unread,
Oct 30, 2023, 9:33:43 AM10/30/23
to wrf-chem-fire_emiss, Xin Zhang
Thanks Zhang

You helped me with your solution.
Naser

Reply all
Reply to author
Forward
0 new messages