[ADMB Users] problem with gcc on arm processor

8 views
Skip to first unread message

dave fournier

unread,
Nov 28, 2014, 12:35:44 PM11/28/14
to us...@admb-project.org
I built admb on a quad core arm processor in a TV dongle. Wanted to
compare the power to my old 486.

The 486 took 38 seconds to run the catage example. The TV dongle runs it
in less than a second. Neat.

However the version of gcc chokes on the code in lbfgs.cpp. Around line
250 it seems to prefer a more pedestrian way of
declaring and initializing a struct.

/* Common Block Declarations */

#if !defined(__SUNPRO_CC) && !defined(__OPEN64__) && !defined(_MSC_VER)

struct kkkludge{
integer mp, lp;
doublereal gtol, stpmin, stpmax;
};
struct kkkludge lb3_1 = { 6, 6, 0.9, 1e-20, 1e20};

// comment out
/*
struct {
integer mp, lp;
doublereal gtol, stpmin, stpmax;
} lb3_1 = { .mp = 6, .lp = 6, .gtol = .9, .stpmin = 1e-20, .stpmax = 1e20};
*/

there appears to be a problem with "."

Changin the line

struct kkkludge lb3_1 = { 6, 6, 0.9, 1e-20, 1e20};

to

struct kkkludge lb3_1 = { 6, 6, .9, 1e-20, 1e20};

produces an error.
_______________________________________________
Users mailing list
Us...@admb-project.org
http://lists.admb-project.org/mailman/listinfo/users

dave fournier

unread,
Nov 28, 2014, 6:26:53 PM11/28/14
to Johnoel Ancheta, us...@admb-project.org
On 11/28/2014 03:14 PM, Johnoel Ancheta wrote:

I posted the change. 

explicity oine gets rid of



struct {
    integer mp, lp;
    doublereal gtol, stpmin, stpmax;
} lb3_1 = { .mp = 6, .lp = 6, .gtol = .9, .stpmin = 1e-20, .stpmax = 1e20};

and replaces it with the two step


struct kkkludge{
    integer mp, lp;
    doublereal gtol, stpmin, stpmax;
};
struct kkkludge lb3_1 = {  6, 6, 0.9, 1e-20, 1e20};

where you first define the kkludge struct and then define an instance and initialize it without the dot stuff.




The intel also complains.  Let me know if you have a solution.


On Friday, November 28, 2014, dave fournier <da...@otter-rsch.com> wrote:
I built admb on a quad core arm processor in a TV dongle.  Wanted to compare the power to my old  486.

The 486 took 38 seconds to run the catage example. The TV dongle runs it in less than a second. Neat.

However the version of gcc  chokes on the code in lbfgs.cpp. Around line 250 it seems to prefer a more pedestrian way of
declaring and initializing a struct.

/* Common Block Declarations */

#if !defined(__SUNPRO_CC) && !defined(__OPEN64__) && !defined(_MSC_VER)

struct kkkludge{
    integer mp, lp;
    doublereal gtol, stpmin, stpmax;
};
struct kkkludge lb3_1 = {  6, 6, 0.9, 1e-20, 1e20};

// comment out
/*
struct kkkludge lb3_1 = {  6, 6, 0.9, 1e-20, 1e20};

Johnoel Ancheta

unread,
Dec 9, 2014, 7:56:25 PM12/9/14
to dave fournier, us...@admb-project.org
The intel also complains.  Let me know if you have a solution.

On Friday, November 28, 2014, dave fournier <da...@otter-rsch.com> wrote:

Johnoel Ancheta

unread,
Dec 9, 2014, 7:58:49 PM12/9/14
to dave fournier, us...@admb-project.org
Reply all
Reply to author
Forward
0 new messages