# Compile error in icon

**URL:** <https://forum.cmascenter.org/t/compile-error-in-icon/4852>\
**Category:** CMAQ\
**Tags:** cmaq\
**Created:** [April 10, 2024, 12:23pm UTC](https://forum.cmascenter.org/t/compile-error-in-icon/4852 "2024-04-10T12:23:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sunchanglei](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/sunchanglei/32/4358_2.png) [@Sunchanglei](https://forum.cmascenter.org/u/Sunchanglei)\
**Post date:** [April 10, 2024, 12:23pm UTC](https://forum.cmascenter.org/t/compile-error-in-icon/4852/1 "2024-04-10T12:23:35Z")

</div>

Hello everyone, I’m trying to compile CMAQ-5.2. But error occurs while compiling the ICON process. So i need your help！Thanks!  
Compiler is set to intel  
set ICON\_SRC = /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src  
setenv REPOROOT /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src  
set Mechs = /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src/MECHS  
set VRSN = v52  
set INPT = profile  
set EXEC = ICON\_v52\_profile.exe  
set CFG = ICON\_v52\_profile.cfg  
set CompileBLDMAKE  
set CopySrc  
set ModCommon = common  
set ModType = profile  
set ModMech = prof\_data/cb05\_ae6\_aq  
set Mechanism = cb05e51\_ae6\_aq/  
set Tracer = trac0  
set FC = mpiifort  
set FP = mpiifort  
setenv BLDER /disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe  
set xLib\_Base = /opt/ifort  
set xLib\_1 = ioapi31/Linux2\_x86\_64ifort  
set xLib\_2 = ioapi31/ioapi/fixed\_src  
set xLib\_4 = ioapi31/Linux2\_x86\_64ifort  
set FSTD = -O3 -fno-alias -mp1 -fp-model source  
set DBG = -O0 -g -check bounds -check uninit -fpe0 -fno-alias -ftrapuv -traceback  
set F\_FLAGS = -fixed -132  
set F90\_FLAGS = -free  
set CPP\_FLAGS =  
set LINK\_FLAGS =  
set LIB1 = -lioapi  
set LIB2 = -lnetcdf  
if ( ! -e /disk1/scl/CMAQ/CMAQ-5.2 || ! -e /opt/ifort ) then  
echo Model repository base path: /disk1/scl/CMAQ/CMAQ-5.2  
Model repository base path: /disk1/scl/CMAQ/CMAQ-5.2  
echo library path: /opt/ifort  
library path: /opt/ifort  
if ( 0 ) then  
set BLD\_OS = `uname -s`  
uname -s  
if ( Linux != Linux ) then  
set Bld = /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/scripts/BLD\_ICON\_v52\_profile\_intel  
if ( ! -e /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/scripts/BLD\_ICON\_v52\_profile\_intel ) then  
mkdir /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/scripts/BLD\_ICON\_v52\_profile\_intel  
else  
cd /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/scripts/BLD\_ICON\_v52\_profile\_intel  
if ( 1 ) then  
/bin/cp -fp /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src/MECHS/cb05e51\_ae6\_aq//AE\_cb05e51\_ae6\_aq.nml /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src/MECHS/cb05e51\_ae6\_aq//GC\_cb05e51\_ae6\_aq.nml /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src/MECHS/cb05e51\_ae6\_aq//NR\_cb05e51\_ae6\_aq.nml /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/scripts/BLD\_ICON\_v52\_profile\_intel  
/bin/cp -fp /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src/MECHS/trac0/Species\_Table\_TR\_0.nml /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/scripts/BLD\_ICON\_v52\_profile\_intel  
else  
set Cfile = ICON\_v52\_profile.cfg.bld  
set quote = "  
echo  
echo model ICON\_v52\_profile.exe;  
echo  
echo repo /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src;  
echo  
echo mechanism cb05e51\_ae6\_aq/;  
echo  
echo lib\_base /opt/ifort;  
echo  
echo lib\_1 ioapi31/Linux2\_x86\_64ifort;  
echo  
echo lib\_2 ioapi31/ioapi/fixed\_src;  
echo  
echo lib\_4 ioapi31/Linux2\_x86\_64ifort;  
echo  
set text = “”;  
echo cpp\_flags “”;  
echo  
echo f\_compiler mpiifort;  
echo  
echo fstd “-O3 -fno-alias -mp1 -fp-model source”;  
echo  
echo dbg “-O0 -g -check bounds -check uninit -fpe0 -fno-alias -ftrapuv -traceback”;  
echo  
echo f\_flags “-fixed -132”;  
echo  
echo f90\_flags “-free”;  
echo  
echo link\_flags “”;  
echo  
echo ioapi “-lioapi”;  
echo  
echo netcdf "-lnetcdf ";  
echo

set text=// mechanism:  
echo // mechanism: cb05e51\_ae6\_aq/  
echo // project repository: /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src  
echo  
set text = common  
echo // required common  
echo Module common;  
echo  
set text = profile, m3conc, tracer  
echo // options are profile, m3conc, tracer  
echo Module profile;  
echo  
set text = cb05, saprc99, saprc07t  
echo // options are cb05, saprc99, saprc07t  
echo Module prof\_data/cb05\_ae6\_aq;  
echo  
if ( 0 ) then  
unalias mv rm  
if ( 1 || ! -f /disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe ) then  
cd /disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/scripts  
./bldit\_bldmake.csh  
rm: No match.  
mpiifort: Command not found.  
mpiifort: Command not found.  
mpiifort: Command not found.  
mpiifort: Command not found.  
mpiifort: No match.

_ **ERROR** _ BLDMAKE Compile failed

endif  
set Blder = /disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe -serial -verbose  
cd /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/scripts/BLD\_ICON\_v52\_profile\_intel  
if ( 0 ) then  
if ( 1 ) then  
/disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe -serial -verbose ICON\_v52\_profile.cfg.bld  
/disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe: Command not found.  
else  
endif  
mv Makefile Makefile.intel  
mv: cannot stat `Makefile’: No such file or directory  
if ( 1 != 0 ) then  
echo \*\*\* failure in /disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe -serial -verbose \*\*\*  
\*\*\* failure in /disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe -serial -verbose \*\*\*  
exit 1

---

<div class="post-metadata">

**Author:** ![Ryan](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@Ryan](https://forum.cmascenter.org/u/Ryan)\
**Post date:** [April 11, 2024, 6:40pm UTC](https://forum.cmascenter.org/t/compile-error-in-icon/4852/3 "2024-04-11T18:40:57Z")

</div>

> [@Sunchanglei](#):
>
> mpiifort: Command not found.  
> mpiifort: Command not found.  
> mpiifort: Command not found.  
> mpiifort: Command not found.  
> mpiifort: No match.

You can run command “which mpiifort” to check if mpiifort is available in your workstation. From the error message, it indicates that mpiifort is not available in your system.

---

<div class="post-metadata">

**Author:** ![lizadams](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@lizadams](https://forum.cmascenter.org/u/lizadams)\
**Post date:** [April 12, 2024, 5:30pm UTC](https://forum.cmascenter.org/t/compile-error-in-icon/4852/4 "2024-04-12T17:30:33Z")

</div>

Your system may be using mpifort rather than mpiifort. Please verify the command, and then edit the script to use the correct one.

---

<div class="post-metadata">

**Author:** ![Sunchanglei](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/sunchanglei/32/4358_2.png) [@Sunchanglei](https://forum.cmascenter.org/u/Sunchanglei)\
**Post date:** [April 15, 2024, 7:17am UTC](https://forum.cmascenter.org/t/compile-error-in-icon/4852/5 "2024-04-15T07:17:52Z")

</div>

Thank you. I just confirmed that there is mpifort in our server, but there is no mpiifort. I want to install CMAQ using an intel compiler. Do I need to download Intel mpi? Or how to solve it? Looking forward to your reply!

---

<div class="post-metadata">

**Author:** ![Sunchanglei](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/sunchanglei/32/4358_2.png) [@Sunchanglei](https://forum.cmascenter.org/u/Sunchanglei)\
**Post date:** [April 18, 2024, 12:22pm UTC](https://forum.cmascenter.org/t/compile-error-in-icon/4852/6 "2024-04-18T12:22:33Z")

</div>

Hello, teachers. I have solved the problem with mpiifort, but it still doesn’t compile. Can you tell me what are the reasons for the following questions?

Compiler is set to intel  
set ICON\_SRC = /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src  
setenv REPOROOT /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src  
set Mechs = /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src/MECHS  
set VRSN = v52  
set INPT = profile  
set EXEC = ICON\_v52\_profile.exe  
set CFG = ICON\_v52\_profile.cfg  
set CompileBLDMAKE  
set CopySrc  
set ModCommon = common  
set ModType = profile  
set ModMech = prof\_data/cb05\_ae6\_aq  
set Mechanism = cb05e51\_ae6\_aq/  
set Tracer = trac0  
set FC = mpiifort  
set FP = mpiifort  
setenv BLDER /disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe  
set xLib\_Base = /disk1/scl/CMAQ/CMAQ-5.2/lib  
set xLib\_1 = ioapi/Linux2\_x86\_64ifort  
set xLib\_2 = ioapi/ioapi/fixed\_src  
set xLib\_4 = ioapi/Linux2\_x86\_64ifort  
set FSTD = -O3 -fno-alias -mp1 -fp-model source  
set DBG = -O0 -g -check bounds -check uninit -fpe0 -fno-alias -ftrapuv -traceback  
set F\_FLAGS = -fixed -132  
set F90\_FLAGS = -free  
set CPP\_FLAGS =  
set LINK\_FLAGS =  
set LIB1 = -lioapi  
set LIB2 = -lnetcdff -lnetcdf  
if ( ! -e /disk1/scl/CMAQ/CMAQ-5.2 || ! -e /disk1/scl/CMAQ/CMAQ-5.2/lib ) then  
echo Model repository base path: /disk1/scl/CMAQ/CMAQ-5.2  
Model repository base path: /disk1/scl/CMAQ/CMAQ-5.2  
echo library path: /disk1/scl/CMAQ/CMAQ-5.2/lib  
library path: /disk1/scl/CMAQ/CMAQ-5.2/lib  
if ( 0 ) then  
set BLD\_OS = `uname -s`  
uname -s  
if ( Linux != Linux ) then  
set Bld = /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/scripts/BLD\_ICON\_v52\_profile\_intel  
if ( ! -e /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/scripts/BLD\_ICON\_v52\_profile\_intel ) then  
if ( ! -d /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/scripts/BLD\_ICON\_v52\_profile\_intel ) then  
endif  
cd /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/scripts/BLD\_ICON\_v52\_profile\_intel  
if ( 1 ) then  
/bin/cp -fp /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src/MECHS/cb05e51\_ae6\_aq//AE\_cb05e51\_ae6\_aq.nml /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src/MECHS/cb05e51\_ae6\_aq//GC\_cb05e51\_ae6\_aq.nml /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src/MECHS/cb05e51\_ae6\_aq//NR\_cb05e51\_ae6\_aq.nml /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/scripts/BLD\_ICON\_v52\_profile\_intel  
/bin/cp -fp /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src/MECHS/trac0/Species\_Table\_TR\_0.nml /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/scripts/BLD\_ICON\_v52\_profile\_intel  
else  
set Cfile = ICON\_v52\_profile.cfg.bld  
set quote = "  
echo  
echo model ICON\_v52\_profile.exe;  
echo  
echo repo /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src;  
echo  
echo mechanism cb05e51\_ae6\_aq/;  
echo  
echo lib\_base /disk1/scl/CMAQ/CMAQ-5.2/lib;  
echo  
echo lib\_1 ioapi/Linux2\_x86\_64ifort;  
echo  
echo lib\_2 ioapi/ioapi/fixed\_src;  
echo  
echo lib\_4 ioapi/Linux2\_x86\_64ifort;  
echo  
set text = “”;  
echo cpp\_flags “”;  
echo  
echo f\_compiler mpiifort;  
echo  
echo fstd “-O3 -fno-alias -mp1 -fp-model source”;  
echo  
echo dbg “-O0 -g -check bounds -check uninit -fpe0 -fno-alias -ftrapuv -traceback”;  
echo  
echo f\_flags “-fixed -132”;  
echo  
echo f90\_flags “-free”;  
echo  
echo link\_flags “”;  
echo  
echo ioapi “-lioapi”;  
echo  
echo netcdf "-lnetcdff -lnetcdf ";  
echo

set text=// mechanism:  
echo // mechanism: cb05e51\_ae6\_aq/  
echo // project repository: /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src  
echo  
set text = common  
echo // required common  
echo Module common;  
echo  
set text = profile, m3conc, tracer  
echo // options are profile, m3conc, tracer  
echo Module profile;  
echo  
set text = cb05, saprc99, saprc07t  
echo // options are cb05, saprc99, saprc07t  
echo Module prof\_data/cb05\_ae6\_aq;  
echo  
if ( 0 ) then  
unalias mv rm  
if ( 1 || ! -f /disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe ) then  
cd /disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/scripts  
./bldit\_bldmake.csh  
endif  
set Blder = /disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe -serial -verbose  
cd /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/scripts/BLD\_ICON\_v52\_profile\_intel  
if ( 0 ) then  
if ( 1 ) then  
/disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe -serial -verbose ICON\_v52\_profile.cfg.bld  
REPOROOT set to:/disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src

Model set to ICON\_v52\_profile.exe  
Repository set to /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src  
Mechanism set to cb05e51\_ae6\_aq/  
LIB\_BASE set to /disk1/scl/CMAQ/CMAQ-5.2/lib  
LIB\_1 set to ioapi/Linux2\_x86\_64ifort  
LIB\_2 set to ioapi/ioapi/fixed\_src  
LIB\_4 set to ioapi/Linux2\_x86\_64ifort  
CPP\_FLAGS set to  
F\_COMPILER set to mpiifort  
FSTD set to -O3 -fno-alias -mp1 -fp-model source  
DBG set to -O0 -g -check bounds -check uninit -fpe0 -fno-alias -ftrapuv -traceback  
f\_flags set to -fixed -132  
f90\_flags set to -free  
LINK\_FLAGS set to  
IOAPI set to -lioapi  
NETCDF set to -lnetcdff -lnetcdf

Building file list for module common  
file /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src/common/CGRID\_SPCS.F added to make list  
file /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src/common/findex.F added to make list  
file /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src/common/gc\_spc\_map.F added to make list  
file /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src/common/get\_envlist.f added to make list  
file /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src/common/HGRD\_DEFN.F added to make list  
file /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src/common/icon.F added to make list  
file /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src/common/IC\_PARMS.F added to make list  
file /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src/common/lat\_lon.F added to make list  
file /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src/common/lr\_interp.F added to make list  
file /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src/common/lst\_spc\_map.F added to make list  
file /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src/common/ngc\_spc\_map.F added to make list  
file /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src/common/opn\_ic\_file.F added to make list  
file /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src/common/setup\_logdev.F added to make list  
file /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src/common/subhdomain.F added to make list  
file /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src/common/UTILIO\_DEFN.F added to make list  
file /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src/common/VGRD\_DEFN.F added to make list

Building file list for module profile  
file /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src/profile/prof\_driver.F added to make list  
file /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src/profile/prof\_icout.F added to make list  
file /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src/profile/prof\_vinterp.F added to make list

Building file list for module prof\_data/cb05\_ae6\_aq  
file /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/src/prof\_data/cb05\_ae6\_aq/ic\_profile\_CB05.dat added to make list

Determining global module files  
file CGRID\_SPCS.F determined to be global  
file HGRD\_DEFN.F determined to be global  
file IC\_PARMS.F determined to be global  
file UTILIO\_DEFN.F determined to be global  
file VGRD\_DEFN.F determined to be global

\*\*\* Program terminated on Error \*\*\*

```
 Cannot create FILE [Makefile]

```

else  
endif  
mv Makefile Makefile.intel  
mv: accessing `Makefile.intel’: Too many levels of symbolic links  
if ( 1 != 0 ) then  
echo \*\*\* failure in /disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe -serial -verbose \*\*\*  
\*\*\* failure in /disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe -serial -verbose \*\*\*  
exit 1

---

<div class="post-metadata">

**Author:** ![cjcoats](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cjcoats](https://forum.cmascenter.org/u/cjcoats)\
**Post date:** [April 18, 2024, 12:25pm UTC](https://forum.cmascenter.org/t/compile-error-in-icon/4852/7 "2024-04-18T12:25:30Z")

</div>

The obvious thing is to check permissions, e.g., on the directory for _Makefile_, or whether there already exists a _Makefile_ for which you do not have WRITE permissions…

---

<div class="post-metadata">

**Author:** ![Sunchanglei](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/sunchanglei/32/4358_2.png) [@Sunchanglei](https://forum.cmascenter.org/u/Sunchanglei)\
**Post date:** [April 23, 2024, 10:22am UTC](https://forum.cmascenter.org/t/compile-error-in-icon/4852/8 "2024-04-23T10:22:27Z")

</div>

Thank you for your reply. I tried to change the permissions with chomd, but still couldn’t. The permission of the folder scl (the account given by my teacher) where CMAQ is located is drwxr-xr-x, Can I create makefile with this permission?
