building Elemental fails

12 views
Skip to first unread message

Edward Vigmond

unread,
Jul 12, 2013, 8:23:29 AM7/12/13
to element...@googlegroups.com
Hello

I cannot build Elemental. I am using OpenSuse 12.2. I think the issue comes from having installed petsc-3.3-p4 and installing OpenMPI as a third party package through that. When I run cmake, it fails when checking for the function  MPI_Reduce_scatter. Upon examining CmakeFIles/CMakeError.log, I see the compilation of the test program fails because of undefined references to the pthread library. I cannot figure out how to add libpthread to the list of libraries. 

Cheers
Ed



Jeff Hammond

unread,
Jul 12, 2013, 10:02:06 AM7/12/13
to Edward Vigmond, element...@googlegroups.com
Can you attach said log? If OpenMPI need pthreads, it should include that in the mpicc wrappers. 

The PETSc guys on this list will appreciate the log as well. 

Jeff

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "elemental-maint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elemental-mai...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jeff Hammond

unread,
Jul 12, 2013, 10:39:30 AM7/12/13
to element...@googlegroups.com
Ugghh, here they are for the rest of you...


---------- Forwarded message ----------
From: Edward Vigmond <ed.vi...@gmail.com>
Date: Fri, Jul 12, 2013 at 9:12 AM
Subject: Re: building Elemental fails
To: Jeff Hammond <jeff.s...@gmail.com>


Hi

Here are the logs.

Cheers
Ed
--
Jeff Hammond
jeff.s...@gmail.com
CMakeError.log
CMakeOutput.log

Jeff Hammond

unread,
Jul 12, 2013, 10:45:21 AM7/12/13
to Edward Vigmond, element...@googlegroups.com
(please always reply-to-all when sending to this list - I am not the
only person who tries to help users)

How did you invoke CMake? The following is what I use on my Mac:

cmake .. -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_C_COMPILER=mpicc \
-DCMAKE_Fortran_COMPILER=mpif90 -DMATH_LIBS="-framework Accelerate" \
-DELEM_EXAMPLES=ON -DELEM_TESTS=ON

It seems you have a Linux system, in which case all you need to do is
replace "-framework Accelerate" with the appropriate BLAS library,
e.g. "-llapack -lblas". Maybe you'll need to add "-lgfortran
-lpthread" in some cases.

If you don't have MPI installed, then you need to apt-get, etc. that.
That's not really an Elemental question and I'm sure the internet has
detailed instructions on how to install MPI via the package manager
appropriate for your Linux distribution.

Jeff

On Fri, Jul 12, 2013 at 9:12 AM, Edward Vigmond <ed.vi...@gmail.com> wrote:
> Hi
>
> Here are the logs.
>
> Cheers
> Ed
>
>
>
> On 07/12/2013 04:02 PM, Jeff Hammond wrote:
>
--
Jeff Hammond
jeff.s...@gmail.com

Edward Vigmond

unread,
Jul 12, 2013, 3:39:49 PM7/12/13
to Jeff Hammond, element...@googlegroups.com
I ended up using ccmake to see all the variables.

I tried adding -lpthread to MATH_LIBS with no success. Is this added to
all the intermediate tests in the configuration?

I have MPI installed through my PETSc installation. I have had trouble
using the packaged versions with PETSc.

Generally, I find cmake awesome, but when it doesn't work, it is too
opaque to debug easily unless you set it up.

I think my basic issue remains: I need to add the pthreads library to
the linking.

Cheers
Ed
Reply all
Reply to author
Forward
0 new messages