# Airs2m3 compiling error / ioapi-3.2

**URL:** <https://forum.cmascenter.org/t/airs2m3-compiling-error-ioapi-3-2/1837>\
**Category:** m3tools\
**Created:** [October 15, 2020, 4:26pm UTC](https://forum.cmascenter.org/t/airs2m3-compiling-error-ioapi-3-2/1837 "2020-10-15T16:26:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kamitoteles](https://avatars.discourse-cdn.com/v4/letter/k/7ab992/32.png) [@kamitoteles](https://forum.cmascenter.org/u/kamitoteles)\
**Post date:** [October 15, 2020, 4:26pm UTC](https://forum.cmascenter.org/t/airs2m3-compiling-error-ioapi-3-2/1837/1 "2020-10-15T16:26:44Z")

</div>

Hi all,

I have enconuntered a problem compiling ioapi-3.2. The errro code shows:

```auto
cd /hpcfs/home/ca.moreno12/CMAQ_v5.3.1/LIBRARIES/ioapi-3.2/Linux2_x86_64ifort_intel20.2; mpiifort -auto -warn notruncated_source airs2m3.o -L/hpcfs/home/ca.moreno12/CMAQ_v5.3.1/LIBRARIES/ioapi-3.2/Linux2_x86_64ifort_intel20.2 -lioapi -lnetcdff -lnetcdf -qopenmp -o airs2m3
/hpcfs/home/ca.moreno12/CMAQ_v5.3.1/LIBRARIES/ioapi-3.2/Linux2_x86_64ifort_intel20.2/libioapi.a(getnum.o): In function `getnum_':
getnum.f:(.text+0x12e): undefined reference to `adjustl_'
getnum.f:(.text+0x18e): undefined reference to `adjustl_'
getnum.f:(.text+0x518): undefined reference to `adjustl_'
/hpcfs/home/ca.moreno12/CMAQ_v5.3.1/LIBRARIES/ioapi-3.2/Linux2_x86_64ifort_intel20.2/libioapi.a(getnum.o): In function `getint8_':
getnum.f:(.text+0x7d6): undefined reference to `adjustl_'
getnum.f:(.text+0x836): undefined reference to `adjustl_'
/hpcfs/home/ca.moreno12/CMAQ_v5.3.1/LIBRARIES/ioapi-3.2/Linux2_x86_64ifort_intel20.2/libioapi.a(getnum.o):getnum.f:(.text+0xbc4): more undefined references to `adjustl_' follow
make[1]: *** [airs2m3] Error 1
make[1]: Leaving directory `/hpcfs/home/ca.moreno12/CMAQ_v5.3.1/LIBRARIES/ioapi-3.2/m3tools'
make: *** [all] Error 2

```

Mi instalation is set on a CentOS 7.4 and uses Intel mpi compilers and mpi libraries.  
The netcdf c (4.7.2) and fortran (4.5.2) whith --disable-netcdf-4 and --disable-dap options.

Other considerations that I had used in previous installations (I already had ioapi compiled but for an error I deleted it) are the -DIOAPI\_NCF4=1 option in the Makeinclude file for ioapi and putting the mpiiccc, mpiicpc, and mpiifort variables in the same Makeinclude file.

These where the same options that I used on the installation that I accidentally deleted.

Does anyone knows what could be the problem?

Thaks!

---

<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:** [October 15, 2020, 8:38pm UTC](https://forum.cmascenter.org/t/airs2m3-compiling-error-ioapi-3-2/1837/2 "2020-10-15T20:38:02Z")

</div>

See [https://software.intel.com/content/www/us/en/develop/documentation/fortran-compiler-developer-guide-and-reference/top/language-reference/a-to-z-reference/a-to-b/adjustl.html](https://software.intel.com/content/www/us/en/develop/documentation/fortran-compiler-developer-guide-and-reference/top/language-reference/a-to-z-reference/a-to-b/adjustl.html):

`ADJUSTL` is a Fortran-90-Standard elemental intrinsic function. If your _mpiifort_ compiler can’t find it, that would argue either a mis-installed compiler, or else something in the command-line which is preventing the compiler from looking in its standard (internal) library-path. And looking at your quoted text, that last is not happening.

---

<div class="post-metadata">

**Author:** ![endeavor](https://avatars.discourse-cdn.com/v4/letter/e/7ba0ec/32.png) [@endeavor](https://forum.cmascenter.org/u/endeavor)\
**Post date:** [October 20, 2020, 1:29pm UTC](https://forum.cmascenter.org/t/airs2m3-compiling-error-ioapi-3-2/1837/3 "2020-10-20T13:29:04Z")

</div>

# Well, I think the source code getnum.f should be revised a little bit. ADJUSTL is an Intrinsic Procedures. therefore, you need to change all CALL ADJUSTL( DEFSTR ) to DEFSTR = ADJUSTL( DEFSTR )

## 114c114 \< CALL ADJUSTL( DEFSTR )

> ```
> DEFSTR = ADJUSTL( DEFSTR )
> 
> ```

## 130c130 \< CALL ADJUSTL( DEFSTR )

> ```
> DEFSTR = ADJUSTL( DEFSTR )
> 
> ```

## 155c155 \< CALL ADJUSTL( DEFSTR )

> ```
> DEFSTR = ADJUSTL( DEFSTR )
> 
> ```

## 288c288 \< CALL ADJUSTL( DEFSTR )

> ```
> DEFSTR = ADJUSTL( DEFSTR )
> 
> ```

## 304c304 \< CALL ADJUSTL( DEFSTR )

> ```
> DEFSTR = ADJUSTL( DEFSTR )
> 
> ```

## 330c330 \< CALL ADJUSTL( DEFSTR )

> ```
> DEFSTR = ADJUSTL( DEFSTR )
> 
> ```

=========================================================

Hope this helps.

ZHUANSHI HE

---

<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:** [October 20, 2020, 2:51pm UTC](https://forum.cmascenter.org/t/airs2m3-compiling-error-ioapi-3-2/1837/4 "2020-10-20T14:51:54Z")

</div>

**Thanks.** – Carlie

Now fixed on GitHub; credited you in the [Change-Log](https://cjcoats.github.io/ioapi/NEWSTUFF.html) for reporting this. Will update the CMAS repository soon.

---

<div class="post-metadata">

**Author:** ![kamitoteles](https://avatars.discourse-cdn.com/v4/letter/k/7ab992/32.png) [@kamitoteles](https://forum.cmascenter.org/u/kamitoteles)\
**Post date:** [October 21, 2020, 2:43am UTC](https://forum.cmascenter.org/t/airs2m3-compiling-error-ioapi-3-2/1837/5 "2020-10-21T02:43:46Z")

</div>

Thank you so much, now it works whith the code actualization!!!

Literally you saved my magister work!! 😄
