Error: Automatic array 'shifts' at (1) cannot have an initia

Issues related to installation of ADL
Post Reply
mark.tolman
Posts: 12
Joined: Thu Nov 08, 2012 7:41 am
Location: Lexington, MA USA

Error: Automatic array 'shifts' at (1) cannot have an initia

Post by mark.tolman »

I'm attempting to compile ADL 4.1.1 on Fedora 16. I'm getting errors when it gets to Wave_monitor_tc.f. Here's an example of the errors:

Code: Select all

Wave_monitor_tc.f:292.28:

         errshifts(maxlines), err_f(max_nspec_ccd), err_parm(64), &
                            1
Error: Automatic array 'errshifts' at (1) cannot have an initializer
Wave_monitor_tc.f:313.56:

       INTEGER (KIND=INT16) :: history_day(nwave_trends), &
                                                        1
Error: Automatic array 'history_day' at (1) cannot have an initializer
Wave_monitor_tc.f:297.44:

         history_scale(nwave_trends,maxctpx), &
                                            1
Error: Automatic array 'history_scale' at (1) cannot have an initializer
I have both the adl41IdpsAlg_p1.patch and SSEC_ADL4_1_1.patch patches applied. It is using gfortran 4.6.3. Is that too new a version? I was able to compile the same code using gfortran 4.4.6 on a CentOS server. Is there something else I'm missing?

Mark Tolman
MIT Lincoln Laboratory
mark.tolman
Posts: 12
Joined: Thu Nov 08, 2012 7:41 am
Location: Lexington, MA USA

Re: Error: Automatic array 'shifts' at (1) cannot have an in

Post by mark.tolman »

I found a posting that suggested adding the "-fno-whole-file" flag when using 4.6.x. Where does one do that in ADL?

I'm going to try editing PRO_Config - line 399.
mark.tolman
Posts: 12
Joined: Thu Nov 08, 2012 7:41 am
Location: Lexington, MA USA

Re: Error: Automatic array 'shifts' at (1) cannot have an in

Post by mark.tolman »

That didn't work. I'm still getting the error. Any thoughts?
kbisanz
Posts: 280
Joined: Wed Jan 05, 2011 7:02 pm
Location: Omaha NE

Re: Error: Automatic array 'shifts' at (1) cannot have an in

Post by kbisanz »

Yes, PRO_Config around 399 would be the appropriate place. Or you could temporarly edit the Makefile directly just to see if it fixes your error. It sounds like it did not.

Raytheon only officially supports GCC 4.4. Unfortunately, with strict security policies, it's a nightmare for us to try out different compilers, so we do not have 4.6.x installed any place.

I believe the University of Wisconsin got ADL to build with 4.5 and those changes have been incorporate into the baseline.

I poked around google and found this page: http://gcc.1065356.n5.nabble.com/Bug-fo ... 36982.html

The poster indicated that removing -finit-local-zero allowed the code to compile. The flag -finit-local-zero is specified in $ADL_HOME/SDR/OMPS/total_column/src/Imakefile. If you're just trying to get OMPS to build, but don't plan on running it, it's probably ok to remove that. However, if you plan on running OMPS, I do NOT recommend removing -finit-local-zero. The reason is that some OMPS code has variables which are not initialized by the code before being used. The flag -finit-local-zero initializes them automatically. If they are not initialized automatically, they'll be set to some random value that happened to be in memory. This will change the way the code works. It's been a problem for IDPS. The fix was to use the compiler flag (-finit-local-zero or an AIX equivalent) to init things to 0.
Kevin Bisanz
Raytheon Company
Kevin Howard
Posts: 2
Joined: Mon May 06, 2013 2:19 am

Re: Error: Automatic array 'shifts' at (1) cannot have an in

Post by Kevin Howard »

hello,
I still have the same error.
Any other solutions?

thank you
houchin
Posts: 128
Joined: Mon Jan 10, 2011 6:20 am

Re: Error: Automatic array 'shifts' at (1) cannot have an in

Post by houchin »

You may want to consider installing the officially supported version of gcc/gfortran on your system. I have found that taking a short amount of time to use the officially supported versions saves a huge amount of other debugging time.

In the AeroADL distribution, I include the source for GCC 4.4.5, with GNU MP and GNU MPFR (two items not normally installed on typical CentOS and Scientific Linux systems) already bundled in. You can get it from subversion at:

https://svn.gravite.gov/aeroadl/trunk/s ... .5-src.tgz

There's also a build script for gcc, which includes unpacking and building at:

https://svn.gravite.gov/aeroadl/trunk/src/buildgcc.sh

More info on this is included in the AeroADL user documentation at:

https://svn.gravite.gov/aeroadl/trunk/src/doc

(You may need to translate those URLs depending on how you connect to the GRAVITE information portal. If you have a GRAVITE ICF account, AeroADL and all of the referenced files above are at:

/share/aero/aeroadl/latest
Scott Houchin, Senior Engineering Specialist, The Aerospace Corporation
15049 Conference Center Dr CH3/310, Chantilly, VA 20151; 571-307-3914; scott.houchin@aero.org
scottm

Re: Error: Automatic array 'shifts' at (1) cannot have an in

Post by scottm »

Good morning,

I was recently building ADL with the 4.7 compiler. The -finit-local-zero option continues to be a problem with OMPS. We routinely use the VIIRs, ATMS and CrIS SDR code with the 4.5 and 4.7 compiler. The products produced are tested to match the output of the IDPS. VIIRS EDR products are also produced and tested against IDPS.
sara100
Posts: 1
Joined: Wed Dec 23, 2015 12:15 am
Location: Egypt
Contact:

Re: Error: Automatic array 'shifts' at (1) cannot have an in

Post by sara100 »

thank you
Post Reply