Page MenuHomeFreeBSD

math/dynare: Update from 4.5.1 to 4.5.3
ClosedPublic

Authored by joneum on Nov 12 2017, 12:28 PM.
Tags
None
Referenced Files
F103442907: D13058.id35152.diff
Mon, Nov 25, 2:26 AM
Unknown Object (File)
Sat, Nov 2, 9:48 AM
Unknown Object (File)
Oct 21 2024, 5:36 AM
Unknown Object (File)
Oct 7 2024, 7:56 AM
Unknown Object (File)
Oct 6 2024, 11:12 AM
Unknown Object (File)
Oct 5 2024, 6:50 PM
Unknown Object (File)
Oct 5 2024, 2:42 AM
Unknown Object (File)
Oct 4 2024, 3:46 AM
Subscribers

Details

Summary

math/dynare: Update from 4.5.1 to 4.5.3

PR: 223430
MFH: 2017Q4
Submitted by: fernando.apesteguia@gmail.com (maintainer)
Approved by: xxx (mentor)
#Differential Revision: https://reviews.freebsd.org/Dxxxxx

This release is compatible with MATLAB versions 7.3 (R2006b) to 9.3 (R2017b)
and with GNU Octave versions 4.2.

Here is a list of the problems identified in version 4.5.1 and that have been
fixed in version 4.5.2:

  • Fixed bug in perfect foresight solver:

    + If expected shocks were declared after the terminal period, as specified by the periods option, Dynare was crashing.

    + Models declared with the linear option were crashing if exogenous variables were present with a lead or lag.
  • After ML or Bayesian estimation when the smoother option or mh_replic=0 were not specified, not all smoothed measurement errors were displayed.
  • Fixed error in reference manual about the conditional_forecasts command.
  • Fixed smoother behaviour, provide informative error instead of crashing when model cannot be solved.
  • The nopathchange preprocessor option was always triggered, regardless of whether it was passed or not.
  • When ramsey_policy is used, allow state variables to be set in histval block.
  • histval erroneously accepted leads, leading to cryptic crashes.
  • The prior MC draws from previous runs were not deleted, potentially resulting in loading stale files.
  • estim_params_ was being declared global more than once.
  • Fixed crashes happening when simulating linear models with order>1.
  • Make empirical moments independent of simul_replic, as stated in the reference manual, by outputting moments computed with the first simulated sample.
  • The prior_function required a preceding estimation-command to properly set up the prior.
  • If the mode for a parameter was at exactly 0, mode_check was crashing.
  • Fixed get_posterior_parameters-routine which should not do more than getting parameters. As a consequence, the shock_decomposition-command did not correctly set the parameter_set for use in subsequent function calls if shocks are correlated or measurement error is present.
  • Fixed bug in Ramsey problem with constraints both on a policy instrument and another variable. Note that the constraint on a variable that is not an instrument of the Ramsey problem must be written with an equation tag in the model block.
  • Fixed bug in Ramsey problem with constraints on policy instrument.
  • Fixed crash with optimizer 5 when not used with DSGE model at order 1.
  • Fixed mex file used for third order approximation (was crashing on Matlab/Windows 7).
  • isfile routine was failing with MATLAB older than R2016b. This bug

did not affect Octave.

Test Plan

~...math/dynare: portlint -AC [13:22:10]
WARN: Makefile: for new port, make $FreeBSD$ tag in comment section empty, to make SVN happy.
0 fatal errors and 1 warning found.

poudriere testport:

10.3-amd64
10.3-i386
10.4-amd64
10.4-i386
11.1-amd64
11.1-i386
12.0-CURRENT r325045 amd64
12.0-CURRENT r325045 i386

In all log files I see the following error:

> Registering installation for dynare-4.5.3

(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stageusr/local/lib/dynare/mex/octave/A_times_B_kronecker_C.mex - required shared library liboctinterp.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stage
usr/local/lib/dynare/mex/octave/A_times_B_kronecker_C.mex - required shared library liboctave.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stageusr/local/lib/dynare/mex/octave/block_kalman_filter.mex - required shared library liboctinterp.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stage
usr/local/lib/dynare/mex/octave/block_kalman_filter.mex - required shared library liboctave.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stageusr/local/lib/dynare/mex/octave/bytecode.mex - required shared library liboctinterp.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stage
usr/local/lib/dynare/mex/octave/bytecode.mex - required shared library liboctave.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stageusr/local/lib/dynare/mex/octave/dynare_simul_.mex - required shared library liboctinterp.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stage
usr/local/lib/dynare/mex/octave/dynare_simul_.mex - required shared library liboctave.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stageusr/local/lib/dynare/mex/octave/gensylv.mex - required shared library liboctinterp.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stage
usr/local/lib/dynare/mex/octave/gensylv.mex - required shared library liboctave.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stageusr/local/lib/dynare/mex/octave/k_order_perturbation.mex - required shared library liboctinterp.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stage
usr/local/lib/dynare/mex/octave/k_order_perturbation.mex - required shared library liboctave.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stageusr/local/lib/dynare/mex/octave/local_state_space_iteration_2.mex - required shared library liboctinterp.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stage
usr/local/lib/dynare/mex/octave/local_state_space_iteration_2.mex - required shared library liboctave.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stageusr/local/lib/dynare/mex/octave/mjdgges.mex - required shared library liboctinterp.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stage
usr/local/lib/dynare/mex/octave/mjdgges.mex - required shared library liboctave.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stageusr/local/lib/dynare/mex/octave/qmc_sequence.mex - required shared library liboctinterp.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stage
usr/local/lib/dynare/mex/octave/qmc_sequence.mex - required shared library liboctave.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stageusr/local/lib/dynare/mex/octave/qzcomplex.oct - required shared library liboctinterp.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stage
usr/local/lib/dynare/mex/octave/qzcomplex.oct - required shared library liboctave.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stageusr/local/lib/dynare/mex/octave/sparse_hessian_times_B_kronecker_C.mex - required shared library liboctinterp.so.3 not found
(dynare-4.5.3) /wrkdirs/usr/ports/math/dynare/work/stage
usr/local/lib/dynare/mex/octave/sparse_hessian_times_B_kronecker_C.mex - required shared library liboctave.so.3 not found

[12i386-ports-job-01] Installing dynare-4.5.3...

>> Checking shared library dependencies

Neither I nor the maintainer have a solution. Do my mentors have a tip?

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 12763
Build 13031: arc lint + arc unit

Event Timeline

Sorry, no input et on the shared library issue, however, it fails to stage with OCTAVE disabled:

===========================================================================
====> Running Q/A tests (stage-qa)
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: info/dir
Error: Missing: lib/dynare/mex/octave/A_times_B_kronecker_C.mex
Error: Missing: lib/dynare/mex/octave/block_kalman_filter.mex
Error: Missing: lib/dynare/mex/octave/bytecode.mex
Error: Missing: lib/dynare/mex/octave/dynare_simul_.mex
Error: Missing: lib/dynare/mex/octave/gensylv.mex
Error: Missing: lib/dynare/mex/octave/k_order_perturbation.mex
Error: Missing: lib/dynare/mex/octave/local_state_space_iteration_2.mex
Error: Missing: lib/dynare/mex/octave/mjdgges.mex
Error: Missing: lib/dynare/mex/octave/qmc_sequence.mex
Error: Missing: lib/dynare/mex/octave/qzcomplex.oct
Error: Missing: lib/dynare/mex/octave/sparse_hessian_times_B_kronecker_C.mex
===> Error: Plist issues found.
*** Error code 1

@joneum could you update the diff with full context, there are some other issues in the Makefile worth looking into

math/dynare/Makefile
20–21

^duplicate dependency on math/openblas

21–22

^duplicate dependency on math/fftw3

22–23

^ duplicate dependency on math/fftw3-float

23–24

^ this is the default, no? so it should go.

33–34

OPTIONS_SUB=yes
is needed and the plist needs to be modified

39–40

^ this looks like USES=localbase terretory.

math/dynare/Makefile
54

^ you can get rid of this sedding by using somethign ala

lib/dynare/matlab/preprocessor%%ARCH%%/dynare_m

in the plist with proper PLIST_SUB.

To answer the question you actually care about: math/octave should probably set

USE_LDCONFIG=  ${PREFIX}/lib/${PORTNAME}/${PORTVERSION}

This brings the Q/A errors down to

====> Running Q/A tests (stage-qa)
Error: /usr/local/lib/dynare/mex/octave/A_times_B_kronecker_C.mex is linked to /usr/local/lib/octave/4.0.3/liboctinterp.so.3 from math/octave but it is not declared as a dependency
Error: /usr/local/lib/dynare/mex/octave/A_times_B_kronecker_C.mex is linked to /usr/local/lib/octave/4.0.3/liboctave.so.3 from math/octave but it is not declared as a dependency

how ever, it also measns, that the OCTAVE_OPTION should not only build, but also run-depend on octave.

mat requested changes to this revision.Nov 24 2017, 5:24 PM
mat added inline comments.
math/dynare/Makefile
54

Yes, please, use PLIST_SUB, don't sed on TMPPLIST.

This revision now requires changes to proceed.Nov 24 2017, 5:24 PM

This is the current status

currently it only builds for i386 or amd64, depending on whether pkg-plist contains
lib/dynare/matlab/preprocessor32/dynare_m
or
lib/dynare/matlab/preprocessor64/dynare_m.

Updating D13058: math/dynare: Update from 4.5.1 to 4.5.3

yet another attempt, this crashed the i386 jail.

math/dynare/Makefile
56

you probably want an .else here so that it just falls back to "32" in all other cases than amd64, instead of the .endif .if

It would be good to investigate the build on what the possible suffixes of the file depending on architecture are.

math/dynare/pkg-plist
1091

%%OCTAVE%%lib/dynare/matlab/preprocessor%%ARCH%%/dynare_m

math/dynare/Makefile
52–53

this does not belong into the target.

math/dynare/Makefile
56

Also, I would not write it this way, but:

PLIST_SUB=     ARCH=${MY_ARCH_${ARCH}}
MY_ARCH_amd64= 64
MY_ARCH_i386=  32
math/dynare/Makefile
56

Yes I thought about this too, but as the port is not ONLY_FOR_ARCH, is suggested to use the if way.

math/dynare/Makefile
56

^ you might want to look at that line again

math/dynare/Makefile
56

What exactly do you mean? I can not see anything bad.

math/dynare/Makefile
56

what are you triying to achieve with
${ARCH} = i386 =)

math/dynare/Makefile
56

after the line has been commented out, i386 no longer builds: http://joneumbox.org/build.html?mastername=11-1-i386-ports&build=2017-12-06_07h59m42s

the line is needed

can you show me the Makefile you used there?

after the line has been commented out, i386 no longer builds: http://joneumbox.org/build.html?mastername=11-1-i386-ports&build=2017-12-06_07h59m42s

the line is needed

can you show me the Makefile you used there?

the same as here, with this changes:

.if ${ARCH} == "amd64"
PLIST_SUB+= ARCH064
#.else
#${ARCH} == "i386"
#PLIST_SUB+= ARCH=32
.endif

after the line has been commented out, i386 no longer builds: http://joneumbox.org/build.html?mastername=11-1-i386-ports&build=2017-12-06_07h59m42s

the line is needed

can you show me the Makefile you used there?

the same as here, with this changes:

.if ${ARCH} == "amd64"
PLIST_SUB+= ARCH064
#.else
#${ARCH} == "i386"
#PLIST_SUB+= ARCH=32
.endif

Think. Should the .else be commented out there? or did I just complain abut the ${ARCH}== "i386" line :_)
Of course you need the .else PLIST_SUB+=[...]32 part... what you don't need is the line I complained about :)

remove "${ARCH} == "i386"" from the Makefile

So, on, any architecture other than amd64, ARCH will be 32 ?

In D13058#280718, @mat wrote:

So, on, any architecture other than amd64, ARCH will be 32 ?

It is set like this in the makefile:

all-local: $(PROGRAMS)
	if [ -z "`file $(PROGRAMS) | grep x86.64`" ]; then \
	  ARCH="32"; \
	else \
	  ARCH="64"; \
	fi; \

So, I would say so, yes.

[1] https://github.com/DynareTeam/dynare/blob/master/preprocessor/Makefile.am

The question should probably be whether this should be marked ONLY_FOR_ARCH i386 and amd64

The question should probably be whether this should be marked ONLY_FOR_ARCH i386 and amd64

hm, doesn't work :-(

This is the new Makefile: http://jochen.joneumbox.org/dynare.4.5.3.diff

But poudriere stop with an ols error:

> Running Q/A tests (stage-qa)

Error: /usr/local/lib/dynare/mex/octave/A_times_B_kronecker_C.mex is linked to /usr/local/lib/octave/4.0.3/liboctinterp.so.3 from math/octave but it is not declared as a dependency
Error: /usr/local/lib/dynare/mex/octave/A_times_B_kronecker_C.mex is linked to /usr/local/lib/octave/4.0.3/liboctave.so.3 from math/octave but it is not declared as a dependency

> Checking for pkg-plist issues (check-plist)

> Parsing plist

> Checking for items in STAGEDIR missing from pkg-plist

Error: Orphaned: lib/dynare/matlab/preprocessor32/dynare_m

> Checking for items in pkg-plist which are not in STAGEDIR

Error: Missing: lib/dynare/matlab/preprocessor%%ARCH%%/dynare_m

> Error: Plist issues found.

  • Error code 1

Stop.
http://joneumbox.org/data/11-1-i386-ports/2017-12-11_16h00m48s/logs/errors/dynare-4.5.3.log

> Running Q/A tests (stage-qa)

Error: /usr/local/lib/dynare/mex/octave/A_times_B_kronecker_C.mex is linked to /usr/local/lib/octave/4.0.3/liboctinterp.so.3 from math/octave but it is not declared as a dependency
Error: /usr/local/lib/dynare/mex/octave/A_times_B_kronecker_C.mex is linked to /usr/local/lib/octave/4.0.3/liboctave.so.3 from math/octave but it is not declared as a dependency

> Checking for pkg-plist issues (check-plist)

> Parsing plist

> Checking for items in STAGEDIR missing from pkg-plist

Error: Orphaned: lib/dynare/matlab/preprocessor64/dynare_m

> Checking for items in pkg-plist which are not in STAGEDIR

Error: Missing: lib/dynare/matlab/preprocessor%%ARCH%%/dynare_m

> Error: Plist issues found.

  • Error code 1

http://joneumbox.org/data/11-1-AMD64-ports/2017-12-11_16h00m48s/logs/errors/dynare-4.5.3.log

The question should probably be whether this should be marked ONLY_FOR_ARCH i386 and amd64

hm, doesn't work :-(

This is the new Makefile: http://jochen.joneumbox.org/dynare.4.5.3.diff

But poudriere stop with an ols error:

> Running Q/A tests (stage-qa)

Error: /usr/local/lib/dynare/mex/octave/A_times_B_kronecker_C.mex is linked to /usr/local/lib/octave/4.0.3/liboctinterp.so.3 from math/octave but it is not declared as a dependency
Error: /usr/local/lib/dynare/mex/octave/A_times_B_kronecker_C.mex is linked to /usr/local/lib/octave/4.0.3/liboctave.so.3 from math/octave but it is not declared as a dependency

> Checking for pkg-plist issues (check-plist)

> Parsing plist

> Checking for items in STAGEDIR missing from pkg-plist

Error: Orphaned: lib/dynare/matlab/preprocessor32/dynare_m

> Checking for items in pkg-plist which are not in STAGEDIR

Error: Missing: lib/dynare/matlab/preprocessor%%ARCH%%/dynare_m

> Error: Plist issues found.

  • Error code 1

Stop.
http://joneumbox.org/data/11-1-i386-ports/2017-12-11_16h00m48s/logs/errors/dynare-4.5.3.log

> Running Q/A tests (stage-qa)

Error: /usr/local/lib/dynare/mex/octave/A_times_B_kronecker_C.mex is linked to /usr/local/lib/octave/4.0.3/liboctinterp.so.3 from math/octave but it is not declared as a dependency
Error: /usr/local/lib/dynare/mex/octave/A_times_B_kronecker_C.mex is linked to /usr/local/lib/octave/4.0.3/liboctave.so.3 from math/octave but it is not declared as a dependency

> Checking for pkg-plist issues (check-plist)

> Parsing plist

> Checking for items in STAGEDIR missing from pkg-plist

Error: Orphaned: lib/dynare/matlab/preprocessor64/dynare_m

> Checking for items in pkg-plist which are not in STAGEDIR

Error: Missing: lib/dynare/matlab/preprocessor%%ARCH%%/dynare_m

> Error: Plist issues found.

  • Error code 1

http://joneumbox.org/data/11-1-AMD64-ports/2017-12-11_16h00m48s/logs/errors/dynare-4.5.3.log

You misunderstood me here =) -- I quoted part of dynares' own makefile, where they decide what suffix gets added :)

  • this is not what goes in to the ports Makefile.

I wanted to say, that looking at that part of dynare's own Makefile it looks like it is only meant to work on i368 and amd64 (not arm&Co).

So you could add

ONLY_FOR_ARCH=i386 amd64
ARCH_amd64=64
ARCH_i368=32
PLIST_SUB+=ARCH=${ARCH_${ARCH}}

to the port Makefile -- assuming it really is not meant to work on any other architecture :)

math/dynare/Makefile
50

no need for this anymore (bsd.port.pre.mk), I think

56

you can move the whole thing up a bit, above the target.

57

^ together with removing the pre-entry, change this one to bsd.port.mk

58

as it's the only one, you can just use =.

Sorry, I know, I also typed += :)

Please move the sub-stuff above the post-configure target, and add tab-character(s) after the '='-signs as normally :)

Then, after that, if @mat is fine with it too, this is good to go from my point of view :)

This revision was not accepted when it landed; it landed in state Needs Review.Dec 19 2017, 6:01 PM
This revision was automatically updated to reflect the committed changes.