# Cannot create FILE \[Makefile\] in CMAQ

**URL:** <https://forum.cmascenter.org/t/cannot-create-file-makefile-in-cmaq/4885>\
**Category:** CMAQ\
**Tags:** cmaq\
**Created:** [April 25, 2024, 6:41am UTC](https://forum.cmascenter.org/t/cannot-create-file-makefile-in-cmaq/4885 "2024-04-25T06:41:54Z")\
**Posts on this page:** 3\
**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 25, 2024, 6:41am UTC](https://forum.cmascenter.org/t/cannot-create-file-makefile-in-cmaq/4885/1 "2024-04-25T06:41:54Z")

</div>

Hello teachers, I have an error when compiling icon: cannot create file[makefile]. I have changed the CMAQ folder permissions to read, write, and execute… But the makefile still cannot be generated. Please tell me where else the problem may occur.

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 = /disk1/scl/apps/ioapi32/Linux2\_x86\_64ifort  
set xLib\_2 = /disk1/scl/apps/ioapi32/ioapi/fixed\_src  
set xLib\_4 = /disk1/scl/apps/ioapi32/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 /disk1/scl/apps/ioapi32/Linux2\_x86\_64ifort;  
echo  
echo lib\_2 /disk1/scl/apps/ioapi32/ioapi/fixed\_src;  
echo  
echo lib\_4 /disk1/scl/apps/ioapi32/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 /disk1/scl/apps/ioapi32/Linux2\_x86\_64ifort  
LIB\_2 set to /disk1/scl/apps/ioapi32/ioapi/fixed\_src  
LIB\_4 set to /disk1/scl/apps/ioapi32/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  
if ( 0 != 0 ) then  
if ( -e /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/scripts/BLD\_ICON\_v52\_profile\_intel/ICON\_v52\_profile.cfg ) then  
echo \>\>\> previous ICON\_v52\_profile.cfg exists, re-naming to ICON\_v52\_profile.cfg.old \<\<\<

> > > previous ICON\_v52\_profile.cfg exists, re-naming to ICON\_v52\_profile.cfg.old \<\<\<  
> > > unalias mv  
> > > mv /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/scripts/BLD\_ICON\_v52\_profile\_intel/ICON\_v52\_profile.cfg /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/scripts/BLD\_ICON\_v52\_profile\_intel/ICON\_v52\_profile.cfg.old  
> > > endif  
> > > mv ICON\_v52\_profile.cfg.bld /disk1/scl/CMAQ/CMAQ-5.2/PREP/icon/scripts/BLD\_ICON\_v52\_profile\_intel/ICON\_v52\_profile.cfg  
> > > exit

---

<div class="post-metadata">

**Author:** ![hogrefe.christian](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@hogrefe.christian](https://forum.cmascenter.org/u/hogrefe.christian)\
**Post date:** [April 25, 2024, 11:32am UTC](https://forum.cmascenter.org/t/cannot-create-file-makefile-in-cmaq/4885/2 "2024-04-25T11:32:10Z")

</div>

I am closing this topic as it is a continuation of the discussion in this previous thread:

> [@Compile error in icon](https://forum.cmascenter.org/t/compile-error-in-icon/4852):
>
> 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 …

Please continue the discussion there and avoid opening a new thread for the same topic. Thanks.

---

<div class="post-metadata">

**Author:** ![hogrefe.christian](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@hogrefe.christian](https://forum.cmascenter.org/u/hogrefe.christian)\
**Post date:** [April 25, 2024, 11:32am UTC](https://forum.cmascenter.org/t/cannot-create-file-makefile-in-cmaq/4885/3 "2024-04-25T11:32:23Z")

</div>


