I need to install a TCP solver called Concorde, I see in its download page the option for Red Hat Linux.
How could I install the program in Ubuntu 14.04?
I need to install a TCP solver called Concorde, I see in its download page the option for Red Hat Linux.
How could I install the program in Ubuntu 14.04?
There are only executable versions of Concorde and Linkern, not less, not more.
Compile your own version:
mkdir -p ~/src
cd ~/src
wget http://www.math.uwaterloo.ca/tsp/concorde/downloads/codes/src/co031219.tgz
tar xf co031219.tgz
cd co031219
./configure
make
There is no rule to install (make install
). All needed binaries are in subfolders of the source folder:
This builds the concorde library (concorde.a), header file (concorde.h), and several executable programs, including:
TSP/concorde the TSP solver LINKERN/linkern the Lin-Kernighan TSP heuristic EDGEGEN/edgegen generates edge sets FMATCH/fmatch solves fractional 2-matching problems
NOTE that to build the concorde TSP solver (for the exact solution of TSPs), you must specify an LP solver in the configure step (either QSopt for CPLEX).
A short help menu for each of the executable codes can be obtained by executing the code without any option, for example "concorde". A typical way to run the concorde solver is to use: "concorde myprob.tsp" where myprob.tsp is a TSP instance in TSPLIB format. To test the concorde solver run "concorde -s 99 -k 100" (this should generate and solve a random geometric TSP on 100 points).#
$ ./concorde -s 99 -k 100
./concorde -s 99 -k 100
Host: john Current process id: 6386
Using random seed 99
Random 100 point set
XSet initial upperbound to 780 (from tour)
need to link an lp solver to use this function
CClp_create_info failed
need to link an lp solver to use this function
CCtsp_read_probfile or first_lp failed
need to link an lp solver to use this function
CCtsp_init_lp failed
Nov 21, 2015 at 20:55
The instructions by @A.B. above are correct, but they do not include a description of how to install an LP solver. An LP solver is necessary to solve the TSP exactly using concorde.
To install an LP solver on Ubuntu, download the BETA version of qsopt from here: http://www.math.uwaterloo.ca/~bico/qsopt/beta/index.html (all the files listed under Red Hat Linux, gcc 3.4.3 (AMD 64-bit)) and put them in a directory on your machine. Then go to the unzipped concorde folder and run ./configure --with-qsopt=<full path to qsopt files>
making sure NOT to include a trailing / after the full path.
Next just run make
. After that, cd into TSP and try running ./concorde -s 99 -k 100
Good luck!
/usr/bin/ld: /home/bram/src/libqsopt/qsopt.a(qsopt.o): relocation R_X86_64_32 against '.rodata' can not be used when making a PIE object; recompile with -fPIE