I am working with ipopt running a linear solver called pardiso. Pardiso uses the system library gomp. Running it standalone works fine. No issues, so I know the ipopt/pardiso installation is correct. Now I am calling this from octave using the oct interface, and hence using mkoctfile to compile. I use the following line to compile:
mkoctfile -Wl,-rpath=/opt/ipopt/3102p/install/lib -I/opt/ipopt/3102p/install/include/coin -L/opt/ipopt/3102p/install/lib -lipopt -llapack -ldl -lcoinmumps -lpthread -lopenblas -lcoinhsl -lgfortran -lm -lgcc_s -lcoinmetis -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -lgomp -Wl,-fopenmp -Wl,/opt/ipopt/3102p/install/../libpardiso412-GNU450-X86-64.so -g -Wl,-O0 nlmpc_ad.cpp --output nlmpc_ad.oct || rm -f nlmpc_ad.oct
This compiles fine. No errors. You see that I provide the path to gomp and pardiso for linking.
When I run the code, I get :
Tried to obtain Pardiso from shared library "libpardiso.so", but the following error occured:
/opt/ipopt/3102p/libpardiso.so: undefined symbol: GOMP_loop_dynamic_next
So during runtime, pardiso does not see the GOMP library. I dont know why. When I run this stand alone (not through mkoctfile), it runs fine, and hence finds gomp fine. Do you think I missed some linking flag in mkoctfile ?
Let me know.
Thanks a lot for your help.
Kind regards,
Rishi