Opened 17 months ago

Last modified 16 months ago

#80 new installation issue

Install MA57 to solve sparse QP problems

Reported by: kribe48 Owned by: ferreau
Priority: high Milestone:
Component: C++ core Version: 3.2.0
Keywords: Cc:

Description

Hi!

I am trying to install the HSL_MA57 solver with qpOASES according to the descriptions provided in the user manual, Section 2.2. However, I get the following error when I run make:

/home/kribe48/Software/qpOASES/bin/libqpOASES.so: undefined reference to `metis_nodend_'

I have updated the make_linux.mk file according to:

# user configuration

# include directories, relative
IDIR =   ${TOP}/include
SRCDIR = ${TOP}/src
BINDIR = ${TOP}/bin

# Matlab include directory (ADAPT TO YOUR LOCAL SETTINGS!)
#MATLAB_IDIR   = ${HOME}/Programs/matlab/extern/include/
MATLAB_IDIR   = /usr/local/matlab/extern/include/
MATLAB_LIBDIR = /usr/local/matlab/bin/glnxa64/

# system or replacement BLAS/LAPACK
REPLACE_LINALG = 0

ifeq ($(REPLACE_LINALG), 1)
	LIB_BLAS =   ${SRCDIR}/BLASReplacement.o
	LIB_LAPACK = ${SRCDIR}/LAPACKReplacement.o
else
	LIB_BLAS =   /home/kribe48/Software/Ipopt/lib/libcoinblas.so
	LIB_LAPACK = /home/kribe48/Software/Ipopt/lib/libcoinlapack.so
#	LIB_BLAS = ${MATLAB_LIBDIR}/libmwblas.so
#	LIB_LAPACK = ${MATLAB_LIBDIR}/libmwlapack.so
endif

# choice of sparse solver: NONE, MA27, or MA57
# If choice is not 'NONE', BLAS and LAPACK replacements must not be used
USE_SOLVER = MA57
#USE_SOLVER = MA57

ifeq ($(USE_SOLVER), MA57)
	LIB_SOLVER = /usr/local/lib/libhsl_ma57.a
	DEF_SOLVER = SOLVER_MA57
	LINKHSL =  -Wl,-rpath=/usr/local/lib/
else ifeq ($(USE_SOLVER), MA27)
	LIB_SOLVER = /usr/local/lib/libhsl_ma27.a
	DEF_SOLVER = SOLVER_MA27
	LINKHSL =
else
	LIB_SOLVER =
	DEF_SOLVER = SOLVER_NONE
	LINKHSL =
endif

I have used HSL_MA57 5.2.0 and installed libhsl_ma57.a and libfakemetis.a in /usr/local/lib. However, it seems like I got some errors with linking towards the metis package.

Can anyone help me with this issue?

Regards, Kristoffer

Change History (1)

comment:1 Changed 16 months ago by kribe48

I managed to solve the problem, by doing the following modifications to make_linux.mk :

################################################################################
# user configuration
..
..
..
USE_SOLVER = MA57
#USE_SOLVER = MA57

ifeq ($(USE_SOLVER), MA57)
	LIB_SOLVER = /usr/local/lib/libhsl_ma57.a
	LIB_METIS = /usr/local/lib/libfakemetis.so
	DEF_SOLVER = SOLVER_MA57
	LINKHSL =  -Wl,-rpath=/usr/local/lib/
else ifeq ($(USE_SOLVER), MA27)
	LIB_SOLVER = /usr/local/lib/libhsl_ma27.a
	DEF_SOLVER = SOLVER_MA27
	LINKHSL =
else
	LIB_SOLVER =
	DEF_SOLVER = SOLVER_NONE
	LINKHSL =
endif
..
..
################################################################################
# do not touch this
..
..
..
# libraries to link against when building qpOASES .so files
LINK_LIBRARIES = ${LIB_LAPACK} ${LIB_BLAS} ${LIB_METIS} -lm ${LIB_SOLVER}

Hence, the solution was to provide the location of the metis-package.

Regards, Kristoffer

Note: See TracTickets for help on using tickets.