[Trilinos-Users] [EXTERNAL] trilinos in MSVC
Mohammad R. Hashemi
mrh1390 at gmail.com
Fri May 17 01:12:12 MDT 2013
Excuse me, I forgot to attach the file.
On 5/17/13, Mohammad R. Hashemi <mrh1390 at gmail.com> wrote:
> Dear Chetan,
>
> Thank you for your response.
> My question is how to have an install directory which contains
> required libs and includes. In linux it was automatically built.
>
> Also,
> I create a test solution with main.cpp, added all possible include/lib
> directories and linked all the libraries (blas.lib, lapack.lib,
> belos.lib, epetra.lib, etc). It seems that the error comes from
> clapack. please see the attached txt.
>
> Yours,
> Mohammad
>
> On 5/17/13, Chetan Jhurani <chetan.jhurani at gmail.com> wrote:
>> Mohammad,
>>
>>
>>
>> See attached CMakeLists for creating an exe from a main.cpp and depending
>> on
>>
>>
>> your Trilinos installation.
>>
>>
>>
>> Example usage: cmake -DTrilinos_PREFIX="C:\install\Trilinos" -G "Visual
>> Studio 11 Win64" DIR
>>
>>
>>
>> where DIR is a directory containing the CMakeLists.txt and your main.cpp.
>>
>> This will create Visual Studio 2012 project with x64 option.
>>
>>
>>
>> Here C:\install\Trilinos should be an installation with include and lib
>> directories.
>>
>>
>>
>> Chetan
>>
>>
>>
>> From: trilinos-users-bounces at software.sandia.gov
>> [mailto:trilinos-users-bounces at software.sandia.gov] On Behalf Of Mohammad
>> R.
>> Hashemi
>> Sent: Thursday, May 16, 2013 8:33 PM
>> To: Bartlett, Roscoe A.
>> Cc: trilinos-users at software.sandia.gov
>> Subject: Re: [Trilinos-Users] [EXTERNAL] trilinos in MSVC
>>
>>
>>
>> Dear Ross,
>>
>> Can you elaborate this?
>>
>>
>>
>> Mohammad
>>
>>
>>
>> On Fri, May 17, 2013 at 7:09 AM, Bartlett, Roscoe A.
>> <bartlettra at ornl.gov>
>> wrote:
>>
>> Mohammad,
>>
>>
>>
>> If you use CMake for your project to generate visual studio project for
>> you
>> APP, you should be able to include TrilinosConfig.cmake
>> (FIND_PACKAGE(Trilinos)) and that should be it.
>>
>>
>>
>> Brent,
>>
>>
>>
>> Is that right?
>>
>>
>>
>> -Ross
>>
>>
>>
>> From: Mohammad R. Hashemi [mailto:mrh1390 at gmail.com]
>> Sent: Thursday, May 16, 2013 10:15 PM
>> To: Perschbacher, Brent M
>> Cc: Bartlett, Roscoe A.; trilinos-users at software.sandia.gov
>>
>>
>> Subject: Re: [Trilinos-Users] [EXTERNAL] trilinos in MSVC
>>
>>
>>
>> Brent,
>>
>> Thank you for your explanation. As you said, I just
>>
>>
>>
>> 1- ran CMake over "clapack-3.2.1-CMAKE" (without even changing its name!)
>> and let it make a solution in
>> "clapack-3.2.1-CMAKE/solution";
>>
>>
>>
>> 2- installed MPICH with its default windows binary;
>>
>>
>>
>> 3- ran CMake to create "trilinos-11.2.3-Source/solution", just enabling
>> Belos/Examples/MPI and of course let the LAPACK_DIR to
>> remain "clapack-3.2.1-CMAKE/solution".
>>
>>
>>
>> At last, VS tells that:
>>
>> "========== Build: 51 succeeded, 0 failed, 0 up-to-date, 19 skipped
>> =========="
>>
>>
>>
>> Now, my question is how to link trilinos to a VC++ project, is it
>> sufficient
>> to (just as any other static library) link the .lib
>> files and add trilinos include directories? Is there any way to create
>> dependent VC projects (one is my own c++ project and others
>> are those currently available in Trilinos.sln)?
>>
>>
>>
>> On Fri, May 17, 2013 at 3:16 AM, Perschbacher, Brent M
>> <bmpersc at sandia.gov>
>> wrote:
>>
>> Mohammad,
>>
>> I think that the file Ross is refering to is actually in: <trilinos
>> base
>> dir>/cmake/tribits/doc/README.windows. However, it seems
>> like you've done pretty much everything you should, with one exception.
>> You
>> should not have moved the *.lib files from where they
>> were. The cmake build of clapack defines all the necessary information
>> for
>> Trilinos to find the blas and lapack libraries where they
>> were built. It should be sufficient to just build clapack and then try to
>> configure Trilinos using the CLAPACK_DIR variable to tell
>> Trilinos where your copy of clapack is. No need to move any libraries to
>> some place easier to find. At this point it might be
>> necessary to delete your CMakeCache.txt for Trilinos though as once cmake
>> has decided it hasn't found something it remembers that
>> and doesn't check again.
>>
>>
>>
>> Brent
>>
>>
>>
>> From: <Bartlett>, "Roscoe A." <bartlettra at ornl.gov>
>> Date: Thursday, May 16, 2013 10:36 AM
>> To: "'Mohammad R. Hashemi'" <mrh1390 at gmail.com>, "Perschbacher, Brent M"
>> <bmpersc at sandia.gov>
>> Cc: "'trilinos-users at software.sandia.gov'"
>> <trilinos-users at software.sandia.gov>
>> Subject: RE: [Trilinos-Users] [EXTERNAL] trilinos in MSVC
>>
>>
>>
>> See the readme file in trilinos base dir. I think it has 'windows ' in
>> the
>> name.
>>
>> -Ross
>>
>> Sent from my android phone. Excuse the terse message.
>>
>>
>> -----Original Message-----
>> From: Mohammad R. Hashemi [mrh1390 at gmail.com]
>> Sent: Thursday, May 16, 2013 11:55 AM Eastern Standard Time
>> To: Perschbacher, Brent M
>> Cc: trilinos-users at software.sandia.gov
>> Subject: Re: [Trilinos-Users] [EXTERNAL] trilinos in MSVC
>>
>> Hi Brent,
>>
>> I generated VS solution in clapack/bin via CMade-GUI and just opened
>> the solution, let it built (release_x64). Then copied the .lib
>> (blas.lib and lapack.lib) to the root and have BLAS_LIBRARY_DIRS and
>> LAPACK_LIBRARY_DIRS point to the root.
>>
>> What is the best way to have clapack installed in windows?
>>
>> Mohammad
>>
>> On 5/16/13, Perschbacher, Brent M <bmpersc at sandia.gov> wrote:
>>> Mohommad,
>>> Can you tell me what you set BLAS_LIBRARY_DIRS and LAPACK_LIBRARY_DIRS
>>> to
>>> exactly? On windows we actually search for clapack specifically and in a
>>> different way than we search for most TPLs that makes most of the
>>> variables
>>> that are intended to help our configure find a TPL not useful. The best
>>> way
>>> to allow the Trilinos configure to find clapack is generally to set
>>> CLAPACK_DIR to where you have installed clapack. That should allow the
>>> configure to correctly find your blas and lapack.
>>>
>>> Brent
>>>
>>> From: "Mohammad R. Hashemi"
>>> <mrh1390 at gmail.com<mailto:mrh1390 at gmail.com>>
>>> Date: Thursday, May 16, 2013 2:57 AM
>>> To:
>>> "trilinos-users at software.sandia.gov<mailto:trilinos-users at software.sandia.gov>"
>>> <trilinos-users at software.sandia.gov<mailto:trilinos-users at software.sandia.gov>>
>>> Subject: [EXTERNAL] [Trilinos-Users] trilinos in MSVC
>>>
>>> Dear Trilinos developers,
>>>
>>> Using the VC++ 11.0 (2012) x64 compiler, I successfully
>>> installed/built CMake/CLAPACK. Then introduced the ".lib" blas and
>>> lapack files to trilinos cmake config via "BLAS_LIBRARY_DIRS" and
>>> "LAPACK_LIBRARY_DIRS" keywords.
>>>
>>> The next step was in visual studio, where the build process succeeded
>>> for 47 and failed for 43 projects. Noted that I only activate the
>>> belos package.
>>>
>>> As far as I read the errors they are related to BLAS/LAPACK (eg.
>>> Epetra_BLAS.obj).
>>>
>>> I'd appreciate if you could help me.
>>>
>>> Regards,
>>> Mohammad R. Hashemi
>>>
>> _______________________________________________
>> Trilinos-Users mailing list
>> Trilinos-Users at software.sandia.gov
>> http://software.sandia.gov/mailman/listinfo/trilinos-users
>>
>>
>>
>>
>>
>>
>
-------------- next part --------------
Error 1 error LNK2001: unresolved external symbol "public: static void __cdecl Belos::OperatorTraits<double,class Epetra_MultiVector,class Epetra_Operator>::Apply(class Epetra_Operator const &,class Epetra_MultiVector const &,class Epetra_MultiVector &,enum Belos::ETrans)" (?Apply@?$OperatorTraits at NVEpetra_MultiVector@@VEpetra_Operator@@@Belos@@SAXAEBVEpetra_Operator@@AEBVEpetra_MultiVector@@AEAV4 at W4ETrans@2@@Z) D:\SPH\trilinos\tests\BELOS_LSE\main.obj
Error 2 error LNK2001: unresolved external symbol "public: __cdecl Belos::EpetraPrecOp::EpetraPrecOp(class Teuchos::RCP<class Epetra_Operator> const &)" (??0EpetraPrecOp at Belos@@QEAA at AEBV?$RCP at VEpetra_Operator@@@Teuchos@@@Z) D:\SPH\trilinos\tests\BELOS_LSE\main.obj
Error 3 error LNK2001: unresolved external symbol d_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dlanv2.obj)
Error 4 error LNK2001: unresolved external symbol d_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dlagts.obj)
Error 5 error LNK2001: unresolved external symbol d_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dlaed3.obj)
Error 6 error LNK2001: unresolved external symbol d_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dlaed9.obj)
Error 7 error LNK2001: unresolved external symbol d_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dsteqr.obj)
Error 8 error LNK2001: unresolved external symbol d_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dlarfg.obj)
Error 9 error LNK2001: unresolved external symbol d_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dlasv2.obj)
Error 10 error LNK2001: unresolved external symbol d_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dlarfp.obj)
Error 11 error LNK2001: unresolved external symbol d_sign D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(drotg.obj)
Error 12 error LNK2001: unresolved external symbol d_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dlacn2.obj)
Error 13 error LNK2001: unresolved external symbol d_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dbdsqr.obj)
Error 14 error LNK2001: unresolved external symbol d_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dsterf.obj)
Error 15 error LNK2001: unresolved external symbol d_imag D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(dznrm2.obj)
Error 16 error LNK2001: unresolved external symbol d_imag D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(dcabs1.obj)
Error 17 error LNK2001: unresolved external symbol z_abs D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(zrotg.obj)
Error 18 error LNK2001: unresolved external symbol z_div D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(zrotg.obj)
Error 19 error LNK2001: unresolved external symbol z_div D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(ztrsm.obj)
Error 20 error LNK2001: unresolved external symbol d_cnjg D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(ztrmm.obj)
Error 21 error LNK2001: unresolved external symbol d_cnjg D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(ztrsm.obj)
Error 22 error LNK2001: unresolved external symbol d_cnjg D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(zrot.obj)
Error 23 error LNK2001: unresolved external symbol d_cnjg D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(zrotg.obj)
Error 24 error LNK2001: unresolved external symbol d_cnjg D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(zgemv.obj)
Error 25 error LNK2001: unresolved external symbol d_cnjg D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(ztrmv.obj)
Error 26 error LNK2001: unresolved external symbol d_cnjg D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(zgemm.obj)
Error 27 error LNK2001: unresolved external symbol r_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(slanv2.obj)
Error 28 error LNK2001: unresolved external symbol r_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(slagts.obj)
Error 29 error LNK2001: unresolved external symbol r_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(slaed3.obj)
Error 30 error LNK2001: unresolved external symbol r_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(slaed9.obj)
Error 31 error LNK2001: unresolved external symbol r_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(ssteqr.obj)
Error 32 error LNK2001: unresolved external symbol r_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(slarfg.obj)
Error 33 error LNK2001: unresolved external symbol r_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(slasv2.obj)
Error 34 error LNK2001: unresolved external symbol r_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(slarfp.obj)
Error 35 error LNK2001: unresolved external symbol r_sign D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(srotg.obj)
Error 36 error LNK2001: unresolved external symbol r_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(slacn2.obj)
Error 37 error LNK2001: unresolved external symbol r_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(sbdsqr.obj)
Error 38 error LNK2001: unresolved external symbol r_sign D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(ssterf.obj)
Error 39 error LNK2001: unresolved external symbol c_abs D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(crotg.obj)
Error 40 error LNK2001: unresolved external symbol r_cnjg D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(ctrmm.obj)
Error 41 error LNK2001: unresolved external symbol r_cnjg D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(ctrsm.obj)
Error 42 error LNK2001: unresolved external symbol r_cnjg D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(crot.obj)
Error 43 error LNK2001: unresolved external symbol r_cnjg D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(crotg.obj)
Error 44 error LNK2001: unresolved external symbol r_cnjg D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(cgemv.obj)
Error 45 error LNK2001: unresolved external symbol r_cnjg D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(ctrmv.obj)
Error 46 error LNK2001: unresolved external symbol r_cnjg D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(cgemm.obj)
Error 47 error LNK2001: unresolved external symbol c_div D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(ctrsm.obj)
Error 48 error LNK2001: unresolved external symbol r_imag D:\SPH\trilinos\tests\BELOS_LSE\blas.lib(scabs1.obj)
Error 49 error LNK2001: unresolved external symbol pow_di D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dlamch.obj)
Error 50 error LNK2001: unresolved external symbol pow_di D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dlartg.obj)
Error 51 error LNK2001: unresolved external symbol pow_di D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dlaed6.obj)
Error 52 error LNK2001: unresolved external symbol s_wsfe D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dlamch.obj)
Error 53 error LNK2001: unresolved external symbol s_wsfe D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(slamch.obj)
Error 54 error LNK2001: unresolved external symbol do_fio D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dlamch.obj)
Error 55 error LNK2001: unresolved external symbol do_fio D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(slamch.obj)
Error 56 error LNK2001: unresolved external symbol e_wsfe D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dlamch.obj)
Error 57 error LNK2001: unresolved external symbol e_wsfe D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(slamch.obj)
Error 58 error LNK2001: unresolved external symbol pow_ri D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(slamch.obj)
Error 59 error LNK2001: unresolved external symbol pow_ri D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(slartg.obj)
Error 60 error LNK2001: unresolved external symbol pow_ri D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(slaed6.obj)
Error 61 error LNK2001: unresolved external symbol s_cat D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(sormtr.obj)
Error 62 error LNK2001: unresolved external symbol s_cat D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dormql.obj)
Error 63 error LNK2001: unresolved external symbol s_cat D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(sormlq.obj)
Error 64 error LNK2001: unresolved external symbol s_cat D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(sormql.obj)
Error 65 error LNK2001: unresolved external symbol s_cat D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(sormbr.obj)
Error 66 error LNK2001: unresolved external symbol s_cat D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(strtri.obj)
Error 67 error LNK2001: unresolved external symbol s_cat D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(sormqr.obj)
Error 68 error LNK2001: unresolved external symbol s_cat D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(sormrq.obj)
Error 69 error LNK2001: unresolved external symbol s_cat D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dormqr.obj)
Error 70 error LNK2001: unresolved external symbol s_cat D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dormbr.obj)
Error 71 error LNK2001: unresolved external symbol s_cat D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dormrq.obj)
Error 72 error LNK2001: unresolved external symbol s_cat D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dormtr.obj)
Error 73 error LNK2001: unresolved external symbol s_cat D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(shseqr.obj)
Error 74 error LNK2001: unresolved external symbol s_cat D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(sormhr.obj)
Error 75 error LNK2001: unresolved external symbol s_cat D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dtrtri.obj)
Error 76 error LNK2001: unresolved external symbol s_cat D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dormlq.obj)
Error 77 error LNK2001: unresolved external symbol s_cat D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dgesvd.obj)
Error 78 error LNK2001: unresolved external symbol s_cat D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dhseqr.obj)
Error 79 error LNK2001: unresolved external symbol s_cat D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dormhr.obj)
Error 80 error LNK2001: unresolved external symbol s_cat D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(sgesvd.obj)
Error 81 error LNK2001: unresolved external symbol s_copy D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(ilaenv.obj)
Error 82 error LNK2001: unresolved external symbol s_cmp D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(ilaenv.obj)
Error 83 error LNK2001: unresolved external symbol d_lg10 D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dlabad.obj)
Error 84 error LNK2001: unresolved external symbol i_dnnt D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dlacn2.obj)
Error 85 error LNK2001: unresolved external symbol pow_dd D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dbdsqr.obj)
Error 86 error LNK2001: unresolved external symbol pow_dd D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(sbdsqr.obj)
Error 87 error LNK2001: unresolved external symbol pow_ii D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dlaed7.obj)
Error 88 error LNK2001: unresolved external symbol pow_ii D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(slaed7.obj)
Error 89 error LNK2001: unresolved external symbol pow_ii D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dlaeda.obj)
Error 90 error LNK2001: unresolved external symbol pow_ii D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(slaeda.obj)
Error 91 error LNK2001: unresolved external symbol pow_ii D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dstedc.obj)
Error 92 error LNK2001: unresolved external symbol pow_ii D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(sstedc.obj)
Error 93 error LNK2001: unresolved external symbol pow_ii D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(dlaed0.obj)
Error 94 error LNK2001: unresolved external symbol pow_ii D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(slaed0.obj)
Error 95 error LNK2001: unresolved external symbol i_nint D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(slacn2.obj)
Error 96 error LNK2001: unresolved external symbol i_nint D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(iparmq.obj)
Error 97 error LNK2001: unresolved external symbol r_lg10 D:\SPH\trilinos\tests\BELOS_LSE\lapack.lib(slabad.obj)
Error 98 error LNK1120: 26 unresolved externals D:\SPH\trilinos\tests\BELOS_LSE\x64\Release\BELOS_LSE.exe
More information about the Trilinos-Users
mailing list