French Forest Sector Model (FFSM++)

Laboratoire d'Economie Forestière - LEF - Nancy, France

User Tools

Site Tools


en:dev:development

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:dev:development [2024/04/30 09:01]
Antonello Lobianco [Linux (Ubuntu 22.04)]
en:dev:development [2024/09/24 15:03] (current)
Antonello Lobianco [Libtool]
Line 17: Line 17:
 <code bash> <code bash>
 sudo apt-get install build-essential gfortran gcc g++ gcc-12  sudo apt-get install build-essential gfortran gcc g++ gcc-12 
-sudo apt-get install libtool git patch wget pkg-config+sudo apt-get install libtool libtool-bin git patch wget pkg-config
 sudo apt-get install zlib1g-dev libboost-all-dev  libblas-dev liblapack-dev liblapack64-dev libmetis-dev libatlas-base-dev sudo apt-get install zlib1g-dev libboost-all-dev  libblas-dev liblapack-dev liblapack64-dev libmetis-dev libatlas-base-dev
 sudo apt-get install qtbase5-dev qtbase5-dev-tools qtchooser qt5-qmake qtcreator sudo apt-get install qtbase5-dev qtbase5-dev-tools qtchooser qt5-qmake qtcreator
Line 23: Line 23:
  
 (not all are likely to be necessary, we just tried successfully this combination) (not all are likely to be necessary, we just tried successfully this combination)
 +
 +Create a folder for installing the various FFSM dependencies. Here we use `~/programs`:
 +
 +<code bash>
 +cd ~
 +mkdir programs
 +cd programs
 +</code>
  
 ==== Ipopt ==== ==== Ipopt ====
-  * Downolad Ipopt (Ipopt-3.XX.X.tgz) from http://www.coin-or.org/download/source/Ipopt/ and extract it to somewhere where there is no spaces in the path. + 
-  * In the extracted directory move to ThirdParty and for {Metis|Mumps|ASL} go in their subfolder and run "./get.{Metis|Mumps|ASL}". This will download and extract them to a place that the ipopt configure will automatically find them+Ipopt is the solver engine used by FFSMItself it uses several libraries. The procedure describe below installs all the "third partiesIPOPT libraries and finally IPOPT itself
-  For using the HSL linear solver (optional, as it requires a free academic licence, but way faster than MUMS) go to http://www.hsl.rl.ac.uk/ipopt/ and download "Coin-HSL Full (Stable)", "Source". Wait for the email with the link and then unzip, rename and move the archive as to be ThirdParty/HSL/coinhsl  + 
-  * Create a build directory, move there and from there type:<code bash> +For using the HSL linear solver (optional, as it requires a free academic licence, but way faster than MUMS) go to http://www.hsl.rl.ac.uk/ipopt/ and download "Coin-HSL Full (Stable)", "Source". Wait for the email with the link and then unzip, rename and move the archive as to be `~/programs/Ipopt/ThirdParty/HSL/coinhsl`  
-../configure --with-blas="-L/usr/lib/atlas-base/atlas -lblas" --with-lapack="-L/usr/lib/atlas-base/atlas -llapack" --prefix="/usr" 'CXXFLAGS=-O3' 'CFLAGS=-O3'+ 
 +<code bash> 
 +mkdir Ipopt 
 +cd Ipopt 
 +wget https://github.com/coin-or/Ipopt/archive/refs/tags/releases/3.14.16.tar.gz 
 +tar -xzf 3.14.16.tar.gz 
 + 
 +cd ~/programs/Ipopt 
 +git clone https://github.com/coin-or-tools/ThirdParty-ASL.git 
 +cd ThirdParty-ASL 
 +./get.ASL 
 +./configure --prefix="/usr" 'CXXFLAGS=-O3' 'CFLAGS=-O3' 
 +make 
 +sudo make install 
 +cd .. 
 +git clone https://github.com/coin-or-tools/ThirdParty-HSL 
 +cd ThirdParty-HSL 
 +[extract the HSL archive as `~/programs/Ipopt/ThirdParty/HSL/coinhsl`] 
 +./configure --prefix="/usr" 'CXXFLAGS=-O3' 'CFLAGS=-O3' 
 +make 
 +sudo make install 
 +cd ../Ipopt-releases-3.14.16/ 
 +mkdir build 
 +cd build 
 +../configure --prefix="/usr" 'CXXFLAGS=-O3' 'CFLAGS=-O3'
 make make
 sudo make install sudo make install
 +cd ../../..
 </code> </code>
  
Line 38: Line 71:
   * Needed ColPack >= 1.0.8   * Needed ColPack >= 1.0.8
   * Type:<code bash>   * Type:<code bash>
-sudo apt-get install libtool +git clone https://github.com/CSCsw/ColPack.git  # Download ColPack as ~/programs/ColPack
-git clone https://github.com/CSCsw/ColPack.git  # Download ColPack+
 cd ColPack                                       # ColPack Root Directory cd ColPack                                       # ColPack Root Directory
 git checkout 10b780b52a25c6ccef3d2abc12055ee85b7e8667 # checkout a version know to works git checkout 10b780b52a25c6ccef3d2abc12055ee85b7e8667 # checkout a version know to works
Line 46: Line 78:
 make make
 sudo make install sudo make install
 +cd ..
 </code> </code>
 +
 +  * (alternative) Type:<code bash>
 +git clone https://github.com/CSCsw/ColPack.git  # Download ColPack as ~/programs/ColPack
 +cd ColPack/build/automake/
 +autoreconf -vif
 +mkdir mybuilds
 +cd mybuilds
 +../configure --prefix=/usr 'CXXFLAGS=-O3' 'CFLAGS=-O3'
 +make -j 8
 +sudo make install
 +cd ../../../..
 +</code>
 +
  
  
 ==== ADOL-C ==== ==== ADOL-C ====
  
-  * Download ADOL-C (ADOL-C-2.X.X.tgz) from http://www.coin-or.org/download/source/ADOL-C/ 
   * Type:<code bash>   * Type:<code bash>
 +mkdir ADOL-C
 +cd ADOL-C
 +wget https://www.coin-or.org/download/source/ADOL-C/ADOL-C-2.7.2.zip
 +unzip ADOL-C-2.7.2.zip
 +cd ADOL-C-2.7.2/
 ./configure --enable-docexa --enable-addexa --enable-sparse --prefix=/usr 'CXXFLAGS=-O3' 'CFLAGS=-O3' ./configure --enable-docexa --enable-addexa --enable-sparse --prefix=/usr 'CXXFLAGS=-O3' 'CFLAGS=-O3'
 make make
 sudo make install sudo make install
 </code> </code>
 +
 +==== Symlinks ====
  
   * On 64 bits Linux, symlink all libadoc.* libraries from /usr/lib64 to /usr/lib:<code bash>   * On 64 bits Linux, symlink all libadoc.* libraries from /usr/lib64 to /usr/lib:<code bash>
Line 64: Line 116:
 sudo ln -s ../lib64/libadolc.so.2 . sudo ln -s ../lib64/libadolc.so.2 .
 sudo ln -s ../lib64/libadolc.so.2.1.0 . sudo ln -s ../lib64/libadolc.so.2.1.0 .
 +sudo ln -s ../lib64/libadolc.so.2.2.0 .
 </code> </code>
 +  * Make a symlink in the include system directory to the new name of coin (coin-or):<code bash>
 +cd /usr/include
 +sudo ln -s coin-or coin
 +</code>
 +
 +==== Libtool ====
 +(may not be necessary)
 +
 +  * ''libtool --finish /usr/local/lib''
 +  * ''libtool --finish /usr/lib''
  
 ===== Windows (XP or 7) ===== ===== Windows (XP or 7) =====
en/dev/development.1714460519.txt.gz · Last modified: 2024/04/30 09:01 by Antonello Lobianco