[Trilinos-Users] [EXTERNAL] trilinos in MSVC

Chetan Jhurani chetan.jhurani at gmail.com
Thu May 16 22:07:28 MDT 2013


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 --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20130516/8c775b26/attachment.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
Url: https://software.sandia.gov/pipermail/trilinos-users/attachments/20130516/8c775b26/attachment.txt 


More information about the Trilinos-Users mailing list