# Compile error in ICON:cannot find -lmpifort

**URL:** <https://forum.cmascenter.org/t/compile-error-in-icon-cannot-find-lmpifort/4921>\
**Category:** Compiling\
**Created:** [May 8, 2024, 9:16am UTC](https://forum.cmascenter.org/t/compile-error-in-icon-cannot-find-lmpifort/4921 "2024-05-08T09:16:55Z")\
**Posts on this page:** 5\
**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:** [May 8, 2024, 9:16am UTC](https://forum.cmascenter.org/t/compile-error-in-icon-cannot-find-lmpifort/4921/1 "2024-05-08T09:16:55Z")

</div>

Hi,

I’m trying to compile CMAQ-5.2. CMAQ I use the ifort compiler. The Intel MPI version is 2018.3.222.

But error occurs while compiling the ICON process.

In ICON step, I get the following error.

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: cannot remove `/disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe’: No such file or directory  
ld: cannot find -lmpifort

_ **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: 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

Is anyone willing to help me?

---

<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:** [May 8, 2024, 11:45am UTC](https://forum.cmascenter.org/t/compile-error-in-icon-cannot-find-lmpifort/4921/2 "2024-05-08T11:45:48Z")

</div>

…and presumably you have already successfully built the CCTM?

In any case: since ICON is not a MPI-parallel program, you do not need to be using the MPI compiler-set to build it; you would do just as well with “normal” _ifort_ and `BIN`-type `Linux2_x86_64ifort`

---

<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:** [May 9, 2024, 1:07am UTC](https://forum.cmascenter.org/t/compile-error-in-icon-cannot-find-lmpifort/4921/3 "2024-05-09T01:07:25Z")

</div>

Thanks for your reply, The first thing I compiled was the CMAQ icon section. I just tried to compile CCTM first, but the same problem occurred, lmpifort could not be found.

I get the following error:

Compiler is set to intel  
setenv CCTM\_SRC /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src  
set GlobInc = /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src/ICL  
set Mechs = /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src/MECHS  
setenv REPOROOT /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src  
set VRSN = v52  
set EXEC = CCTM\_v52.exe  
set CFG = CCTM\_v52.cfg  
set CompileBLDMAKE  
set CopySrc  
set ParOpt  
set ModDriver = driver/wrf  
set ModInit = init/yamo  
set ModGrid = grid/cartesian  
set ModCpl = couple/gencoor\_wrf  
set ModHadv = hadv/yamo  
set ModVadv = vadv/wrf  
set ModHdiff = hdiff/multiscale  
set ModVdiff = vdiff/acm2  
set ModDepv = depv/m3dry  
set ModEmis = emis/emis  
set ModBiog = biog/beis3  
set ModPlmrs = plrise/smoke  
set ModCgrds = spcs/cgrid\_spcs\_nml  
set ModPhot = phot/inline  
set Mechanism = cb05e51\_ae6\_aq  
set ModGas = gas/ebi\_cb05e51\_ae6\_aq  
set ModAero = aero/aero6  
set ModCloud = cloud/acm\_ae6  
set ModUtil = util/util  
set Tracer = trac0  
set ModPa = procan/pa  
set ModPvO3 = pv\_o3  
setenv FC mpiifort  
set FP = mpiifort  
set CC = icc  
setenv BLDER /disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe  
set NETCDF = /disk1/scl/CMAQ/CMAQ-5.2/lib/netcdf/lib -lnetcdff -lnetcdf  
set PNETCDF = /lib  
set FSTD = -O3 -fno-alias -mp1 -fp-model source  
set DBG = -O0 -g -check bounds -check uninit -fpe0 -fno-alias -ftrapuv -traceback  
setenv F\_FLAGS -fixed -132  
set F90\_FLAGS = -free  
set CPP\_FLAGS =  
set C\_FLAGS = -O2 -DFLDMN -I  
set LINK\_FLAGS =  
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  
setenv CMAQ\_MODEL /disk1/scl/CMAQ/CMAQ-5.2  
echo default Model repository path: /disk1/scl/CMAQ/CMAQ-5.2  
default Model repository path: /disk1/scl/CMAQ/CMAQ-5.2  
endif  
set BLD\_OS = `uname -s`  
uname -s  
if ( Linux != Linux ) then  
if ( 0 ) then  
if ( 0 ) then  
set PIO =  
endif  
if ( 1 ) then  
echo Parallel; set MPI flags  
Parallel; set MPI flags  
set ModStenex = STENEX/se  
set ModPario = PARIO  
set ModPar = par/mpi  
set PARIO = /disk1/scl/CMAQ/CMAQ-5.2/PARIO  
set STENEX = /disk1/scl/CMAQ/CMAQ-5.2/STENEX  
set PAR = ( -Dparallel )  
set Popt = SE  
set seL = se\_snl  
set LIB2 = -lioapi  
set LIB3 =  
set Str1 = ( // Parallel / Include message passing definitions )  
set Str2 = ( include SUBST\_MPI mpif.h ; )  
else  
set ModMech = MECHS/cb05e51\_ae6\_aq  
if ( cb05e51\_ae6\_aq == saprc07tic\_ae6i\_aqkmti ) then  
set ModTrac = MECHS/trac0  
if ( 0 ) then  
set POT =  
endif  
set Bld = /disk1/scl/CMAQ/CMAQ-5.2/CCTM/scripts/BLD\_CCTM\_v52\_intel  
if ( ! -e /disk1/scl/CMAQ/CMAQ-5.2/CCTM/scripts/BLD\_CCTM\_v52\_intel ) then  
if ( ! -d /disk1/scl/CMAQ/CMAQ-5.2/CCTM/scripts/BLD\_CCTM\_v52\_intel ) then  
endif  
cd /disk1/scl/CMAQ/CMAQ-5.2/CCTM/scripts/BLD\_CCTM\_v52\_intel  
set ICL\_PAR = /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src/ICL/fixed/mpi  
set ICL\_CONST = /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src/ICL/fixed/const  
set ICL\_FILES = /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src/ICL/fixed/filenames  
set ICL\_EMCTL = /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src/ICL/fixed/emctrl  
if ( 1 ) then  
set ICL\_MPI = .  
endif  
if ( 1 ) then  
/bin/cp -fp /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src/ICL/fixed/mpi/PE\_COMM.EXT /disk1/scl/CMAQ/CMAQ-5.2/CCTM/scripts/BLD\_CCTM\_v52\_intel  
/bin/cp -fp /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src/ICL/fixed/const/CONST.EXT /disk1/scl/CMAQ/CMAQ-5.2/CCTM/scripts/BLD\_CCTM\_v52\_intel  
/bin/cp -fp /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src/ICL/fixed/filenames/FILES\_CTM.EXT /disk1/scl/CMAQ/CMAQ-5.2/CCTM/scripts/BLD\_CCTM\_v52\_intel  
/bin/cp -fp /disk1/scl/CMAQ/CMAQ-5.2/CCTM/src/ICL/fixed/emctrl/EMISPRM.EXT /disk1/scl/CMAQ/CMAQ-5.2/CCTM/scripts/BLD\_CCTM\_v52\_intel  
if ( 1 ) then  
/bin/cp -fp ./mpif.h /disk1/scl/CMAQ/CMAQ-5.2/CCTM/scripts/BLD\_CCTM\_v52\_intel  
/bin/cp: `./mpif.h' and `/disk1/scl/CMAQ/CMAQ-5.2/CCTM/scripts/BLD\_CCTM\_v52\_intel/mpif.h’ are the same file  
endif  
set ICL\_PAR = .  
set ICL\_CONST = .  
set ICL\_FILES = .  
set ICL\_EMCTL = .  
if ( 1 ) then  
set ICL\_MPI = .  
endif  
endif  
set STX1 = ( -DSUBST\_BARRIER=SE\_BARRIER -DSUBST\_GLOBAL\_MAX=SE\_GLOBAL\_MAX -DSUBST\_GLOBAL\_MIN=SE\_GLOBAL\_MIN -DSUBST\_GLOBAL\_MIN\_DATA=SE\_GLOBAL\_MIN\_DATA -DSUBST\_GLOBAL\_TO\_LOCAL\_COORD=SE\_GLOBAL\_TO\_LOCAL\_COORD -DSUBST\_GLOBAL\_SUM=SE\_GLOBAL\_SUM -DSUBST\_GLOBAL\_LOGICAL=SE\_GLOBAL\_LOGICAL -DSUBST\_LOOP\_INDEX=SE\_LOOP\_INDEX -DSUBST\_SUBGRID\_INDEX=SE\_SUBGRID\_INDEX )  
set STX2 = ( -DSUBST\_HI\_LO\_BND\_PE=SE\_HI\_LO\_BND\_PE -DSUBST\_SUM\_CHK=SE\_SUM\_CHK -DSUBST\_INIT\_ARRAY=SE\_INIT\_ARRAY -DSUBST\_COMM=SE\_COMM -DSUBST\_MY\_REGION=SE\_MY\_REGION -DSUBST\_SLICE=SE\_SLICE -DSUBST\_GATHER=SE\_GATHER -DSUBST\_DATA\_COPY=SE\_DATA\_COPY -DSUBST\_IN\_SYN=SE\_IN\_SYN )  
set Cfile = /disk1/scl/CMAQ/CMAQ-5.2/CCTM/scripts/BLD\_CCTM\_v52\_intel/CCTM\_v52.cfg.bld  
set quote = "  
echo  
echo model CCTM\_v52.exe;  
echo  
echo repo /disk1/scl/CMAQ/CMAQ-5.2/CCTM/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  
if ( 1 ) then  
echo lib\_3 “mpi -I.”;  
echo  
endif  
echo  
echo lib\_4 ioapi/Linux2\_x86\_64ifort;  
echo  
set text = " -Dparallel -DSUBST\_BARRIER=SE\_BARRIER -DSUBST\_GLOBAL\_MAX=SE\_GLOBAL\_MAX -DSUBST\_GLOBAL\_MIN=SE\_GLOBAL\_MIN -DSUBST\_GLOBAL\_MIN\_DATA=SE\_GLOBAL\_MIN\_DATA -DSUBST\_GLOBAL\_TO\_LOCAL\_COORD=SE\_GLOBAL\_TO\_LOCAL\_COORD -DSUBST\_GLOBAL\_SUM=SE\_GLOBAL\_SUM -DSUBST\_GLOBAL\_LOGICAL=SE\_GLOBAL\_LOGICAL -DSUBST\_LOOP\_INDEX=SE\_LOOP\_INDEX -DSUBST\_SUBGRID\_INDEX=SE\_SUBGRID\_INDEX -DSUBST\_HI\_LO\_BND\_PE=SE\_HI\_LO\_BND\_PE -DSUBST\_SUM\_CHK=SE\_SUM\_CHK -DSUBST\_INIT\_ARRAY=SE\_INIT\_ARRAY -DSUBST\_COMM=SE\_COMM -DSUBST\_MY\_REGION=SE\_MY\_REGION -DSUBST\_SLICE=SE\_SLICE -DSUBST\_GATHER=SE\_GATHER -DSUBST\_DATA\_COPY=SE\_DATA\_COPY -DSUBST\_IN\_SYN=SE\_IN\_SYN";  
echo cpp\_flags " -Dparallel -DSUBST\_BARRIER=SE\_BARRIER -DSUBST\_GLOBAL\_MAX=SE\_GLOBAL\_MAX -DSUBST\_GLOBAL\_MIN=SE\_GLOBAL\_MIN -DSUBST\_GLOBAL\_MIN\_DATA=SE\_GLOBAL\_MIN\_DATA -DSUBST\_GLOBAL\_TO\_LOCAL\_COORD=SE\_GLOBAL\_TO\_LOCAL\_COORD -DSUBST\_GLOBAL\_SUM=SE\_GLOBAL\_SUM -DSUBST\_GLOBAL\_LOGICAL=SE\_GLOBAL\_LOGICAL -DSUBST\_LOOP\_INDEX=SE\_LOOP\_INDEX -DSUBST\_SUBGRID\_INDEX=SE\_SUBGRID\_INDEX -DSUBST\_HI\_LO\_BND\_PE=SE\_HI\_LO\_BND\_PE -DSUBST\_SUM\_CHK=SE\_SUM\_CHK -DSUBST\_INIT\_ARRAY=SE\_INIT\_ARRAY -DSUBST\_COMM=SE\_COMM -DSUBST\_MY\_REGION=SE\_MY\_REGION -DSUBST\_SLICE=SE\_SLICE -DSUBST\_GATHER=SE\_GATHER -DSUBST\_DATA\_COPY=SE\_DATA\_COPY -DSUBST\_IN\_SYN=SE\_IN\_SYN";  
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 c\_compiler icc;  
echo  
echo c\_flags “-O2 -DFLDMN -I”;  
echo  
echo link\_flags “”;  
echo  
echo ioapi “-lioapi”;  
echo  
echo netcdf “-lnetcdff -lnetcdf”;  
echo  
if ( 1 ) then  
echo mpich " ";  
echo  
endif  
echo include SUBST\_PE\_COMM ./PE\_COMM.EXT;  
echo include SUBST\_CONST ./CONST.EXT;  
echo include SUBST\_FILES\_ID ./FILES\_CTM.EXT;  
echo include SUBST\_EMISPRM ./EMISPRM.EXT;  
echo  
if ( 1 ) then  
echo // Parallel / Include message passing definitions  
echo include SUBST\_MPI ./mpif.h;  
endif  
echo  
set text = stenex or se\_noop  
echo // options are stenex or se\_noop  
echo Module STENEX/se;  
if ( 1 ) then  
set text = // parallel executable; stenex and pario included  
echo // parallel executable; stenex and pario included  
echo Module PARIO;  
else  
echo  
set text = par, par\_nodistr and par\_noop  
echo // options are par, par\_nodistr and par\_noop  
if ( 1 ) then  
echo Module par/mpi;  
endif  
echo  
if ( 0 ) then  
set text = wrf and yamo  
echo // options are wrf and yamo  
echo Module driver/wrf;  
echo  
set text = cartesian  
echo // options are cartesian  
echo Module grid/cartesian;  
echo  
set text = yamo  
echo // options are yamo  
echo Module init/yamo;  
echo  
set text = gencoor\_wrf and gencoor  
echo // options are gencoor\_wrf and gencoor  
echo Module couple/gencoor\_wrf;  
echo  
set text = yamo  
echo // options are yamo  
echo Module hadv/yamo;  
echo  
set text = wrf and yamo  
echo // options are wrf and yamo  
echo Module vadv/wrf;  
echo  
set text = multiscale  
echo // options are multiscale  
echo Module hdiff/multiscale;  
echo  
set text = acm2  
echo // options are acm2  
echo Module vdiff/acm2;  
echo  
set text = m3dry  
echo // options are m3dry  
echo Module depv/m3dry;  
echo  
set text = emis  
echo // options are emis  
echo Module emis/emis;  
echo  
set text = beis3  
echo // options are beis3  
echo Module biog/beis3;  
echo  
set text = smoke  
echo // options are smoke  
echo Module plrise/smoke;  
echo  
set text = cgrid\_spcs\_nml and cgrid\_spcs\_icl  
echo // options are cgrid\_spcs\_nml and cgrid\_spcs\_icl  
echo Module spcs/cgrid\_spcs\_nml;  
echo  
set text = inline and table  
echo // options are inline and table  
echo Module phot/inline;  
echo  
set text = gas chemistry solvers  
echo // gas chemistry solvers  
set text = smvgear, ros3, and ebi\_; see ‘gas chemistry mechanisms’ for   
echo // options are smvgear, ros3, and ebi\_; see ‘gas chemistry mechanisms’ for   
echo Module gas/ebi\_cb05e51\_ae6\_aq;  
echo  
set MechList = cb05e51\_ae6\_aq, cb05e51\_ae6nvPOA\_aq, cb05eh51\_ae6\_aq, cb05mp51\_ae6\_aq, cb05tucl\_ae6\_aq, cb05tump\_ae6\_aq, cb6r3\_ae6\_aq, cb6r3\_ae6nvPOA\_aq, racm2\_ae6\_aq, saprc07tb\_ae6\_aq, saprc07tc\_ae6\_aq, saprc07tc\_ae6nvPOA\_aq, saprc07tic\_ae6i\_aq, saprc07tic\_ae6i\_aqkmti, saprc07tic\_ae6invPOA\_aq  
set text = gas chemistry mechanisms  
echo // gas chemistry mechanisms  
set text = cb05e51\_ae6\_aq, cb05e51\_ae6nvPOA\_aq, cb05eh51\_ae6\_aq, cb05mp51\_ae6\_aq, cb05tucl\_ae6\_aq, cb05tump\_ae6\_aq, cb6r3\_ae6\_aq, cb6r3\_ae6nvPOA\_aq, racm2\_ae6\_aq, saprc07tb\_ae6\_aq, saprc07tc\_ae6\_aq, saprc07tc\_ae6nvPOA\_aq, saprc07tic\_ae6i\_aq, saprc07tic\_ae6i\_aqkmti, saprc07tic\_ae6invPOA\_aq  
echo // options are cb05e51\_ae6\_aq, cb05e51\_ae6nvPOA\_aq, cb05eh51\_ae6\_aq, cb05mp51\_ae6\_aq, cb05tucl\_ae6\_aq, cb05tump\_ae6\_aq, cb6r3\_ae6\_aq, cb6r3\_ae6nvPOA\_aq, racm2\_ae6\_aq, saprc07tb\_ae6\_aq, saprc07tc\_ae6\_aq, saprc07tc\_ae6nvPOA\_aq, saprc07tic\_ae6i\_aq, saprc07tic\_ae6i\_aqkmti, saprc07tic\_ae6invPOA\_aq  
echo Module MECHS/cb05e51\_ae6\_aq;  
echo  
set text = tracer modules  
echo // tracer modules  
echo // options are trac0, trac1  
echo Module MECHS/trac0;  
echo

if ( 0 ) then  
set text = aero6  
echo // options are aero6  
echo Module aero/aero6;  
echo  
set text = acm\_ae6, acm\_ae6\_kmt, and acm\_ae6\_mp  
echo // options are acm\_ae6, acm\_ae6\_kmt, and acm\_ae6\_mp  
echo Module cloud/acm\_ae6;  
echo  
set text = // compile for inline process analysis  
echo // compile for inline process analysis  
echo Module procan/pa;  
echo  
set text = util  
echo // options are util  
echo Module util/util;  
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: cannot remove `/disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe’: No such file or directory  
ld: cannot find -lmpifort

_ **ERROR** _ BLDMAKE Compile failed

endif  
cd /disk1/scl/CMAQ/CMAQ-5.2/CCTM/scripts/BLD\_CCTM\_v52\_intel  
if ( 1 ) then  
set Blder = /disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe -verbose  
else  
if ( 0 ) then  
if ( 1 ) then  
/disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe -verbose /disk1/scl/CMAQ/CMAQ-5.2/CCTM/scripts/BLD\_CCTM\_v52\_intel/CCTM\_v52.cfg.bld  
/disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe: Command not found.  
else if ( 0 ) then  
endif  
mv Makefile Makefile.intel  
mv: accessing `Makefile.intel': Too many levels of symbolic links if ( -e Makefile.intel && -e Makefile ) rm Makefile ln -s Makefile.intel Makefile ln: accessing `Makefile’: Too many levels of symbolic links  
if ( 1 != 0 ) then  
echo \*\*\* failure in /disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe -verbose \*\*\*  
\*\*\* failure in /disk1/scl/CMAQ/CMAQ-5.2/UTIL/bldmake/bldmake\_intel.exe -verbose \*\*\*  
exit 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:** [May 9, 2024, 7:14am UTC](https://forum.cmascenter.org/t/compile-error-in-icon-cannot-find-lmpifort/4921/4 "2024-05-09T07:14:38Z")

</div>

In addition,I connected MPI path under CMAQ\lib. After this error, I changed it to mpich path and recompiled CCTM, but it still didn’t work. Still no lmpifort found. I don’t know how to solve it

---

<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:** [May 9, 2024, 11:05am UTC](https://forum.cmascenter.org/t/compile-error-in-icon-cannot-find-lmpifort/4921/5 "2024-05-09T11:05:49Z")

</div>

You probably need to talk with your systems administrator about your MPI installation. With Intel compilers, there are three possibilities, each of which is incompatible with the others:

1. Native Intel MPI, which has its own libraries;
2. MPICH built around Intel (in which case, the compiler _mpif90_ is a “wrapper” around ifort that understands what and where its libraries are; and
3. OpenMPI built around Intel (in which case, the compiler --still _mpif90_ – is a “wrapper” around ifort that understands what and where its libraries (which have a different set of names) are.  
Then you need to modify your _Makefile_ to suit.
