[ADMB Users] Problems with -gh

Ian Taylor - NOAA Federal ian.taylor at noaa.gov
Fri Mar 1 13:34:18 PST 2013


The comparisons that Allan and I did took place before Dave improved the
code in February 2011 by replacing 'int' with 'long long' in the following
files:

linad99/df_file.cpp
linad99/fvar.hpp
linad99/gradstrc.cpp
linad99/gs_set.cpp
nh99/xmodelm3.cpp


This enabled 64 bit linux versions to use plenty of memory. However, I
think there remain places where long is used instead of long long which
limits the capacity of 64 bit windows ADMB.

Last year John Sibert compiled a list of other changes that need to occur
or be checked on to ensure that a 64 bit version works to it's full
capabilities: http://www.admb-project.org/redmine/issues/89

-Ian

On Fri, Mar 1, 2013 at 1:12 PM, Allan Hicks - NOAA Federal <
allan.hicks at noaa.gov> wrote:

> I agree that this is unfortunate behavior of Windows.  Ian Taylor and I
> did some tests of speed and memory usage between 32-bit and 64-bit
> compilers and were also puzzled as to why Windows implements long ints as
> 32-bit.  I'm not sure if it is helpful, but a summary of our investigations
> is here:
>
> http://www.admb-project.org/developers/benchmarks/ADMBmemoryTest.pdf/view
>
> Following up on what Arni mentioned about 32-bit and 64-bit compilations,
> I agree and have set up Visual Studio to compile 32- or 64-bit ADMB
> programs at my will.  Ian Taylor and I set this up to provide 32- and
> 64-bit Windows versions of Stock Synthesis.
>
> Allan
>
>
>
>
> On Fri, Mar 1, 2013 at 12:44 PM, dave fournier <davef at otter-rsch.com>wrote:
>
>>  On 13-03-01 11:44 AM, Jeff Laake - NOAA Federal wrote:
>>
>> Just a guess here but what happens if you try long long int
>>
>>
>> I think the right type would be fpos_t
>>
>>
>>  See
>>
>>
>> http://stackoverflow.com/questions/1523483/does-gcc-support-long-long-int
>>
>>
>> On Fri, Mar 1, 2013 at 11:40 AM, dave fournier <davef at otter-rsch.com>wrote:
>>
>>>  On 13-03-01 10:20 AM, Jeff Laake - NOAA Federal wrote:
>>>
>>> I think the problem is that a long int in windows is only 32 bytes.
>>> I compiled this in
>>>
>>>    gcc -m64
>>>
>>> on linux
>>>
>>> #include <stdio.h>
>>> main()
>>> {
>>>   int nbits=sizeof(char*);
>>>   if (nbits==4)
>>>    printf("this is 32 bytes\n");
>>>   else if (nbits==8)
>>>    printf("this is 64 bytes\n");
>>>   else
>>>    printf("this can't happen");
>>>
>>>   nbits=sizeof(long int);
>>>   if (nbits==4)
>>>    printf("this is 32 bytes\n");
>>>   else if (nbits==8)
>>>    printf("this is 64 bytes\n");
>>>   else
>>>    printf("this can't happen");
>>>
>>>   nbits=sizeof(int);
>>>   if (nbits==4)
>>>    printf("this is 32 bytes\n");
>>>   else if (nbits==8)
>>>    printf("this is 64 bytes\n");
>>>   else
>>>    printf("this can't happen");
>>>
>>> }
>>>
>>> on linux I get output
>>>
>>> this is 64 bytes
>>> this is 64 bytes
>>> this is 32 bytes
>>>
>>> using the windows cross compiler I get
>>>
>>>
>>> this is 64 bytes
>>> this is 32 bytes
>>> this is 32 bytes
>>>
>>> so a long int is 32 bytes in the 64 bit version.  Strange eh?
>>>
>>>
>>>
>>>
>>>
>>>
>>>   So I installed the 64 bit version of admb 10.1 and gcc 4.5.2 and the
>>> problem persists. What versions are you using and what type of machine?
>>>  I'm running win7 on an 64 bit machine with 8gb ram. This will be difficult
>>> to work this out if you can't replicate on your machine.  What quantity did
>>> you run for -gh? -gh 6 worked for me but -gh 7 or higher did not. Can you
>>> try a higher -gh value to see if you can get it to fail?
>>>
>>>  regards --jeff
>>>
>>>
>>> On Fri, Mar 1, 2013 at 8:32 AM, Jeff Laake - NOAA Federal <
>>> jeff.laake at noaa.gov> wrote:
>>>
>>>> This email just came through. I already replied to user list. I'm was
>>>> using the 32 bit. Arni already replied with instructions on how to get 64
>>>> bit version which wasn't clear from admb site.
>>>>
>>>>  Thanks for your help.
>>>>
>>>>  --jeff
>>>>
>>>>
>>>>  On Fri, Mar 1, 2013 at 8:28 AM, dave fournier <davef at otter-rsch.com>wrote:
>>>>
>>>>> that runs fine for me. what compiler are you using?
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at admb-project.org
>> http://lists.admb-project.org/mailman/listinfo/users
>>
>>
>
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20130301/c2141569/attachment.html>


More information about the Users mailing list