# CCTM Build Script: Warning: alignment 32 of symbol \`bstate3\_'

**URL:** https://forum.cmascenter.org/t/cctm-build-script-warning-alignment-32-of-symbol-bstate3/1082
**Category:** Compiling
**Created:** [October 29, 2019, 5:36pm UTC](https://forum.cmascenter.org/t/cctm-build-script-warning-alignment-32-of-symbol-bstate3/1082 "2019-10-29T17:36:25Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![lawless](https://avatars.discourse-cdn.com/v4/letter/l/e56c9b/32.png) [@lawless](https://forum.cmascenter.org/u/lawless)
#### Post date: [October 29, 2019, 5:36pm UTC](https://forum.cmascenter.org/t/cctm-build-script-warning-alignment-32-of-symbol-bstate3/1082/1 "2019-10-29T17:36:25Z")

</div>

Hello,

I am trying to run the build script to compile CMAQ and I keep ending up with this errror

/usr/bin/ld: Warning: alignment 32 of symbol `bstate3\_’ in /home/colethatcher/53\_CMAQ/lib/x86\_64/gcc/ioapi/lib/libioapi.a(initblk3.o) is smaller than 64 in pshut3.o

It still makes the executable but when I run the benchmark I get the warning

\*\*\* ERROR in INIT3/INITLOG3 \*\*\*  
Error opening log file on unit 99  
I/O STATUS = 17  
File: CTM\_LOG\_000.v53\_gcc\_Bench\_2016\_12SE1\_20160701

---

<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 29, 2019, 5:43pm UTC](https://forum.cmascenter.org/t/cctm-build-script-warning-alignment-32-of-symbol-bstate3/1082/2 "2019-10-29T17:43:45Z")

</div>

It is recommended ([https://cjcoats.github.io/ioapi/AVAIL.html](https://cjcoats.github.io/ioapi/AVAIL.html)) that you build all libraries and models with consistent compile-flags. Go back, decide on a set of compile-flags (I recommend those from _ioapi/Makeinclude.$BIN_), and then build everything again from scratch.

```
Carlie J. Coats, Jr., Ph.D. cjcoats@email.unc.edu
Senior Software Engineer I/O API Author/Maintainer
Center for Environmental Modeling for Policy Development,
UNC Institute for the Environment www.ie.unc.edu
100 Europa Dr., Suite 490 Rm 4051 / Campus Box 1105 919.843.5951
Chapel Hill, NC 27599-1105 Fax 919.966.9920
```

---

<div class="post-metadata">

### Author: ![lawless](https://avatars.discourse-cdn.com/v4/letter/l/e56c9b/32.png) [@lawless](https://forum.cmascenter.org/u/lawless)
#### Post date: [October 29, 2019, 6:20pm UTC](https://forum.cmascenter.org/t/cctm-build-script-warning-alignment-32-of-symbol-bstate3/1082/3 "2019-10-29T18:20:37Z")

</div>

I built all libraries and models with the same compile flags from scratch still getting the same problem.

---

<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 29, 2019, 6:40pm UTC](https://forum.cmascenter.org/t/cctm-build-script-warning-alignment-32-of-symbol-bstate3/1082/4 "2019-10-29T18:40:33Z")

</div>

Oops, I missed this one ([https://cjcoats.github.io/ioapi/ERRORS.html#reloc](https://cjcoats.github.io/ioapi/ERRORS.html#reloc)):

> If sizes of individual arrays or of `COMMON` blocks exceed 2GB on the x86\_64 platforms, Intel ifort and icc will give you failures, with messages about `relocation error` s at link-time. The problem is that the default “memory model” doesn’t support huge arrays and huge code-sets properly. The “medium” memory model supports huge arrays, and the “medium” memory model supports both huge arrays and huge code-sets. To get around this, you will **need to add**
> 
> > -mcmodel=medium -shared-intel  
> > to your compile and link flags (for the medium model), and then **recompile everything including libioapi.a and libnetcdf.a** using these flags. Note that this generates a new binary type that should not be mixed with the default-model binaries. There is a new binary type **`BIN=Linux2_x86_64ifort_medium`** for this binary type, and a is a sample Makeinclude file for it, to demonstrate these flags:  
> > Makeinclude.Linux2\_x86\_64ifort\_medium
> 
> Other compilers and other non-Linux x86\_64 platforms will have similar problems, but the solutions are compiler specific.

As far as `I/O STATUS = 17` is concerned: `IOSTAT` errror-numbers are compiler specific, and sadly _gfortran_ does not document theirs in a way that is google-able (one of the reasons I prefer other compilers; IMNHO, this documentation-failure excludes _gfortran_ from the set of professional quality compilers.)

---

<div class="post-metadata">

### Author: ![lawless](https://avatars.discourse-cdn.com/v4/letter/l/e56c9b/32.png) [@lawless](https://forum.cmascenter.org/u/lawless)
#### Post date: [October 30, 2019, 5:59pm UTC](https://forum.cmascenter.org/t/cctm-build-script-warning-alignment-32-of-symbol-bstate3/1082/5 "2019-10-30T17:59:32Z")

</div>

Where would the -mcmodel=medium -shared-intel flag go to compile libnetcdf.a with it? I tried adding it to the LDFLAGS in netcdf-c but it wouldnt work

---

<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 30, 2019, 6:26pm UTC](https://forum.cmascenter.org/t/cctm-build-script-warning-alignment-32-of-symbol-bstate3/1082/6 "2019-10-30T18:26:13Z")

</div>

in CFLAGS and FFLAGS before netCDF “configure”.

---

<div class="post-metadata">

### Author: ![lawless](https://avatars.discourse-cdn.com/v4/letter/l/e56c9b/32.png) [@lawless](https://forum.cmascenter.org/u/lawless)
#### Post date: [October 30, 2019, 7:00pm UTC](https://forum.cmascenter.org/t/cctm-build-script-warning-alignment-32-of-symbol-bstate3/1082/7 "2019-10-30T19:00:08Z")

</div>

So i successfully recompiled everything using the flags you gave but it still shows the same error when i build the CMAQ executable. Is there anything else I could try? I think resolving this issue might resolve the benchmark case only executing till 23:55 on the first day

---

<div class="post-metadata">

### Author: ![lawless](https://avatars.discourse-cdn.com/v4/letter/l/e56c9b/32.png) [@lawless](https://forum.cmascenter.org/u/lawless)
#### Post date: [October 31, 2019, 7:49pm UTC](https://forum.cmascenter.org/t/cctm-build-script-warning-alignment-32-of-symbol-bstate3/1082/8 "2019-10-31T19:49:00Z")

</div>

I was successfully able to compile everything with no errors after trying a few new options. the benchmark says the program completed successfully however it still stops at one day. I noticed in the run script the start and stop date listed only do one day. Am i supposed to change this so it will go for two days? There is no mention of it in the github tutorial on running the benchmark

---

<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: [October 31, 2019, 8:03pm UTC](https://forum.cmascenter.org/t/cctm-build-script-warning-alignment-32-of-symbol-bstate3/1082/9 "2019-10-31T20:03:11Z")

</div>

Hi Zach,

Yes, please change the end date in order to run for more than one day.

```auto
set END_DATE = "2016-07-02" #> ending date

```

That is assuming that you are using the following run script for your benchmark case:

> <https://github.com/USEPA/CMAQ/blob/master/CCTM/scripts/run_cctm_Bench_2016_12SE1.csh>

---

<div class="post-metadata">

### Author: ![skunwar](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@skunwar](https://forum.cmascenter.org/u/skunwar)
#### Post date: [May 11, 2020, 8:11pm UTC](https://forum.cmascenter.org/t/cctm-build-script-warning-alignment-32-of-symbol-bstate3/1082/10 "2020-05-11T20:11:16Z")

</div>

Hi Liz, in connection to a similar time issue problem, I was wondering if it is possible to start CMAQ simulation at say 030000 hours of a certain day, especially as the IC starts at that hour and the BC is in 6hr intervals of 030000, 090000, 150000 and 210000?

---

<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: [May 11, 2020, 9:08pm UTC](https://forum.cmascenter.org/t/cctm-build-script-warning-alignment-32-of-symbol-bstate3/1082/11 "2020-05-11T21:08:59Z")

</div>

Unless you are using CMAQv5.3, you should be able to start your CMAQ simulation at an hour other than 000000 as long as your run script is set up properly and all input files cover the time period you are modeling. The limitation in CMAQv5.3 was fixed with the release of CMAQv5.3.1 and is documented in the [release notes](https://github.com/USEPA/CMAQ/blob/master/DOCS/Release_Notes/CMAQv5.3.1_bugfixes.md#4-updates-to-cctm-centralized-io-cio-module).

As a general reminder, please only post in existing threads if the topic of your post is directly related to the thread title and existing discussion. If you cannot find any existing threads that meet this criterion, please open a new thread with a descriptive title so that the discussion is easier to find for other users.
