[Trilinos-Users] Compling on Mac OS X
Einar Otnes
eotnes at gmail.com
Mon Jan 16 12:59:45 MST 2012
Dear Brent and Mark,
Thank you so much for your prompt and positive response.
I needed to specify the path to lapack/blas as I had different installations of lapack/blas in my /usr/lib (from e.g. gsl) which was by default selected building Trilinos. Hence, I wanted to explicitly specify the "Accelerate" framework to be able to use it. I understand from your feedback that I was a bit too detailed and the path to the directory should have been sufficient.
Again, thanks for your help.
Einar
On Jan 16, 2012, at 5:28 PM, Perschbacher, Brent M wrote:
> Hello Einar,
> What Mark says is true, blas and lapack are often found correctly without
> any intervention, especially on macs where apple makes them easy to find.
>
> The Reason why you are seeing issues though is because you are giving a
> compiler option to cmake where we are expecting a library name. The options
> to specify tpl library names is something we provide in the case where
> someone has an implementation of a library that uses different names than
> normal, for instance if they were to put the compiler it was built with in
> the file name. For the makefile export generated files those libraries, if
> specified are prepended with -l if they are not an absolute path to a file.
>
> Usually you should never have to set those options. If you do need to give
> cmake a hint on where to find your libraries because they aren't on a system
> path or your path then you can use
> -D<tpl_name>_LIBRARY_DIRS=path/to/libaries and
> -D<tpl_name>_INCLUDE_DIRS=path/to/includes which will tell cmake to look in
> those specific directories first. Generally that should be all you need to
> do.
>
> The best way to fix your problem should be to simply remove the setting of
> the libraries for blas and lapack like Mark suggested. The makefile export
> system should then be able to properly provide you with the correct blas and
> lapack libraries.
>
> Brent
>
>
> On 1/15/12 6:56 PM, "Hoemmen, Mark" <mhoemme at sandia.gov> wrote:
>
>> Hi Einar,
>>
>> On my 2011-model Mac, running OS X 10.7.2, I am able to build Trilinos without
>> specifying the BLAS or LAPACK libraries. Trilinos automatically detects the
>> implementations in the Accelerate framework. My script for running CMake
>> doesn't say anything about the BLAS or LAPACK at all. I'm not sure if this
>> helps with the other linking problem, but it might be worth a try. (Be sure
>> to clear your CMakeCache.txt before rerunning CMake.)
>>
>> mfh
>>
>> ----- Original Message -----
>> From: trilinos-users-request at software.sandia.gov
>> [mailto:trilinos-users-request at software.sandia.gov]
>> Sent: Saturday, January 14, 2012 12:00 PM
>> To: trilinos-users at software.sandia.gov <trilinos-users at software.sandia.gov>
>> Subject: Trilinos-Users Digest, Vol 77, Issue 5
>>
>> Send Trilinos-Users mailing list submissions to
>> trilinos-users at software.sandia.gov
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> http://software.sandia.gov/mailman/listinfo/trilinos-users
>> or, via email, send a message with subject or body 'help' to
>> trilinos-users-request at software.sandia.gov
>>
>> You can reach the person managing the list at
>> trilinos-users-owner at software.sandia.gov
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of Trilinos-Users digest..."
>>
>>
>> Today's Topics:
>>
>> 1. warning messages with version 10.8.5 (Nikhil Kriplani)
>> 2. Compiling on Mac OS X (Einar Otnes)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Fri, 13 Jan 2012 14:36:31 -0500
>> From: "Nikhil Kriplani" <nmkripla at ncsu.edu>
>> Subject: [Trilinos-Users] warning messages with version 10.8.5
>> To: "Trilinos Mailing List" <trilinos-users at software.sandia.gov>
>> Message-ID:
>> <CAPvs4NcnFQRWrnqAT4aR=0mPsUEaggEc8VUkEG=AZ-usk1Qpqw at mail.gmail.com>
>> Content-Type: text/plain; charset=windows-1252
>>
>> Hi,
>>
>> When compiling my code, I often get these warning messages (with gcc
>> 4.6, Linux, 64-bit Ubuntu):
>>
>> trilinos-10.8.5-Source/packages/teuchos/src/Teuchos_SerialDenseMatrix.hpp:
>> In copy constructor ?Teuchos::SerialDenseMatrix<OrdinalType,
>> ScalarType>::SerialDenseMatrix(const
>> Teuchos::SerialDenseMatrix<OrdinalType, ScalarType>&,
>> Teuchos::ETransp) [with OrdinalType = int, ScalarType = double]?:
>> trilinos-10.8.5-Source/packages/teuchos/src/Teuchos_SerialDenseVector.hpp:224:
>> 55:
>> instantiated from ?Teuchos::SerialDenseVector<OrdinalType,
>> ScalarType>::SerialDenseVector(const
>> Teuchos::SerialDenseVector<OrdinalType, ScalarType>&) [with
>> OrdinalType = int, ScalarType = double]?
>> trilinos-10.8.5-Source/packages/teuchos/src/Teuchos_SerialDenseMatrix.hpp:450:
>> 1:
>> warning: base class ?class Teuchos::BLAS<int, double>? should be
>> explicitly initialized in the copy constructor [-Wextra]
>>
>> It doesn't prevent compilation, and the code runs fine. I was just
>> wondering if this warning is issued because of the way I was using
>> Trilinos/Teuchos?
>>
>> Thanks,
>> Nik
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Fri, 13 Jan 2012 23:13:33 +0000
>> From: "Einar Otnes" <eotnes at gmail.com>
>> Subject: [Trilinos-Users] Compiling on Mac OS X
>> To: trilinos-users at software.sandia.gov
>> Message-ID: <1D33A537-D60B-4B50-9F6C-8ADE97C56E27 at gmail.com>
>> Content-Type: text/plain; charset="us-ascii"
>>
>> Dear Experts,
>> I have installed trilinos 10.8.5 on Mac OS X Lion apparently successfully
>> getting the test programs (ctest) to run.
>> I have used the BLAS/LAPACK libraries which are provided from Apple. The way I
>> included the BLAS and LAPACK libraries in the configuration file is a given
>> below:
>>
>> -D TPL_BLAS_LIBRARIES:FILEPATH="-framework Accelerate"
>> -D TPL_LAPACK_LIBRARIES:FILEPATH="-framework Accelerate"
>>
>> This seems to work OK.
>>
>> My problem is that when I include the "Makefile.export.Trilinos" into the
>> makefile for my ow implemented codes the Trilinos variable
>> "Trilinos_TPL_LIBRARIES = -l-framework Accelerate -l-framework Accelerate
>> /usr/lib/libpthread.dylib /usr/local/lib/libtbb.dylib"
>> which makes my linking to fail due to the "-l-framework Accelerate". How can I
>> fix this? Do I need to edit the Makefile.export.Trilinos file manually and
>> remove the "-l"? Or is there a better way to fix this, i.e. setting the proper
>> options when configuring the trilinos installation?
>>
>> Thanks,
>> Einar Otnes
>>
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL:
>> https://software.sandia.gov/pipermail/trilinos-users/attachments/20120113/0f0e
>> d40b/attachment-0001.html
>>
>> ------------------------------
>>
>> _______________________________________________
>> Trilinos-Users mailing list
>> Trilinos-Users at software.sandia.gov
>> http://software.sandia.gov/mailman/listinfo/trilinos-users
>>
>>
>> End of Trilinos-Users Digest, Vol 77, Issue 5
>> *********************************************
>>
>> _______________________________________________
>> Trilinos-Users mailing list
>> Trilinos-Users at software.sandia.gov
>> http://software.sandia.gov/mailman/listinfo/trilinos-users
>
>
More information about the Trilinos-Users
mailing list