Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

concorde: strange warning #42

Open
jakobbossek opened this issue Feb 13, 2018 · 4 comments
Open

concorde: strange warning #42

jakobbossek opened this issue Feb 13, 2018 · 4 comments
Labels

Comments

@jakobbossek
Copy link
Owner

Concorde runs fine, but there is a strange warning:

 [1] "/Users/jboss/repositories/paper/tsp_publications/TSPAS/solvers/concorde/osx/concorde -x -o file139df53849c89.sol file139df53849c89.tsp"
 [2] "Host: WL-POOL2-PNT-00750.UNI-MUENSTER.DE  Current process id: 81178"
 [3] "Using random seed 1518519704"
 [4] "Problem Name: RANDOM_n_250_cl_1_d_2_GyleqJnuNG"
 [5] "Problem Type: TSP"
 [6] "Number of Nodes: 250"
 [7] "Rounded Euclidean Norm (CC_EUCLIDEAN)"
 [8] "Set initial upperbound to 1216 (from tour)"
 [9] "  LP Value  1: 1180.750000  (0.05 seconds)"
[10] "  LP Value  2: 1200.013889  (0.14 seconds)"
[11] "  LP Value  3: 1208.000000  (0.29 seconds)"
[12] "  LP Value  4: 1214.093020  (0.47 seconds)"
[13] "  LP Value  5: 1215.325000  (0.57 seconds)"
[14] "  LP Value  6: 1215.700000  (0.68 seconds)"
[15] "  LP Value  7: 1216.000000  (0.79 seconds)"
[16] "New lower bound: 1216.000000"
[17] "Final lower bound 1216.000000, upper bound 1216.000000"
[18] "Exact lower bound: 1216.000000"
[19] "DIFF: 0.000000"
[20] "Final LP has 425 rows, 637 columns, 6424 nonzeros"
[21] "Optimal Solution: 1216.00"
[22] "Number of bbnodes: 1"
[23] "Total Running Time: 0.96 (seconds)"
attr(,"status")
[1] 255
Solver run terminated on instance RANDOM_n_250_cl_1_d_2_GyleqJnuNG.
Used solver:  CONCORDE
Elapsed time: 1.01 [seconds]
Tour length:  1216.00
Tour:         1, 196, 18, 125, 55, 150, 232, 140, 93, 15, ...
Fehler in eval(ei, envir) :
Zusätzlich: Warnmeldung:
Ausführung von Kommando ''/Users/jboss/repositories/paper/tsp_publications/TSPAS/solvers/concorde/osx/concorde' -x -o file139df53849c89.sol file139df53849c89.tsp 2>&1' ergab Status 255
@jakobbossek jakobbossek changed the title Strange warning concorde: strange warning Feb 13, 2018
@kerschke
Copy link
Contributor

I tracked it down a little bit and found out that this is caused by the system-call (and only when intern = TRUE). Unfortunately, we need this flag within system in order to capture the output of concorde... :-/
Without that flag, the call runs fine and it also runs fine from the console (i.e., without using R).

@jakobbossek
Copy link
Owner Author

O.K. As assumed it is linked with the return status of the concorde code "... If command runs but gives a non-zero exit status this will be reported with a warning and in the attribute "status" of the result: an attribute..."

@kerschke
Copy link
Contributor

I tried to check if we can avoid this bug by manually installing concorde again, but so far I did not manage to install / configure concorde appropriately.. :-/

Here's what I did (so maybe it help's someone in a later stage):

  1. According to concorde's documentation (http://www.math.uwaterloo.ca/tsp/concorde/DOC/README.html), I first downloaded the corresponding zip-file (co031219.tgz) from http://www.math.uwaterloo.ca/tsp/concorde/downloads/downloads.htm
  2. Next, I followed the instructions from concorde's documentation:
$ gunzip co031219.tgz
$ tar xvf co031219.tar
$ mkdir concorde_build
$ cd concorde_build
$ ../concorde/configure
$ make

(In my case, I received an error that I had to specify a host for configuration, so I added a corresponding flag: --host=darwin)

  1. Then, I tried to test concorde by calling ./TSP/concorde -s 99 -k 100 (as e.g., mentioned here: https://askubuntu.com/questions/700899/how-to-install-concorde-in-ubuntu-14-04-lts/700900), but unfortunately received the following error:
./TSP/concorde -s 99 -k 100
Host: WL-POOL2-PNT-00897.UNI-MUENSTER.DE  Current process id: 33262
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
  1. So, I decided to re-do the steps from above but configure concorde with a compiler (I actually was surprised I did not have to set any flags at an earlier stage). I expected QSOPT to be the easier option (compared to CPLEX), so I went to http://www.math.uwaterloo.ca/~bico/qsopt/beta/index.html (alternative: http://www.math.uwaterloo.ca/~bico/qsopt/downloads/downloads.htm) and downloaded all respective files in a separate directory.
  2. Then, I went again into configure_build, removed all the files and ran the following commands:
$ ../concorde/configure --host=darwin --with-qsopt=<FULL (non-recursive) PATH TO QSOPT>
$ make
  1. However, now the make command throws an error (see below) and as a result, the executable of concorde was not build (at least I could not find it in the respective TSP-subdirectory).
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [concorde] Error 1
make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `all'.
  1. Further research brought me to a tech report (https://www.researchgate.net/publication/320622212_Concorde_solver_installation_and_use), which suggests to run $ sudo ln -s qsopt.a libqsopt.a . in the qsopt directory (before configuring concorde), but this did not provide any further improvements..

So, as it looks right now, creating an executable of concorde on Mac OS seems to be quite complicated (even without worrying about the usage of CPLEX).

As an alternative, I tried to install it on linux and with the following steps, I succeeded:

  1. Download zip-file (co031219.tgz) from http://www.math.uwaterloo.ca/tsp/concorde/downloads/downloads.htm
  2. Downloaded qsopt-files from http://www.math.uwaterloo.ca/~bico/qsopt/beta/index.html in a separate directory.
  3. Run the following commands (as given in concorde's documentation):
$ gunzip co031219.tgz
$ tar xvf co031219.tar
$ mkdir concorde_build
$ cd concorde_build
$ ../concorde/configure --with-qsopt=<FULL (non-recursive) PATH TO QSOPT>
$ make

(interestingly, I did not need to set the host-flag this time)

  1. Now, the command ./TSP/concorde -s 99 -k 100 succeeded.

Therefore, it seems to work on linux but not on mac os :-(

@stolk
Copy link

stolk commented Nov 22, 2020

Where can you find the source code of qsopt?

I've only been able to find a 32-bit red-hat binary version of the library.

There is also libqsopt-ex-dev in Ubuntu, but I'm not sure if that's the same thing. It does not seem to be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants