The PSOPT Installer is a set of scripts and patches that allow the user to compile and run the PSOPT sample code.
"Pseudospectral Optimal Control Solver in C++" or PSOPT is a set of routines and sample code for optimal control.
The PSOPT package is available at:
- Website: http://www.psopt.org/
- Repository: https://github.com/PSOPT/psopt
However, this installer uses a modified version freely available.
- Debian: tested on Debian 8.10 and 9.3
- CentOS / RedHat Enterprise Linux (REL): tested on CentOS 7
- Ubuntu: tested on Ubuntu 16 LTS
- Fedora: tested on Fedora 27
Debian 8.10, Debian 9.3 and CentOS 7 are recommended, because these GNU/Linux distributions outperform other distros in our tests.
- Access to sudo. In Ubuntu, sudo is already configured.
However, in Debian, CentOS, REL and Fedora,
sudo
must be configured by the sys admin. - Access to Internet during installation to download dependencies.
- Open a terminal window and type:
wget https://github.com/flavio-santes/psopt_installer/archive/dev.zip
unzip dev.zip
cd psopt_installer-dev
./psopt_installer.sh
The psopt_installer.sh script executes the following steps:
- Download all the dependencies.
- Configure, patch, compile and install all the dependencies.
- Patch and compile the PSOPT package.
- For example, to run the
coulomb
sample application, open a terminal window and type:
cd ~/psopt_bundle
source set_variables.sh
cd psopt/PSOPT/examples/coulomb/
./coulomb
The GNU Affero GPL version 3 License only applies to the following files:
psopt_installer.sh
scripts/set_variables.sh
The PSOPT version with HEAD pointing to commit 88f9c2f.
No, I am not. PSOPT issues must be reported to the PSOPT developers.
I can't. METIS 4.0.3 package forbids this. However, newer METIS versions are licensed under the Apache License v2.0, so perhaps if PSOPT is updated we can produce binary packages.
What is the difference between this project and the install scripts found at the psopt-master.zip file?
The psopt_installer.sh
script installs all the dependencies in
a portable way. If you want to hack the installer do the following:
If you modify the psopt_dir
variable to point to another directory, the
PSOPT Installer will install everything there, without modifying your
current system libraries.
Alternatively, you can move the psopt_bundle
folder to any location
within the machine and PSOPT will work fine.
./xxxxx: error while loading shared libraries: libipopt.so.1: cannot open shared object file: No such file or directory
Open a terminal window and type:
cd ~/psopt_bundle
source set_variables.sh
cd psopt/PSOPT/examples/coulomb/
./coulomb
Replace coulomb
with the name of sample application you want to run.
There are some bugs in PSOPT and/or its dependencies that prevent that in some cases, PSOPT routines demanding a lot of memory are unable to reach an optimal solution.
Workarounds:
- Increase the iteration number in the example (easiest)
- Change the BLAS library: modify Makefile, change this line:
-lcblas
Use another BLAS library and recompile.
- Find and fix the bug (complicated)
- Or use GCC-6: gcc-6, g++-6, gfortran-6 and libgfortran-3 instead of the default compiler version (currently GCC-7). (a bit more complicated...)
The psopt_installer.sh
script must be modified to allow the usage of
GCC-6 and the following variables must be exported:
export CC=gcc-6
export CXX=g++-6
export FC=gfortran-6
export F77=gfortran-6
See the Ubuntu 17 Workarounds.