Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Recompile TAUCS to Enable SuperLU

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Recompile TAUCS to Enable SuperLU


Chronological Thread 
  • From: "Kevin Xu" <>
  • To:
  • Subject: Re: [cgal-discuss] Recompile TAUCS to Enable SuperLU
  • Date: Sat, 31 May 2008 08:51:48 +0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Rw27N0beo6z2fjL1X0zZtebg4LxkXw7s2fv8ooz17qO3SsDBiiz5J+StUGL5PIgx+8DMnqjPUPlzURAv1R4UnkqW/MXwb8GNDKF0W3sNeouj2kk3gEJEr0gip2+5SCiptymlN35auzNGPshkYijKyYJhrFvutOceM4KzqXVQVE0=

Thank you, Laurent!

On 5/30/08,

<>
wrote:
> Hi Kevin,
>
> On Windows, CGAL uses Visual C++ auto-link feature to select libraries to
> link with. Try to add the SuperLU library in
> P:\ath\to\CGAL\include\CGAL\auto_link\TAUCS.h (see metis example).
>
> Best regards,
> Laurent Saboret
>
>
> > Dear all,
> >
> > I posted a question about how to compile TAUCS with VC8.0 some days ago.
> > With the help of Laurent Saboret, I successfully compiled it with his
> > latest script build_taucs_win32_for_CGAL.bat.
> >
> > But I still can not achieve my goal currently.
> >
> > The reason I want to recompile TAUCS is that I want to use LU
> > decomposition to solve linear system with unsymmetric system matrix. As we
> > know, taucs provided an out-of-core LU solver 'taucs_ooc_factor_lu' and
> > 'taucs_ooc_solve_lu'. This implementation can be very slow. So I want to
> > use SuperLU instead. I find that there are already two interface functions
> > ('taucs_ccs_factor_superlu' and 'taucs_ccs_solve_superlu') for SuperLU
> > defined in '\src\taucs_superlu.c'. Unfortunately, TAUCS does not compile
> > this file and hence there seems no way to access superlu with default
> > configuration!
> >
> > As a result, I decide to make some changes to TAUCS compilation config.
> >
> > The way I do this is as follows (take the _MT runtime for example):
> >
> > 0) I modified '\src\taucs_superlu.c' to use the latest SuperLU (v3.0)
> > functions. This step is tested to be correct as the compilation has
> > passsed.
> >
> > 1) I modified '\configurator\taucs_structure.h' by adding an items in
> > module definition:
> > { "SUPERLU", include, 0 , {"BASE", 0}, {"taucs_superlu", 0}, "libtaucs",
> > {"LIBSUPERLU", 0} }
> >
> > also, I added the source file definitino into 'struct file file[]':
> > { "taucs_superlu", "DIRSRC", csource|dreal }
> >
> > by doing this, the generated '\build\win32_MT\makefile' looks correct with
> > the following sentences appearing:
> >
> > LIBS = $(LIBLAPACK) $(LIBBLAS) $(LIBMETIS) $(LIBSUPERLU) $(LIBF77) $(LIBC)
> >
> > ......
> >
> > $(DIROBJ)taucs_superlu_D$(OBJEXT): $(DIRSRC)taucs_superlu.c $(INCS)
> > $(STDDEPS)
> > $(CC) -c $(CFLAGS) $(STDDEFS) $(STDINCS) \
> > -DTAUCS_CORE_DOUBLE \
> > $(DIRSRC)taucs_superlu.c \
> > $(COUTFLG)$(DIROBJ)taucs_superlu_D$(OBJEXT)
> >
> > ......
> >
> > libtaucs_content = \
> > ...
> > $(DIROBJ)taucs_superlu_D$(OBJEXT) \
> > ...
> >
> > 2) In file '\config\win32_MT.mk', I added a definition to $(LIBSUPERLU) :
> > LIBSUPERLU = external\\lib\\win32\\libsuperlu_3.0.lib
> >
> > 3) I put a compiled SuperLU (v3.0) lib 'libsuperlu_3.0.lib' into folder
> > 'external\lib\win32\'
> >
> > 4) I put all header files into folder '\src\' needed when compiling
> > '\src\taucs_superlu.c'
> >
> > 5) HERE, I begin to compile TAUCS by running
> > build_taucs_win32_for_CGAL.bat. This stage goes without any problem!
> >
> > The installation copys the 'libsuperlu_3.0.lib' into the folder
> > 'P:\ath\to\CGAL\auxiliary\taucs\lib' just as other libs, e.g.,
> > 'libatlas.lib'.
> >
> > 6) In order to use SuperLU, I added the declaration of functions
> > 'taucs_ccs_factor_superlu' and 'taucs_ccs_solve_superlu' into header
> > 'P:\ath\to\CGAL\auxiliary\taucs\include\taucs_private.h'
> >
> > THEN, I call the function 'taucs_ccs_solve_superlu' in my VC8.0 project
> > with correct CGAL settings (TAUCS lib/header). But the compiler complains
> > the following linking error:
> > ......
> > 1>Linking...
> > 1>libtaucs-vc71-mt-s.lib(taucs_superlu_D.obj) : error LNK2019: unresolved
> > external symbol _StatFree referenced in function _taucs_ccs_factor_superlu
> > 1>libtaucs-vc71-mt-s.lib(taucs_superlu_D.obj) : error LNK2019: unresolved
> > external symbol _Destroy_CompCol_Permuted referenced in function
> > _taucs_ccs_factor_superlu
> > 1>libtaucs-vc71-mt-s.lib(taucs_superlu_D.obj) : error LNK2019: unresolved
> > external symbol _Destroy_SuperMatrix_Store referenced in function
> > _taucs_ccs_factor_superlu
> > ......
> > 1>Release\MeshStudio.exe : fatal error LNK1120: 14 unresolved externals
> >
> >
> > It seems the compiler does not know how to find the SuperLU lib. But in
> > fact I have put 'libsuperlu_3.0.lib' into
> > 'P:\ath\to\CGAL\auxiliary\taucs\lib' and my project has set the Additional
> > Library Dir correctly as follows:
> > "$(CGALROOT)\lib";"$(CGALROOT)\auxiliary\gmp\lib";"$(CGALROOT)\auxiliary\taucs\lib"
> >
> > I think there is no difference between 'libsuperlu_3.0.lib' and
> > 'libatlas.lib' (and other external libs such as 'liblapack.lib'). Why does
> > the compiler know how to find 'libatlas.lib' but not 'libsuperlu_3.0.lib'?
> >
> > Did I miss some other critical steps in this procedural? Can anyone tell
> > me what's the problem?
> >
> > Thank you for your patiently reading. I hope I have described my problem
> > clearly.
> >
> > Best regards!
> >
> > Kevin
> >
> > --
> > You are currently subscribed to cgal-discuss.
> > To unsubscribe or access the archives, go to
> > https://lists-sop.inria.fr/wws/info/cgal-discuss
> >
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>



Archive powered by MHonArc 2.6.16.

Top of Page