Skip to content

Instantly share code, notes, and snippets.

@ispanos
Created December 30, 2023 22:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ispanos/7800af86072b2120cea9ec5ba8a58910 to your computer and use it in GitHub Desktop.
Save ispanos/7800af86072b2120cea9ec5ba8a58910 to your computer and use it in GitHub Desktop.
Some notes on installing dynare on fedora
## See
## - https://forum.dynare.org/t/compiling-and-running-dynare-on-a-linux-cluster-running-centos-or-rhel/18039
## - https://mutschler.dev/linux/fedora-post-install/#coding
## - https://mutschler.eu/dynare/
## - https://mutschler.eu/dynare/intro-dsge-dynare/
## - https://forum.dynare.org/t/building-best-version-for-fedora-centos/10552/5
## - https://forum.dynare.org/t/linux-centos-preprocessor-command-not-found/17444/3
MATLAB_DIR=/home/$USER/.local/MATLAB/R2018a
DYNARE_DIR=/home/$USER/.local/dynare
mkdir -p "$DYNARE_DIR"
# slicot
mkdir -p $DYNARE_DIR/slicot
cd $DYNARE_DIR/slicot
wget https://deb.debian.org/debian/pool/main/s/slicot/slicot_5.0+20101122.orig.tar.gz
tar xf slicot_5.0+20101122.orig.tar.gz
cd slicot-5.0+20101122
make FORTRAN=gfortran OPTS="-O2 -fPIC -fdefault-integer-8" LOADER=gfortran lib
mkdir -p $DYNARE_DIR/slicot/lib
cp slicot.a $DYNARE_DIR/slicot/lib/libslicot64_pic.a #for MATLAB
cp slicot.a $DYNARE_DIR/slicot/lib/libslicot_pic.a #for octave
# x13as
mkdir -p $DYNARE_DIR/x13as
cd $DYNARE_DIR/x13as
wget https://www2.census.gov/software/x-13arima-seats/x13as/unix-linux/program-archives/x13as_asciisrc-v1-1-b58.tar.gz
# tar xf x13assrc_V1.1_B39.tar.gz
tar xf x13as_asciisrc-v1-1-b58.tar.gz
sed -i "s|-static| |" makefile.gf # this removes '-static' in the makefile.gf
make -f makefile.gf FFLAGS="-O2 -std=legacy" PROGRAM=x13as
mkdir -p /home/$USER/.local/bin
ln -s $DYNARE_DIR/x13as/x13as /home/$USER/.local/bin/x13as
git clone --recurse-submodules --single-branch --branch master https://git.dynare.org/dynare/dynare.git $DYNARE_DIR/unstable
cd $DYNARE_DIR/unstable
autoreconf -si
# ./configure --with-slicot=$DYNARE_DIR/slicot --with-matlab=$MATLAB_DIR MATLAB_VERSION=R2018a LDFLAGS="-L/usr/lib64 -L/usr/lib64/octave/7.3.0"
./configure --with-slicot=$DYNARE_DIR/slicot --disable-matlab LDFLAGS="-L/usr/lib64 -L/usr/lib64/octave/7.3.0"
make -j$(($(nproc)+1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment