Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29234 Discussions

regarding intel compiler flag issue/ source code issue

shalaka
Beginner
1,527 Views

while compiling cfs_atmos_fcst.fd i am getting belowed error plz suggest correct flags according to amd machine with intel2020 compiler

i am using this makefile 

#### make with mpxlf_r (threading)
EXEC = cfs_atmos_fcst_crm
F77 = mpxlf
#
FINCS = -I/gpfs2/home/spcfs/para/lib/incmod/esmf_3_1_0rp2/
FINCM = -I/gpfs2/home/spcfs/para/lib/incmod/w3_d

ARCH = -qarch=pwr6 -qtune=pwr6 -qcache=auto
PGSZ = -bdatapsize:64K -bstackpsize:64K -btextpsize:4K

OPTS = -g -qsuffix=cpp=f -O3 -qrealsize=8 -qstrict -qxlf77=leadzero -qmaxmem=-1 -qnolm -qsmp=noauto -qnosave $(ARCH)
OPTS90 = -qsuffix=cpp=f -O3 -qrealsize=8 -qstrict -qxlf77=leadzero -qmaxmem=-1 -qnolm -qsmp=noauto -qnosave $(ARCH) -I/usr/lpp/ppe.poe/include/thread64
OPTS90A = -qsuffix=cpp=f -O3 -qrealsize=8 -qstrict -qxlf77=leadzero -qmaxmem=-1 -qnolm -qsmp=noauto -qnosave $(ARCH) -I/usr/lpp/ppe.poe/include/thread64
#TRAPS = -qinitauto=FF911299 -qflttrap=ov:zero:inv:en -qsigtrap
#DEBUG = -g -qfullpath -qcheck -qextchk

# For CRM to be compiled : Modify these few lines to take care about the CRM dimension : Phani and Bidyut
#crm # setting it makes super-parameterized code
#YES3D = 0 # 0 if 2D crm, 1 if 3D crm/superparameterization
crm_nx = 25 # number of columns in x
crm_ny = 1 # number of columns in y
crm_nz = 60 # number of crm levels should be at list 2 less than nlev
crm_dx = 5000. # crm horizontal grid resolution in meters
crm_dt = 10. # crm timestep in secs
#nlevs = $(crm_nz) # Number of levels

confstr = -WF,-DCRM_NX=$(crm_nx) -WF,-DCRM_NY=$(crm_ny) -WF,-DCRM_NZ=$(crm_nz) -WF,-DCRM_DX=$(crm_dx) -WF,-DCRM_DT=$(crm_dt) -WF,-DAIX -I.
#confstr = -WF,-DLEVS=$(nlevs)

# SPCFS : declaration of the GCM and CRM directory paths.
gcmdir=/gpfs2/home/spcfs/para/sorc/cfs/cfs_atmos_fcst.fd_phani_rad_NS
crmdir=/gpfs2/home/spcfs/para/sorc/cfs/crm_thread_rad_25
###########

#
FFLAG90 = $(OPTS90) $(FINCS) -qfree -NS2048
FFLAG90A = $(OPTS90A) $(FINCS) -qfree -NS2048
FFLAGS = $(OPTS) $(TRAPS) -qfixed
FFLAGX = $(OPTS) $(TRAPS) -qfixed
FFLAGIO = $(OPTS) $(TRAPS) -qfixed
FFLAGY = $(OPTS) -qfixed
FFLAGM = $(OPTS) $(FINCS) $(TRAPS) $(DEBUG) -NS2048 -qfixed
FFLAGM2 = $(OPTS) $(FINCS) $(FINCM) $(TRAPS) $(DEBUG) -NS2048 -qfixed
FFLAGSF = -O3 -qnosave -qfree=f90 -qcheck -I.
FFLAGSI = -qnosave -O3 -qfree=f90 -I.
FFLAGB = $(OPTS) -qnosave -O3 -qfixed -I.
FFLAGCRM = mpxlf90_r -O3 -qsmp=auto -I. $(confstr)
FFLAG90B = -g -qwarn64 -qfullpath $(confstr) $(OPTS90) -qstrict -NS2048
FFLAG90C = -g -qwarn64 -qfullpath $(confstr) $(OPTS90) -qstrict -NS2048
# FFLAG90B = -g -qwarn64 $(confstr) -qsuffix=cpp=f -O3 -qrealsize=8 -qstrict -qxlf77=leadzero -qmaxmem=-1 -qnolm -qsmp=noauto -qnosave $(ARCH) -NS2048 -qfixed -I/usr/lpp/ppe.poe/include/thread64
# FFLAG90C = -g -qwarn64 $(confstr) -qsuffix=cpp=f -O3 -qrealsize=8 -qstrict -qxlf77=leadzero -qmaxmem=-1 -qnolm -qsmp=noauto -qnosave $(ARCH) -NS2048 -I/usr/lpp/ppe.poe/include/thread64
FFLAG90D = -DCRM_NX=$(crm_nx) -DCRM_NY=$(crm_ny) -DCRM_NZ=$(crm_nz) -DCRM_DX=$(crm_dx) -DCRM_DT=$(crm_dt) -DPLEV=$(nlevs) -DAIX -O3


LDR = mpxlf95 -qsmp=noauto
ESMFLIB = /gpfs2/home/spcfs/para/lib
LDFLAGS = -lessl_r -lmass -lmassv -qsmp=noauto ${ESMFLIB}/libesmf_3_1_0rp2.a $(PGSZ)
LIBS = -lC -L /gpfs2/home/spcfs/para/lib -l w3_d -l bacio_4 -l sp_d

 


Error --
cfs_atmos_fcst.fd]$ ./makefile.sh-arka mpiifort -DCRM_NX=25 -DCRM_NY=1 -DCRM_NZ=60 -DCRM_DX=5000. -DCRM_DT=10. -DPLEV= -DAIX -O3 -I. -c /home/users/tanmoy/SPCFS/crm_rad_thread/gammafff.c ifort: warning #10145: no action performed for file '/home/users/tanmoy/SPCFS/crm_rad_thread/gammafff.c' mpiifort -g -warn interfaces -free -traceback -WF,-DCRM_NX=25 -WF,-DCRM_NY=1 -WF,-DCRM_NZ=60 -WF,-DCRM_DX=5000. -WF,-DCRM_DT=10. -WF,-DAIX -I. -cpp -O3 -r8 -fp-model strict -save -fno-alias -fno-common -march=core-avx2 -I/usr/lpp/ppe.poe/include/thread64 -fp-model strict -I. -c /home/users/tanmoy/SPCFS/crm_rad_thread/compress3D.f ifort: command line warning #10157: ignoring option '-W'; argument is of wrong type ifort: command line warning #10157: ignoring option '-W'; argument is of wrong type ifort: command line warning #10157: ignoring option '-W'; argument is of wrong type ifort: command line warning #10157: ignoring option '-W'; argument is of wrong type ifort: command line warning #10157: ignoring option '-W'; argument is of wrong type ifort: command line warning #10157: ignoring option '-W'; argument is of wrong type /home/users/tanmoy/SPCFS/crm_rad_thread/compress3D.f(94): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is an element of an array that is not assumed shape, pointer, or polymorphic. [BUFFER1] call task_max_real(f_max1,f_max,1) ----------^ /home/users/tanmoy/SPCFS/crm_rad_thread/compress3D.f(94): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is an element of an array that is not assumed shape, pointer, or polymorphic. [BUFFER2] call task_max_real(f_max1,f_max,1) ----------^ /home/users/tanmoy/SPCFS/crm_rad_thread/compress3D.f(95): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is an element of an array that is not assumed shape, pointer, or polymorphic. [BUFFER1] call task_min_real(f_min1,f_min,1) ----------^ /home/users/tanmoy/SPCFS/crm_rad_thread/compress3D.f(95): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is an element of an array that is not assumed shape, pointer, or polymorphic. [BUFFER2] call task_min_real(f_min1,f_min,1) ----------^ /home/users/tanmoy/SPCFS/crm_rad_thread/compress3D.f(145): error #6633: The type of the actual argument differs from the type of the dummy argument. [BYTE] call task_send_character(0,byte,int_fac*count,irank,req) -----------------------------------^ /home/users/tanmoy/SPCFS/crm_rad_thread/compress3D.f(149): error #6633: The type of the actual argument differs from the type of the dummy argument. [BYTE] call task_receive_character(byte,int_fac*count,req) ------------------------------------^ compilation aborted for /home/users/tanmoy/SPCFS/crm_rad_thread/compress3D.f (code 1) make: *** [Makefile_crm.arka:1063: compress3D.o] Error 1

0 Kudos
3 Replies
Ron_Green
Moderator
1,409 Views

-warn interfaces

look up that option here: https://www.intel.com/content/www/us/en/docs/fortran-compiler/developer-guide-reference/2025-2/warn.html

looks like a very old code doing some very bad things with argument passing.  If you remove that option the errors will go away for the compilation but you may get runtime errors because of bad code.

0 Kudos
shalaka
Beginner
649 Views

This code is from Prithvi HPC from 2011, which compiled and ran with IBM compiler.  Now I am compiling with intel-2020 compiler and facing these issues, so can you please suggest the compiler (oldest or fitted for code) to compile this source code?

This is a Makefile with intel 2020 which I am using -

EXEC = cfs_atmos_fcst_crm
F77 = mpiifort
F90 = mpiifort
CC = mpiicc

# Include Paths
FINCS = -I$(HOME)/libs/include/esmf_3_1_0rp2
FINCM = -I$(HOME)/libs/include/w3_d

# CRM dimensions
crm_nx = 25
crm_ny = 1
crm_nz = 60
crm_dx = 5000.
crm_dt = 10.

confstr = -DCRM_NX=$(crm_nx) -DCRM_NY=$(crm_ny) -DCRM_NZ=$(crm_nz) -DCRM_DX=$(crm_dx) -DCRM_DT=$(crm_dt) -DAIX -I.

# Compiler Flags (Intel)
ARCH = -march=core-avx2
OPTS = -O3 -fPIC -fp-model precise -qopenmp $(ARCH)
DEBUG = -g -traceback -check all -fstack-protector

gcmdir=/home/users/SPCFS/cfs_atmos_fcst.fd
crmdir=/home/users/SPCFS/crm_rad_thread

# Flags per use-case
FFLAG90 = $(OPTS) $(FINCS) -free -heap-arrays
FFLAG90A = $(OPTS) $(FINCS) -free -heap-arrays
FFLAGS = $(OPTS) -fixed
FFLAGX = $(OPTS) -fixed
FFLAGIO = $(OPTS) -fixed
FFLAGY = $(OPTS) -fixed
FFLAGM = $(OPTS) $(FINCS) $(DEBUG) -fixed
FFLAGM2 = $(OPTS) $(FINCS) $(FINCM) $(DEBUG) -fixed
FFLAGSF = $(OPTS) -free
FFLAGSI = $(OPTS) -free
FFLAGB = $(OPTS) -fixed
FFLAGCRM = $(F90) $(OPTS) -qopenmp -I. $(confstr)
FFLAG90B = $(OPTS) $(DEBUG) -free $(confstr)
FFLAG90C = $(OPTS) $(DEBUG) -free $(confstr)
FFLAG90D = -DCRM_NX=$(crm_nx) -DCRM_NY=$(crm_ny) -DCRM_NZ=$(crm_nz) -DCRM_DX=$(crm_dx) -DCRM_DT=$(crm_dt) -O3

# Linker
LDR = mpiifort
ESMFLIB = $(HOME)/libs
LDFLAGS = -L$(ESMFLIB) -lesmf_3_1_0rp2 -fopenmp
LIBS = -L$(ESMFLIB) -lw3_d -lbacio_4 -lsp_d -lm -ldl

.SUFFIXES: .o .f .F .f90 .c

0 Kudos
andrew_4619
Honored Contributor III
608 Views
Your code was developed it seems on an IBM compiler from twenty year back. What you need is a modern compiler that ignores the non conforming buggy code and makes whatever assumptions that the old IBM compiler did. Your options are a) fix the code b) find an old computer with an old Ibm compiler and stick with that for ever c) bin the code and find something else to do. These answers may seem a bit harsh but they are reality.
0 Kudos
Reply