taucs with multithreaded debug dll option

499 views
Skip to first unread message

guerrera_desesperada

unread,
Feb 10, 2009, 1:15:39 PM2/10/09
to matrixprogramming
Hi,
I want to use the taucs library in my visual studio project. The
settings for my project include the "multithreaded debug dll" option.
However, with this option I get link errors when I include the taucs
libraries. The reason I must choose the "multithreaded debug dll"
option is that, I am using C++/CLI and therefore I have to include
"Common Language Runtime"(CLR) and this option is the only one
compatible with CLR. Have you ever tried to use taucs with
"multithreaded debug dll" option as well? I would really appreaciate
your help because I am stucked in this problem almost for a week...

Thanks...

Alejandro A. Ortiz Bernardin

unread,
Feb 10, 2009, 4:05:18 PM2/10/09
to matrixpr...@googlegroups.com
Hi, this question was discussed few days ago here:

http://groups.google.com/group/matrixprogramming/browse_thread/thread/896526
c70acd1c36?hl=en



-----Mensaje original-----
De: matrixpr...@googlegroups.com
[mailto:matrixpr...@googlegroups.com] En nombre de
guerrera_desesperada
Enviado el: Tuesday, February 10, 2009 10:16 AM
Para: matrixprogramming
Asunto: [matrixprogramming] taucs with multithreaded debug dll option

Olumide

unread,
Feb 10, 2009, 11:19:14 PM2/10/09
to matrixprogramming
I'm the one that started a thread about this last week (see
http://tinyurl.com/dxl4ew ). I've included a few lines of TAUCS code
in my program and it compiles fine *with the /MDd option*. I didn't
run the program, neither have I written anything substantial in TAUCS,
but I hope to do so in the next few days. I've pretty much decided
that if TAUCS doesn't work, I'll switch to MUMPS. I'll be interested
to know what you learn.

- Olumide

guerrera_desesperada

unread,
Feb 11, 2009, 2:33:00 AM2/11/09
to matrixprogramming
I have read the previous messages about the same thread. I also
included the code lines you have mentioned. However I still get
linking errors when I call a function from the TAUCS library.

On 11 Feb, 06:19, Olumide <50...@web.de> wrote:
> > I want to use the taucs library in my visual studio project. The
> > settings for my project include the "multithreaded debug dll" option.
> > However, with this option I get link errors when I include the taucs
> > libraries. The reason I must choose the "multithreaded debug dll"
> > option is that, I am using C++/CLI and therefore I have to include
> > "Common Language Runtime"(CLR) and this option is the only one
> > compatible with CLR. Have you ever tried to use taucs with
> > "multithreaded debug dll" option as well? I would really appreaciate
> > your help because I am stucked in this problem almost for a week...
>
> I'm the one that started a thread about this last week (seehttp://tinyurl.com/dxl4ew). I've included a few lines of TAUCS code

Olumide

unread,
Feb 11, 2009, 10:46:07 AM2/11/09
to matrixprogramming
On 11 Feb, 07:33, guerrera_desesperada <duygu.cey...@gmail.com> wrote:
> I have read the previous messages about the same thread. I also
> included the code lines you have mentioned. However I still get
> linking errors when I call a function from the TAUCS library.

What version of VS .NET are you working with? I'm using the 2003
version.

I so little about the intricacies of libraries (I'm just a humble
programmer) but I use a good number of libraries in my project and I
don't think they all the libraries I used were compiled with the /MDd
option. What I'm trying to say, is that my experience seems to
*suggest* that a library need not be compiled with the /MDd option in
order to be used in a project that is to be compiled as /MDd.

Of course, I may talking nonsense, in which case I welcome any
corrections on this line of thinking.

Evgenii Rudnyi

unread,
Feb 11, 2009, 1:30:16 PM2/11/09
to matrixpr...@googlegroups.com
guerrera_desesperada schrieb:

> I have read the previous messages about the same thread. I also
> included the code lines you have mentioned. However I still get
> linking errors when I call a function from the TAUCS library.

Could you please describe in more detail what you have done and what
linking errors do you receive?

Duygu Ceylan

unread,
Feb 11, 2009, 3:56:51 PM2/11/09
to matrixpr...@googlegroups.com
I am using Microsoft Visual Studio 2005. I have included the libraries
(libtaucs.lib,blas_win32.lib,lapack_win32.lib,libatlas.lib,libcblas.lib,libf77blas.lib,liblapack.lib,libmetis.lib,vcf2c.lib)
and their directories in my project settings. Code generation setting is
set to "Multithreaded Debug Dll". Finally, I have ignored "libcmt.lib".

I have included the following lines of code in my source code:

extern "C" {
#include <taucs.h>
}

And I am calling the "taucs_linsolve" function. The linking errors I am
getting are:
1>vcf2c.lib(main.obj) : error LNK2019: unresolved external symbol
_MAIN__ referenced in function _main
1>vcf2c.lib(fmt.obj) : error LNK2001: unresolved external symbol __iob
1>vcf2c.lib(wrtfmt.obj) : error LNK2001: unresolved external symbol __iob
1>vcf2c.lib(err.obj) : error LNK2019: unresolved external symbol __iob
referenced in function _f__fatal
1>vcf2c.lib(sig_die.obj) : error LNK2001: unresolved external symbol __iob
1>libmetis.lib(util.obj) : error LNK2001: unresolved external symbol __iob
1>vcf2c.lib(s_stop.obj) : error LNK2001: unresolved external symbol __iob
1>vcf2c.lib(wref.obj) : error LNK2019: unresolved external symbol
__pctype referenced in function _wrt_E
1>vcf2c.lib(wref.obj) : error LNK2019: unresolved external symbol
___mb_cur_max referenced in function _wrt_E

When I do not ignore libcmt.lib I get the following errors:
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in
MSVCRTD.lib(MSVCR80D.dll)
1>LIBCMT.lib(fflush.obj) : error LNK2005: _fflush already defined in
MSVCRTD.lib(MSVCR80D.dll)
1>LIBCMT.lib(dosmap.obj) : error LNK2005: __errno already defined in
MSVCRTD.lib(MSVCR80D.dll)
1>LIBCMT.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)"
(?terminate@@YAXXZ) already defined in MSVCRTD.lib(MSVCR80D.dll)
1>LIBCMT.lib(winsig.obj) : error LNK2005: _signal already defined in
MSVCRTD.lib(MSVCR80D.dll)
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of
other libs; use /NODEFAULTLIB:library
1>LIBCMT.lib(unlink.obj) : error LNK2005: _remove already defined in
MSVCRTD.lib(MSVCR80D.dll)

When I ignore MSVCRTD.lib instead of libcmt.lib, I gel these errors:
1>MSVCMRTD.lib(mstartup.obj) : error LNK2020: unresolved token
(0A00008E) __native_vcclrit_reason
1>MSVCMRTD.lib(mstartup.obj) : error LNK2020: unresolved token
(0A000094) __native_startup_state
1>MSVCMRTD.lib(mstartup.obj) : error LNK2020: unresolved token
(0A0000E3) __native_startup_lock
1>MSVCMRTD.lib(mstartup.obj) : error LNK2020: unresolved token
(0A0000E4) __native_dllmain_reason
1>vcf2c.lib(main.obj) : error LNK2019: unresolved external symbol
_MAIN__ referenced in function _main
1>MSVCMRTD.lib(mstartup.obj) : error LNK2001: unresolved external symbol
___native_dllmain_reason
1>MSVCMRTD.lib(mstartup.obj) : error LNK2001: unresolved external symbol
___native_vcclrit_reason
1>MSVCMRTD.lib(mstartup.obj) : error LNK2001: unresolved external symbol
___native_startup_state
1>MSVCMRTD.lib(mstartup.obj) : error LNK2001: unresolved external symbol
___native_startup_lock

Evgenii Rudnyi

unread,
Feb 11, 2009, 4:13:52 PM2/11/09
to matrixpr...@googlegroups.com
Duygu Ceylan schrieb:

> I am using Microsoft Visual Studio 2005. I have included the libraries
> (libtaucs.lib,blas_win32.lib,lapack_win32.lib,libatlas.lib,libcblas.lib,libf77blas.lib,liblapack.lib,libmetis.lib,vcf2c.lib)
> and their directories in my project settings. Code generation setting is
> set to "Multithreaded Debug Dll". Finally, I have ignored "libcmt.lib".
>
> I have included the following lines of code in my source code:
>
> extern "C" {
> #include <taucs.h>
> }
>
> And I am calling the "taucs_linsolve" function. The linking errors I am
> getting are:
> 1>vcf2c.lib(main.obj) : error LNK2019: unresolved external symbol
> _MAIN__ referenced in function _main
> 1>vcf2c.lib(fmt.obj) : error LNK2001: unresolved external symbol __iob
> 1>vcf2c.lib(wrtfmt.obj) : error LNK2001: unresolved external symbol __iob
> 1>vcf2c.lib(err.obj) : error LNK2019: unresolved external symbol __iob
> referenced in function _f__fatal
> 1>vcf2c.lib(sig_die.obj) : error LNK2001: unresolved external symbol __iob
> 1>libmetis.lib(util.obj) : error LNK2001: unresolved external symbol __iob
> 1>vcf2c.lib(s_stop.obj) : error LNK2001: unresolved external symbol __iob
> 1>vcf2c.lib(wref.obj) : error LNK2019: unresolved external symbol
> __pctype referenced in function _wrt_E
> 1>vcf2c.lib(wref.obj) : error LNK2019: unresolved external symbol
> ___mb_cur_max referenced in function _wrt_E

Looks like you need to recompile METIS and vcf2c under /MD. From what
you have written I do not see another option.

If I take

http://matrixprogramming.com/TAUCS/src/test_taucs.cpp

and find a way on how to compile it under /MD, will it be a solution for
your problem? If not, could you please set up an another test problem?

I will try to do it over the weekend.

Evgenii Rudnyi

unread,
Feb 14, 2009, 8:32:12 AM2/14/09
to matrixpr...@googlegroups.com
> If I take
>
> http://matrixprogramming.com/TAUCS/src/test_taucs.cpp
>
> and find a way on how to compile it under /MD, will it be a solution for
> your problem? If not, could you please set up an another test problem?

So I have looked at this problem and I can suggest you some solution.
Let us start with test_taucs.cpp. When I compile it under -MD

$ cl -c -Isrc -Ibuild/win32 -EHsc -MD test_taucs.cpp

and then try to link with the libraries

$ cl test_taucs.obj libtaucs.lib libmetis.lib liblapack.lib libf77
blas.lib libcblas.lib libatlas.lib vcf2c.lib -link -LIBPATH:lib/win32
-LIBPATH:external/lib/win32

I receive the same error about the incompatibility between LIBCMT and
MSVCRT. If I tell the linker not to use LIBCMT

$ cl test_taucs.obj libtaucs.lib libmetis.lib liblapack.lib libf77
blas.lib libcblas.lib libatlas.lib vcf2c.lib -link -LIBPATH:lib/win32
-LIBPATH:external/lib/win32 -NODEFAULTLIB:LIBCMT.lib

then the linker cannot find some symbols defined in libmetis.lib and
vcf2c.lib. One can check with nm that these symbols are not in MSVCRT
indeed but they do exist in LIBCMT. As we cannot use these two libraries
together this means that we need to recompile the libraries.

It is relatively easy to recompile METIS with -MD. I have written
instructions to this end at

http://matrixprogramming.com/METIS/

Well, you need to install Cygwin to have GNU Make but I guess that this
will be faster as to modify the makefile for MS nmake.

With the optimized BLAS (liblapack.lib libf77 blas.lib libcblas.lib
libatlas.lib vcf2c.lib) the things are more complicated. There are
several options.

1) To use ATLAS compiled with gcc under cygwin. The libraries under
-mno-cygwin are compatible with MS VC. See

http://matrixprogramming.com/UMFPACK/

Sections Compiling under MinGW and Using UMFPACK with Microsoft Visual
Studio.

It could be also possible to ask the ATLAS team on how to compile it
under MS Visual C.

2) To use AMD AMCL. It is free but you have to register to download it

http://developer.amd.com/cpu/Libraries/acml/Pages/default.aspx

Be careful to choose the right AMCL version that matches your version of
the MS Visual C. I will give instructions on how to compile TAUCS to use
it with AMCL below.

3) To use Intel MKL. It is not free but it is pretty good. By the way,
it has the PARDISO solver built in. You will need to compile TAUCS the
same way as for AMCL. If you need more instruction in this respect, please.

So, what is the problem between TAUCS and AMCL/MKL? TAUCS expects that
the BLAS function names are low case. It checks if one needs an extra
underscore at the end but it assumes that the functions are in low case.
This is not the case in AMCL/MKL - the BLAS functions there are in upper
case. Hence we have to tell TAUCS to use BLAS functions in upper case as
well. I have put some files that should be modified

http://matrixprogramming.com/TAUCS/BLASuppercase/

1) src/taucs.h

It was necessary to edit it to tell TAUCS that the BLAS names are
upper-case.

2) progs/taucs_blas_nounderscore_test.c

This file is used during TAUCS tests and the BLAS function name has to
be modified here as well.

3) config/win32.mk

It is necessary to specify new location of the libraries. It is assumed
that METIS and ACLM are in external/new

LIBBLAS = external\\new\\libacml.lib
LIBMETIS = external\\new\\libmetis.lib

When these files are changes, the new TAUCS library should use the BLAS
functions in upper case and the command

$ cl test_taucs.obj libtaucs.lib libmetis.lib libacml.lib -link
-LIBPATH:lib/win32 -LIBPATH:external/new

should work.

Once more, the life is not that simple but after all it is not that
complicated either. What is just necessary to understand what is going
on. It also makes sense to invest time to learn about the optimized
BLAS. All solvers depend on it. Without it the performance will be much
worse.

Try to repeat the process and if you will see problems, please ask.

Duygu Ceylan

unread,
Feb 15, 2009, 5:14:02 AM2/15/09
to matrixpr...@googlegroups.com
Hi,
First of all thanks for the explaining answer. I have rebuilt the
libmetis.lib sucessfully. (By the way, I had a trouble calling the
visual studio compiler cl.exe from cygwin command prompt. Instead I
entered the commands included in the makefiles of metis from visual
studio command prompt and the library was successfully built.) In order
to rebuild blas, I chose the second option you have provided. I
downloaded AMCL and replaced the files youu have mentioned in taucs.
However I was not able to compile taucs successfully. I got the
following linking errors:

1>libtaucs.lib(taucs_vec_base.obj) : error LNK2001: unresolved external
symbol _scnrm2_
1>libtaucs.lib(taucs_vec_base.obj) : error LNK2001: unresolved external
symbol _dznrm2_
1>libtaucs.lib(taucs_vec_base.obj) : error LNK2001: unresolved external
symbol _snrm2_
1>libtaucs.lib(taucs_vec_base.obj) : error LNK2001: unresolved external
symbol _dnrm2_
1>libtaucs.lib(taucs_sn_llt_C.obj) : error LNK2001: unresolved external
symbol _CHERK_
1>libtaucs.lib(taucs_ccs_ooc_llt_C.obj) : error LNK2001: unresolved
external symbol _CHERK_
1>libtaucs.lib(taucs_sn_llt_C.obj) : error LNK2001: unresolved external
symbol _CTRSM_
1>libtaucs.lib(taucs_ccs_ooc_llt_C.obj) : error LNK2001: unresolved
external symbol _CTRSM_
1>libtaucs.lib(taucs_sn_llt_C.obj) : error LNK2001: unresolved external
symbol _CPOTRF_
1>libtaucs.lib(taucs_ccs_ooc_llt_C.obj) : error LNK2001: unresolved
external symbol _CPOTRF_
1>libtaucs.lib(taucs_sn_llt_C.obj) : error LNK2001: unresolved external
symbol _CGEMM_
1>libtaucs.lib(taucs_ccs_ooc_llt_C.obj) : error LNK2001: unresolved
external symbol _CGEMM_
1>libtaucs.lib(taucs_sn_llt_Z.obj) : error LNK2001: unresolved external
symbol _ZHERK_
1>libtaucs.lib(taucs_ccs_ooc_llt_Z.obj) : error LNK2001: unresolved
external symbol _ZHERK_
1>libtaucs.lib(taucs_sn_llt_Z.obj) : error LNK2001: unresolved external
symbol _ZTRSM_
1>libtaucs.lib(taucs_ccs_ooc_llt_Z.obj) : error LNK2001: unresolved
external symbol _ZTRSM_
1>libtaucs.lib(taucs_sn_llt_Z.obj) : error LNK2001: unresolved external
symbol _ZPOTRF_
1>libtaucs.lib(taucs_ccs_ooc_llt_Z.obj) : error LNK2001: unresolved
external symbol _ZPOTRF_
1>libtaucs.lib(taucs_sn_llt_Z.obj) : error LNK2001: unresolved external
symbol _ZGEMM_
1>libtaucs.lib(taucs_ccs_ooc_llt_Z.obj) : error LNK2001: unresolved
external symbol _ZGEMM_
1>libtaucs.lib(taucs_sn_llt_S.obj) : error LNK2001: unresolved external
symbol _SSYRK_
1>libtaucs.lib(taucs_ccs_ooc_llt_S.obj) : error LNK2001: unresolved
external symbol _SSYRK_
1>libtaucs.lib(taucs_sn_llt_S.obj) : error LNK2001: unresolved external
symbol _STRSM_
1>libtaucs.lib(taucs_ccs_ooc_llt_S.obj) : error LNK2001: unresolved
external symbol _STRSM_
1>libtaucs.lib(taucs_sn_llt_S.obj) : error LNK2001: unresolved external
symbol _SPOTRF_
1>libtaucs.lib(taucs_ccs_ooc_llt_S.obj) : error LNK2001: unresolved
external symbol _SPOTRF_
1>libtaucs.lib(taucs_sn_llt_S.obj) : error LNK2001: unresolved external
symbol _SGEMM_
1>libtaucs.lib(taucs_ccs_ooc_llt_S.obj) : error LNK2001: unresolved
external symbol _SGEMM_
1>libtaucs.lib(taucs_sn_llt_D.obj) : error LNK2001: unresolved external
symbol _DSYRK_
1>libtaucs.lib(taucs_ccs_ooc_llt_D.obj) : error LNK2001: unresolved
external symbol _DSYRK_
1>libtaucs.lib(taucs_sn_llt_D.obj) : error LNK2001: unresolved external
symbol _DTRSM_
1>libtaucs.lib(taucs_ccs_ooc_llt_D.obj) : error LNK2001: unresolved
external symbol _DTRSM_
1>libtaucs.lib(taucs_sn_llt_D.obj) : error LNK2001: unresolved external
symbol _DPOTRF_
1>libtaucs.lib(taucs_ccs_ooc_llt_D.obj) : error LNK2001: unresolved
external symbol _DPOTRF_
1>libtaucs.lib(taucs_sn_llt_D.obj) : error LNK2001: unresolved external
symbol _DGEMM_
1>libtaucs.lib(taucs_ccs_ooc_llt_D.obj) : error LNK2001: unresolved
external symbol _DGEMM_

Do you have any idea about these errors?

Evgenii Rudnyi yazm?s,:

Evgenii Rudnyi

unread,
Feb 15, 2009, 5:33:24 AM2/15/09
to matrixpr...@googlegroups.com
> First of all thanks for the explaining answer. I have rebuilt the
> libmetis.lib sucessfully. (By the way, I had a trouble calling the
> visual studio compiler cl.exe from cygwin command prompt.

What problems did you have? From cygwin you cannot use backslash - it
plays the role of the escape character. But it happens that cl
understand slash instead. Then to specify flags just use not slash but
minus. This is what I do.

Well, I use tcsh and be default Cygwin uses bash. It could be that there
are some subtle differences between them. Again if you write what
problem you had, I could check. I like Cygwin more than cmd, as the
scripting capabilities are much more flexible.

Instead I
> entered the commands included in the makefiles of metis from visual
> studio command prompt and the library was successfully built.) In order
> to rebuild blas, I chose the second option you have provided. I
> downloaded AMCL and replaced the files youu have mentioned in taucs.
> However I was not able to compile taucs successfully. I got the
> following linking errors:
>
> 1>libtaucs.lib(taucs_vec_base.obj) : error LNK2001: unresolved external
> symbol _scnrm2_
> 1>libtaucs.lib(taucs_vec_base.obj) : error LNK2001: unresolved external
> symbol _dznrm2_
> 1>libtaucs.lib(taucs_vec_base.obj) : error LNK2001: unresolved external
> symbol _snrm2_
> 1>libtaucs.lib(taucs_vec_base.obj) : error LNK2001: unresolved external
> symbol _dnrm2_

These function names are still in low case. I will check why I did not
have this problem.

> 1>libtaucs.lib(taucs_sn_llt_C.obj) : error LNK2001: unresolved external
> symbol _CHERK_

This function and below has underscore at the end. Something went wrong.
You can check build\win32\taucs_config_tests.h. It should have

#define TAUCS_BLAS_NOUNDERSCORE

and it seems that this is not what you have by you.

Presumably this file has not been delete from the previous compile and
something was wrong when TAUCS has made this check.

I will check my procedure once more later today. I have done it fast and
it could be that something was not quite correct.

Evgenii Rudnyi

unread,
Feb 15, 2009, 5:43:55 AM2/15/09
to matrixpr...@googlegroups.com
> 1>libtaucs.lib(taucs_vec_base.obj) : error LNK2001: unresolved external
> symbol _scnrm2_
> 1>libtaucs.lib(taucs_vec_base.obj) : error LNK2001: unresolved external
> symbol _dznrm2_
> 1>libtaucs.lib(taucs_vec_base.obj) : error LNK2001: unresolved external
> symbol _snrm2_
> 1>libtaucs.lib(taucs_vec_base.obj) : error LNK2001: unresolved external
> symbol _dnrm2_

I have checked. My version of AMCL has these functions in low case in
addition to upper case

$ nm external/new/libacml.lib | grep nrm

dnrm2.obj:
dnrm2_cw.obj:
00000000 T _dnrm2
dznrm2.obj:
dznrm2_cw.obj:
00000000 T _dznrm2
scnrm2.obj:
scnrm2_cw.obj:
00000000 T _scnrm2
snrm2.obj:
snrm2_cw.obj:
00000000 T _snrm2

So, the problem could be not the low case but the underscore at the end.
However, my version of AMCL is not the latest and if you will need to
have these function in upper case please just change the following lines
in taucs.h

$ grep -i nrm src/taucs.h
taucs_double taucs_blas_name(dnrm2)(int*, taucs_double*, int*);
taucs_single taucs_blas_name(snrm2)(int*, taucs_single*, int*);
taucs_double taucs_blas_name(dznrm2)(int*, taucs_dcomplex*, int*);
taucs_single taucs_blas_name(scnrm2)(int*, taucs_scomplex*, int*);

to

taucs_double taucs_blas_name(DNRM2)(int*, taucs_double*, int*);

and so on. I have forgotten to do it.

Duygu Ceylan

unread,
Feb 15, 2009, 5:50:13 AM2/15/09
to matrixpr...@googlegroups.com
Evgenii Rudnyi yazm?s,:
I had trouble calling cl.exe from cygwin. When I typed "make", cl.exe
stopped working due to an error. But I did build libmetis.lib from Visual
Studio command prompt.

I checked build\win32\taucs_config_tests.h and as you have mentioned the
file was not up to date. I modified it to include "#define
TAUCS_BLAS_NOUNDERSCORE" and tried to rebuild taucs. This is the error I
am getting now:

LINK: fatal error LNK1104: cannot open file "ifconsol.lib"

Is this file related to blas?

Evgenii Rudnyi

unread,
Feb 15, 2009, 7:58:37 AM2/15/09
to matrixpr...@googlegroups.com
Duygu Ceylan schrieb:
...

> I checked build\win32\taucs_config_tests.h and as you have mentioned the
> file was not up to date. I modified it to include "#define
> TAUCS_BLAS_NOUNDERSCORE" and tried to rebuild taucs. This is the error I
> am getting now:
>
> LINK: fatal error LNK1104: cannot open file "ifconsol.lib"
>
> Is this file related to blas?

It seems that AMCL has been compiled with the Intel compiler and depends
on some libraries from it. With MS Visual C it is not that easy to
understand all dependencies as they do it implicitly. The library has a
list of libraries on which it depends written in the lib file. On the
other hand, the libraries are searched automatically with the use of
INCLUDE environmental variable. So with my configuration everything
happened automatically and I have not even mentioned it. It is good to
check the AMCL docs. I have been working lately mostly with Intel MKL
and do not remember everything about AMCL anymore. The simplest way is
to check if the AMCL distribution includes Intel libraries, well, this
actually should be the case, and then to add this path to INCLUDE or
copy them with the AMCL library.

Evgenii Rudnyi

unread,
Feb 15, 2009, 9:42:35 AM2/15/09
to matrixpr...@googlegroups.com
Duygu Ceylan schrieb:
...

> I checked build\win32\taucs_config_tests.h and as you have mentioned the
> file was not up to date. I modified it to include "#define
> TAUCS_BLAS_NOUNDERSCORE" and tried to rebuild taucs. This is the error I
> am getting now:
>
> LINK: fatal error LNK1104: cannot open file "ifconsol.lib"
>
> Is this file related to blas?

I have made more checks. I still do not remember how I have linked with
libacml.lib earlier. Probably I had already then the Intel Fortran
installed.

When I redefine $LIB (not $INCLUDE - it was my mistake in the previous
email)

$ echo $LIB
C:\Programme\Microsoft Visual Studio 8\VC\LIB;C:\Programme\Microsoft
Visual Studio 8\SDK\v2.0\lib;C:\Programme\Microsoft Platform
SDK\Lib;C:\Programme\Intel\Compiler\Fortran\10.0.025\IA32\Lib;C:\Programme\Intel\MKL\10.0.012\ia32\lib

without the path to the Intel compiler

$ setenv LIB "C:\Programme\Microsoft Visual Studio
8\VC\LIB;C:\Programme\Microsoft Visual Studio
8\SDK\v2.0\lib;C:\Programme\Microsoft Platform SDK\Lib"

then I see your problem when I am linking with libacml.lib

$ cl test_taucs.obj libtaucs.lib libmetis.lib libacml.lib -link
-LIBPATH:lib/win32 -LIBPATH:external/new

The trick with strings shows that libacml.lib depends on many Intel libs

$ strings external/new/libacml.lib | grep default
...
B-defaultlib:ifconsol -defaultlib:libifcoremd -defaultlib:libifportmd
-defaultli
b:libmmd -defaultlib:MSVCRT -defaultlib:libirc -defaultlib:OLDNAMES
-defaultlib:
ifconsol -defaultlib:libifcoremd -defaultlib:libifportmd
-defaultlib:libmmd -def
aultlib:MSVCRT -defaultlib:libirc -defaultlib:OLDNAMES WVUS

so this is not an option if you do not have Intel Fortran installed.
These libs are not supplied with ACML. It seems that they assume that
you will use Intel Fortran. However, what is working is linking with
libacml_dll.lib instead. Copy all libraries from amd32/ifort32/lib to
external/new

$ ls external/new
libacml.lib libacml_dll.lib libmetis.lib
libacml_dll.dll libifcoremd.dll libmmd.dll

Now

$ cl test_taucs.obj libtaucs.lib libmetis.lib libacml_dll.lib -link
-LIBPATH:lib/win32 -LIBPATH:external/new

should work. The executable depends on the ACML and Intel DLLs

$ cygcheck ./test_taucs.exe
.\test_taucs.exe
external\new\libacml_dll.dll
external\new\libifcoremd.dll
C:\WINDOWS\system32\MSVCRT.dll
C:\WINDOWS\system32\KERNEL32.dll
C:\WINDOWS\system32\ntdll.dll
C:\WINDOWS\system32\IMAGEHLP.dll
external\new\libmmd.dll

but it is just necessary to put this directory on the path to be able to
run the executable

setenv PATH external/new:"$PATH"

and by me everything is working. So, just use libacml_dll.lib for
linking. By the way, I have checked - I have used AMCL 3.6 with MS VC
2005 - acml3.6.0-32-ifort.exe.

Well, work with libraries requires some logistics.

Duygu Ceylan

unread,
Feb 15, 2009, 11:24:14 AM2/15/09
to matrixpr...@googlegroups.com
As you have told, I copied all libraries from amd32/ifort32/lib and
linked only with libacml_dll.lib. I have successfully compiled
test_taucs.exe however, when I tried to run it the application closes
due to an error. I have also tried the command cygcheck and here's what
I get :

$ cygcheck ./test_taucs.exe
.\test_taucs.exe
external\new\libacml_dll.dll
external\new\libifcoremd.dll
C:\WINDOWS\system32\MSVCRT.dll
C:\WINDOWS\system32\KERNEL32.dll
C:\WINDOWS\system32\ntdll.dll
C:\WINDOWS\system32\IMAGEHLP.dll
external\new\libmmd.dll

Error: Could not find MSVCR90.dll
Error: Could not find MSVCR80.dll

I also checked my acml version, it is acml4.2.0-32-ifort.exe. I will try
to find the exe you have installed now.

Evgenii Rudnyi yazm?s,:

Evgenii Rudnyi

unread,
Feb 15, 2009, 12:20:50 PM2/15/09
to matrixpr...@googlegroups.com
Duygu Ceylan schrieb:

> As you have told, I copied all libraries from amd32/ifort32/lib and
> linked only with libacml_dll.lib. I have successfully compiled
> test_taucs.exe however, when I tried to run it the application closes
> due to an error. I have also tried the command cygcheck and here's what
> I get :
>
> $ cygcheck ./test_taucs.exe
> .\test_taucs.exe
> external\new\libacml_dll.dll
> external\new\libifcoremd.dll
> C:\WINDOWS\system32\MSVCRT.dll
> C:\WINDOWS\system32\KERNEL32.dll
> C:\WINDOWS\system32\ntdll.dll
> C:\WINDOWS\system32\IMAGEHLP.dll
> external\new\libmmd.dll
>
> Error: Could not find MSVCR90.dll
> Error: Could not find MSVCR80.dll
>
> I also checked my acml version, it is acml4.2.0-32-ifort.exe. I will try
> to find the exe you have installed now.

What error do you receive when you run the application? Everything is
correct now. These two messages

> Error: Could not find MSVCR90.dll
> Error: Could not find MSVCR80.dll

you can ignore. These are two run-time MS DLL and there is another
mechanism to find it (through the manifest file). The problems start
when you move the application to another computer - then you need to
install MS run-time libraries there. Yet I presume that you do
everything on the same computer.

To be safe copy all dlls from external/new to the application and try to
start it from cmd or just double click it in explorer. Sometimes cygwin
prevents to have the right error message.

Duygu Ceylan

unread,
Feb 15, 2009, 12:34:01 PM2/15/09
to matrixpr...@googlegroups.com
The error I am getting is:

"The application could not be initialized correctly (0xc0150002)"

By the way, I had copied the dll files next to exe priorily. By the way
I am working on Windows Vista, could that be a problem?
Evgenii Rudnyi yazmış:

Evgenii Rudnyi

unread,
Feb 15, 2009, 2:28:35 PM2/15/09
to matrixpr...@googlegroups.com
Duygu Ceylan schrieb:

> The error I am getting is:
>
> "The application could not be initialized correctly (0xc0150002)"
>
> By the way, I had copied the dll files next to exe priorily. By the way
> I am working on Windows Vista, could that be a problem?

I would say that this is a typical error when the run time libraries are
not installed correctly. Can you compile and run any /MD application at all?

I do not think Vista is a problem.

Do you have a manifest file - that is, test_taucs.exe.manifest?

More information about this for example at

http://www.codeproject.com/KB/cpp/vcredists_x86.aspx

but usually it happens when one tries to run the compiled application at
another computer.

I would start with compiling a sample application, say Hello World with
/MD and see if it is working. If not, then you have to install the run
time libraries. I think there should be a link to them on the page
above. They should have been installed automatically with MS VC but ...

If Hello World is working, then it is necessary to find a difference
when you compile the TAUCS example. Well, it could be some other reasons
as well. Anyway first is to check what happens with other /MD
applications and with the manifest files.

Duygu Ceylan

unread,
Feb 15, 2009, 3:43:50 PM2/15/09
to matrixpr...@googlegroups.com
My application was working properly with /MD option until I tried to add
taucs. In addition, I ported the libraries to Windows XP and there a
sample application of taucs worked. However, I really needed it to work
it on Vista.
Evgenii Rudnyi yazmış:

Evgenii Rudnyi

unread,
Feb 15, 2009, 3:51:29 PM2/15/09
to matrixpr...@googlegroups.com
Duygu Ceylan schrieb:

> My application was working properly with /MD option until I tried to add
> taucs. In addition, I ported the libraries to Windows XP and there a
> sample application of taucs worked. However, I really needed it to work
> it on Vista.

Let us do it slowly to make me understand what happens. Could you please
split the next statements to right and wrong?

Compilation of a simple application with /MD is working on Windows XP.

Compilation of a simple application with /MD is working on Vista.

Compilation of taucs_test.exe with /MD is working on Windows XP.

Compilation of taucs_test.exe with /MD is working on Vista.

With computers there are many things that can go wrong - the goal is to
understand when exactly it starts going wrong.

Duygu Ceylan

unread,
Feb 15, 2009, 4:03:02 PM2/15/09
to matrixpr...@googlegroups.com
Compilation phase works both on XP and Vista however, there are problems while running the application.

Compilation of a simple application with /MD is working on Windows XP. Application runs successfully.

Compilation of a simple application with /MD is working on Vista. Both compilation and running works.Application runs successfully.

Compilation of taucs_test.exe with /MD is working on Windows XP. Application runs successfully.

Compilation of taucs_test.exe with /MD is working on Vista. Application fails.


Evgenii Rudnyi yazmış:

Evgenii Rudnyi

unread,
Feb 15, 2009, 4:39:13 PM2/15/09
to matrixpr...@googlegroups.com
Duygu Ceylan schrieb:

> Compilation phase works both on XP and Vista however, there are problems while running the application.
>
> Compilation of a simple application with /MD is working on Windows XP. Application runs successfully.
>
> Compilation of a simple application with /MD is working on Vista. Both compilation and running works.Application runs successfully.
>
> Compilation of taucs_test.exe with /MD is working on Windows XP. Application runs successfully.
>
> Compilation of taucs_test.exe with /MD is working on Vista. Application fails.

I am glad to here that on XP everything is working. This shows that
everything is okay with the libraries. Actually you do not have to
recompile libraries for XP and Vista, I would expect them to be the same.

It seems that there are some problems with the runtime libs on Vista.
You can check what is written in the manifest. Compare the manifests on
XP and Vista.

Alternatively one can copy the application from XP to Vista. It requires
some more efforts but I was able to do it. This is described in

http://www.codeproject.com/KB/cpp/vcredists_x86.aspx

I was able to do it with my command line application that uses TAUCS.

What if you install the latest runtime libs on Vista? I think this could
be a good starting point. Then check what is in the manifests - what is
the difference between XP and Vista. It could be good to compare the
manifests for the simple application and taucs_test.exe as well.

duygu ceylan

unread,
Feb 16, 2009, 5:40:17 AM2/16/09
to matrixpr...@googlegroups.com
I have compared the manifest files both on XP and Vista, they seem to be the same. Now I am going to try copying the application from XP to Vista, I hope it works... 

Evgenii Rudnyi

unread,
Feb 16, 2009, 1:31:07 PM2/16/09
to matrixpr...@googlegroups.com
duygu ceylan schrieb:

> I have compared the manifest files both on XP and Vista, they seem to be the
> same. Now I am going to try copying the application from XP to Vista, I
> hope it works...

If the manifests are the same, then something is wrong with the run-time
library on Vista. It certainly should be possible to copy the
application from XP, but you have to include the run-time libs as well.
Well, it is good to learn anyway, as at some point you will probably
need to distribute your application.

Duygu Ceylan

unread,
Feb 16, 2009, 3:17:34 PM2/16/09
to matrixpr...@googlegroups.com
I couldn't solve this problem and because I have limited amount of time,
I decided to try the first option you have mentioned in your previous
emails about rebuilding blas:

1) To use ATLAS compiled with gcc under cygwin. The libraries under
-mno-cygwin are compatible with MS VC. See

http://matrixprogramming.com/UMFPACK/

Sections Compiling under MinGW and Using UMFPACK with Microsoft Visual
Studio.

It could be also possible to ask the ATLAS team on how to compile it
under MS Visual C.

I have successfully generated the libs according to the instructions on
the web site and linked libamd.lib, libatlas.lib, libf77blas.lib,
libg2c.lib, libgcc.lib, libumfpack.lib to my project. I am getting the
following errors:

1>libtaucs.lib(taucs_sn_llt_C.obj) : error LNK2019: unresolved external
symbol _cpotrf_ referenced in function _multifrontal_supernodal_front_factor
1>libtaucs.lib(taucs_ccs_ooc_llt_C.obj) : error LNK2001: unresolved
external symbol _cpotrf_
1>libtaucs.lib(taucs_sn_llt_Z.obj) : error LNK2019: unresolved external
symbol _zpotrf_ referenced in function _multifrontal_supernodal_front_factor
1>libtaucs.lib(taucs_ccs_ooc_llt_Z.obj) : error LNK2001: unresolved
external symbol _zpotrf_
1>libtaucs.lib(taucs_sn_llt_S.obj) : error LNK2019: unresolved external
symbol _spotrf_ referenced in function _multifrontal_supernodal_front_factor
1>libtaucs.lib(taucs_ccs_ooc_llt_S.obj) : error LNK2001: unresolved
external symbol _spotrf_
1>libtaucs.lib(taucs_sn_llt_D.obj) : error LNK2019: unresolved external
symbol _dpotrf_ referenced in function _multifrontal_supernodal_front_factor
1>libtaucs.lib(taucs_ccs_ooc_llt_D.obj) : error LNK2001: unresolved
external symbol _dpotrf_

Where should these symbols be defined?
Thanks in advance...
Evgenii Rudnyi yazm?s,:

Evgenii Rudnyi

unread,
Feb 16, 2009, 3:40:12 PM2/16/09
to matrixpr...@googlegroups.com
Duygu Ceylan schrieb:

> I couldn't solve this problem and because I have limited amount of time,
> I decided to try the first option you have mentioned in your previous
> emails about rebuilding blas:
>
> 1) To use ATLAS compiled with gcc under cygwin. The libraries under
> -mno-cygwin are compatible with MS VC. See
>
> http://matrixprogramming.com/UMFPACK/
>
> Sections Compiling under MinGW and Using UMFPACK with Microsoft Visual
> Studio.
>
> It could be also possible to ask the ATLAS team on how to compile it
> under MS Visual C.
>
> I have successfully generated the libs according to the instructions on
> the web site and linked libamd.lib, libatlas.lib, libf77blas.lib,
> libg2c.lib, libgcc.lib, libumfpack.lib to my project. I am getting the
> following errors:

You do not need libumfpack.lib and libamd.lib. They are from UMFPACK.

> 1>libtaucs.lib(taucs_sn_llt_C.obj) : error LNK2019: unresolved external
> symbol _cpotrf_ referenced in function _multifrontal_supernodal_front_factor
> 1>libtaucs.lib(taucs_ccs_ooc_llt_C.obj) : error LNK2001: unresolved
> external symbol _cpotrf_

...


> Where should these symbols be defined?

I think in liblapack.a. UMFPACK does not use it and I have not included
it in the list. It should be available in

http://matrixprogramming.com/MatrixMultiply/lib.tar.gz

It is a part of ATLAS. Please rename it to liblapack.lib and include in
the list of libraries to link.

Duygu Ceylan

unread,
Feb 16, 2009, 3:59:56 PM2/16/09
to matrixpr...@googlegroups.com
Thanks a lot, I have finally managed to run my application :) It seems
that the first option you have mentioned worked more quickly and easily.
Thanks for your help :)
Evgenii Rudnyi yazm?s,:

Olumide

unread,
Feb 16, 2009, 11:03:56 PM2/16/09
to matrixprogramming
> Thanks a lot, I have finally managed to run my application :) It seems
> that the first option you have mentioned worked more quickly and easily.
> Thanks for your help

Duygu, Evgenii ,

I've tried to follow this thread since it was started last week, and I
too would like to compile taucs with the /MD option. Is it sufficient
that I recompile ATLAS with gcc under cygwin? Do I need to replace
taucs.h in src, and replace win32.mk?

I'd like to know which steps to take in order to reproduce your
results.

Regards,

- Olumide

Evgenii Rudnyi

unread,
Feb 17, 2009, 3:53:09 PM2/17/09
to matrixpr...@googlegroups.com
Olumide schrieb:
...

> I've tried to follow this thread since it was started last week, and I
> too would like to compile taucs with the /MD option. Is it sufficient
> that I recompile ATLAS with gcc under cygwin? Do I need to replace
> taucs.h in src, and replace win32.mk?
>
> I'd like to know which steps to take in order to reproduce your
> results.

It seems there was some incompatibility between AMCL on Vista. Or it was
just something wrong with that particular Vista. Hard to say. So if you
want to pursue AMCL, it is good first to compile a test with it to make
sure it will work for you.

As for ATLAS, you have

1) recompile TAUCS with /MD (change in win32.mk)
2) recompile METIS with /MD
http://matrixprogramming.com/METIS/

Well, these two steps are actually general.

Then you can go along the lines

http://matrixprogramming.com/UMFPACK/

see here Compiling under MinGW and Using UMFPACK with Microsoft Visual
Studio. You do not need the UMFPACK libraries and you have to add
liblapack.lib. So you can reuse the ATLAS libs that have been compiled
by me. On the other hand, compiling ATLAS is fun. But I am afraid that
the latest version is working only with gcc 4. I have compiled under
Cygwin ATLAS 3.6. This should work.

I will try to make a page on my site about it but I cannot say for sure
when I will have time.

주한별

unread,
Mar 27, 2009, 2:51:49 AM3/27/09
to matrixprogramming
Hello

My name is Hanbyul and i am also new learner to use taucs.
Unfortunately i have exactly same problem of this thread ( using taucs
with /MD option project)
so, i have tried solve this problem about three days acording to this
thread and some other related threads,
but i still can't solve it.

I successfully compile metis and UMFPACK with atlas (according to
http://matrixprogramming.com/UMFPACK/)
and finally taucs.

But my libtaucs.lib still depends on 'LIBCMT.lib', and there is
missing problem if i ignore it.

Im guessing that i have to recompile the atlas libraries(libatlas
libblas libcblas libf77blas liblapack)
and vcf2c.lib with /MD option, because im just using the downloaded
one.


Anyway, it would be very thanksful that someone who solve this problem
upload the library complied /MD option.

Evgenii Rudnyi

unread,
Mar 28, 2009, 11:00:40 AM3/28/09
to matrixpr...@googlegroups.com
> My name is Hanbyul and i am also new learner to use taucs.
> Unfortunately i have exactly same problem of this thread ( using taucs
> with /MD option project)
> so, i have tried solve this problem about three days acording to this
> thread and some other related threads,
> but i still can't solve it.
>
> I successfully compile metis and UMFPACK with atlas (according to
> http://matrixprogramming.com/UMFPACK/)
> and finally taucs.
>
> But my libtaucs.lib still depends on 'LIBCMT.lib', and there is
> missing problem if i ignore it.

You have to compile TAUCS with -MD, then METIS with -MD. As for BLAS,
there are several options, one of them is to use ATLAS compiled with
gcc. You can use ATLAS 3.6 compiled by me at

http://matrixprogramming.com/MatrixMultiply/lib.tar.gz

Reply all
Reply to author
Forward
0 new messages