[ADMB Users] ADMB with Mavericks

Johnoel Ancheta johnoel at hawaii.edu
Thu Nov 14 23:40:39 PST 2013


Sorry, my bad.


On Thu, Nov 14, 2013 at 4:20 PM, dave fournier <davef at otter-rsch.com> wrote:

>  On 13-11-14 04:31 PM, Leo Polansky wrote:
>
> my version of the code looks like
>
> void function_minimizer::trust_region_update(int nvar,int _crit,
>   independent_variables& x,const dvector& _g,const double& _f)
> {
>   double & f= (double&)_f;
>   dvector & g= (dvector&)_g;
>   int unvar=1;                                                      //
> unvar defined here
>   fmm fmc(nvar);
>   if (random_effects_flag)
>   {
>     initial_params::set_active_only_random_effects();
>     //cout << nvar << endl;
>     unvar=initial_params::nvarcalc();                 //unvar used here
>     initial_params::restore_start_phase();
>
> So I have no idea why it thinks that unvar is undefined here.
>
> What does your version of the code look like?
>
>  Dear ADMB Developers,
> Thank you for making this software; I'm looking forward to using it to
> move beyond shoehorning my problems into things solvable in R. I attempted
> to install admb on Mac with Mavericks (OS X 10.9) following the
> instructions from Johnoel and Steve on earlier posting on this thread, i.e.
>
>  $ svn checkout http://www.admb-project.org/svn/trunk admb-trunk
> $ cd admb-trunk
> $ make
>
>  However,  besides the occasional warning, this did not work. In the end
> the make command produced
>
>  *df1b2-separable/f1b2trst.cpp:31:5: **error: **use of undeclared
> identifier 'unvar'; did you mean 'nvar'?*
>
>     unvar=initial_params::nvarcalc(); // get the number of active
>
> *    ^~~~~*
>
>     nvar
>
> *df1b2-separable/f1b2trst.cpp:21:50: note: *'nvar' declared here
>
> void function_minimizer::trust_region_update(int nvar,int _crit,
>
> *                                                 ^*
>
> 1 error generated.
>
> make[1]: *** [../build/objects/dist/optlp-df1b2-separable-f1b2trst.obj]
> Error 1
>
> make: *** [c++-all] Error 2
>
>
>  It appears I didn't get as far as Alejandro who seemed to get it to the
> point of being able to have an 'admb' command available. I'm not sure how
> to proceed, what to try, etc. Trying to download admb directly from the
> ADMB webpage and following the unix installation instructions did not work.
> Also, should I be nervous about Dave's earlier comment that an unsafe
> version was installed in some earlier cases? Any suggestions would be
> appreciated. In case it's helpful here is the C compiler version info.
>
>  gcc -v
>
> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
> --with-gxx-include-dir=/usr/include/c++/4.2.1
>
> Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)
>
> Target: x86_64-apple-darwin13.0.0
>
> Thread model: posix
>
>
>  g++ -v
>
> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
> --with-gxx-include-dir=/usr/include/c++/4.2.1
>
> Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)
>
> Target: x86_64-apple-darwin13.0.0
>
>  Thread model: posix
>
>
>
>
>
>  On Mon, Nov 11, 2013 at 9:03 AM, dave fournier <davef at otter-rsch.com>wrote:
>
>> Your first version appears to make the optimized version of the
>> program which is intended to run fast and does not do bounds checks.
>>
>>
>> *** tpl2cpp mixsan
>>
>> *** adcomp mixsan
>> g++ -c -O3 -Wno-deprecated -D__GNUDOS__ -Dlinux -DOPT_LIB -DUSE_LAPLACE
>> -fpermissive -I. -I"/Applications/ADMB/ADMB-11
>> Terminal.app/Contents/admb-11"/include -
>>
>> b
>>
>>
>>  Your second version
>>
>>
>> *** tpl2cpp -bounds mixsan
>>
>> *** adcomp -s mixsan.cpp
>> c++ -c -O3 -D__GNUDOS__ -Dlinux -DSAFE_ALL -DUSE_LAPLACE -I.
>> -I"/Users/alejandro/admb-trunk/build/dist"/include
>> -I"/Users/alejandro/admb-trunk/build/dist"/contrib/include mixsan.cpp
>>
>>
>>  makes the slower "safe" version of the program which does bounds
>> checking.  You should always do this first
>> to make sure that a new program does not walk out of any arrays.
>>
>> So it appears that your program never really worked, but the first
>> version did not report the problem.
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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/20131114/36255c0f/attachment.html>


More information about the Users mailing list