# Installing I/O API Versions 3.2

**URL:** <https://forum.cmascenter.org/t/installing-i-o-api-versions-3-2/3589>\
**Category:** m3tools\
**Tags:** smoke\
**Created:** [September 22, 2022, 4:18pm UTC](https://forum.cmascenter.org/t/installing-i-o-api-versions-3-2/3589 "2022-09-22T16:18:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LYM](https://avatars.discourse-cdn.com/v4/letter/l/b38774/32.png) [@LYM](https://forum.cmascenter.org/u/LYM)\
**Post date:** [September 22, 2022, 4:18pm UTC](https://forum.cmascenter.org/t/installing-i-o-api-versions-3-2/3589/1 "2022-09-22T16:18:25Z")

</div>

Dear all,  
I tried to install I/O API using Intel compiler. I have modified /ioapi-3.2/Makefile as followed:

```auto
  BIN = Linux2_x86_64ifort
  BASEDIR = ${PWD}
  INSTALL = /share/home/jliu2/dir_lingyun/SMOKE/subsys/ioapi-3.2
  LIBINST = $(INSTALL)/$(BIN)
  BININST = $(INSTALL)/$(BIN)
  CPLMODE = nocpl
  IOAPIDEFS =
  PVMINCL =
  NCFLIBS = -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lz

```

I have also edited my ioapi/Makeinclude.Linux2\_x86\_64ifort so that ARCHFLAGS is

```auto
ARCHFLAGS =
-DIOAPI_NCF4=1
-DAUTO_ARRAYS=1
-DF90=1 -DFLDMN=1
-DFSTR_L=int
-DIOAPI_NO_STDOUT=1
-DAVOID_FLUSH=1 -DBIT32=1

```

according to [Installing --disable-netcdf-4 --disable-dap NEVER works and instructions in CMAQ documentation regarding this seem misleading - #8 by cjcoats](https://forum.cmascenter.org/t/installing-disable-netcdf-4-disable-dap-never-works-and-instructions-in-cmaq-documentation-regarding-this-seem-misleading/946/8)

Additionally, OMPFLAGS at Makeinclude.Linux2\_x86\_64ifort was changed as followed:

```auto
OMPFLAGS = -qopenmp
OMPLIBS = -qopenmp

```

**But I still can’t compile I/O API 3.2 successfully:**

```auto
cd /share/home/jliu2/dir_lingyun/SMOKE/subsys/ioapi-3.2/Linux2_x86_64ifort; icc -c -O3 -traceback -xHost -DVERSION='3.2-nocpl' /share/home/jliu2/dir_lingyun/SMOKE/subsys/ioapi-3.2/ioapi/bufint3.c
In file included from /share/home/jliu2/dir_lingyun/SMOKE/subsys/ioapi-3.2/ioapi/bufint3.c(87):
/share/home/jliu2/dir_lingyun/SMOKE/subsys/ioapi-3.2/ioapi/iodecl3.h(100): error: #error directive: "Error compiling: unsupported architecture"
  #error "Error compiling: unsupported architecture"
   ^

/share/home/jliu2/dir_lingyun/SMOKE/subsys/ioapi-3.2/ioapi/bufint3.c(155): error: #error directive: "Error compiling envgets.c: unsupported architecture"
  #error "Error compiling envgets.c: unsupported architecture"
   ^

compilation aborted for /share/home/jliu2/dir_lingyun/SMOKE/subsys/ioapi-3.2/ioapi/bufint3.c (code 2)
make[1]: *** [bufint3.o] Error 2
make[1]: Leaving directory `/share/home/jliu2/dir_lingyun/SMOKE/subsys/ioapi-3.2/ioapi'
make: *** [all] Error 2

```

Could you help me resolve this question? Thank you very much!

---

<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:** [September 30, 2022, 5:08pm UTC](https://forum.cmascenter.org/t/installing-i-o-api-versions-3-2/3589/2 "2022-09-30T17:08:02Z")

</div>

Generic question: which versions of compiler, I/O API, netCDF?

Unless you **really really** understand how the priorities of the various types of variables used by _make_ work (including understanding the ways that GNU make violates the POSIX Standard), you should not be messing with what is an environment-variable vs. a _make_-variable vs. a command-line variable.

Use the I/O API build system as it is designed, instead of thinking you know enough to “roll your own” – you don’t.

In this case, the _make_-variable FLDMN is not being set correctly (possibly because of your setting BIN as a make-variable), so the C codes such as bufint3.c don’t know how that compiler-set’s Fortran::C linker-interfaces work.

---

<div class="post-metadata">

**Author:** ![LYM](https://avatars.discourse-cdn.com/v4/letter/l/b38774/32.png) [@LYM](https://forum.cmascenter.org/u/LYM)\
**Post date:** [October 6, 2022, 11:25am UTC](https://forum.cmascenter.org/t/installing-i-o-api-versions-3-2/3589/3 "2022-10-06T11:25:07Z")

</div>

Thank you very much! I have installed I/O API successfully using GNU compiler.
