Trying to install Fenics on Fedora

Asked by Mike Witt

Hello. First let me say that I am a complete novice at this, and I am not even sure if I'm asking this question in the right place. So please advise me about how to proceed :-) I've been reading the Fenics book and, as suggested, I'm attempting to install the software so that I can run examples while I read.

I'm currently working on Fedora 14, but I also have an FC-16 system set up, if that would make any difference.

I've gone through all the steps outlined on: http://fenicsproject.org/download/installation_from_source.html
and everything went OK until the last step, Dolfin. During the Dolfin cmake I got a number of errors. I *think* I've solved all the errors with the "non-optional" packages except for the following:

The following Boost libraries could not be found: boost_math_tr1

Based on another thread I saw on this forum I gather that there is a problem of some sort with "boost" on Fedora. But I'm not clear on how I should best proceed. I didn't understand the advice that was given in that thread, partially because it involved installing a newer version of "dorsal" --- I'm not clear if "dorsal" is Dolfin, or ??? I'm also not clear whether I could gain anything by starting over on my Fedora-16 machine, or whether this problem exists on any Fedora.

Any guidance would be appreciated!

-Mike

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Mike Witt
Solved:
Last query:
Last reply:
Revision history for this message
Johannes Ring (johannr) said :
#1

Hi Mike,

Dorsal is a tool that will automatically download and install FEniCS and all of its dependencies. It is currently recommended to use the development version of Dorsal, which you can get by running

  bzr branch lp:dorsal

You can find a short description of Dorsal and how to use it on this webpage:

  http://fenicsproject.org/download/installation_using_dorsal.html

Revision history for this message
Mike Witt (msg2mw) said :
#2

Thanks I'm not sure how I missed that page. However I'm still stuck. Apparently *my* Fedora 14 system does not really have everything that's expected. I used yum to get everything specified by the dorsal script, and some other stuff that was apparently needed. I've gotten as far as the error message:

mpicc -DNDEBUG -fPIC -O3 -I. -c coarsen.c
make: mpicc: Command not found

I don't know anything about MPI, but I do have openmpi and openmip-devel 1.4.3 installed, and I can't find anything else to install. There is a note in the script saying that I should do:

 module load openmpi-i386

I don't actually know what this means. If I do "modinfo openmpi-i386" I get:
ERROR: modinfo: could not find module openmpi-i386. I don't appear to have a command called "module"

Anyway, I'm thinking that perhaps it may be beyond my skills at the present time to get this installed. I wonder if there is any chance that a Fenics package may be created for Fedora at some point. I'd really like to try it out. I guess another option would be to set up an ubuntu system.

-Mike

Revision history for this message
Johannes Ring (johannr) said :
#3

We have no plans to create binary packages for Fedora and I don't know about anyone else with such plans, so that will likely not happen in the near future. However, I wouldn't give up on Dorsal that quickly. What exactly happens when you run

  module load openmpi-i386

?

Revision history for this message
Mike Witt (msg2mw) said :
#4

On 03/28/2012 01:25:52 AM, Johannes Ring wrote:
> Your question #191804 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/191804
>
> Johannes Ring requested more information:
> We have no plans to create binary packages for Fedora and I don't know
> about anyone else with such plans, so that will likely not happen in
> the
> near future. However, I wouldn't give up on Dorsal that quickly. What
> exactly happens when you run
>
> module load openmpi-i386

I'm sorry for my ignorance here, but I don't appear to have a command
called "module" and I don't know where to get it. I have modinfo,
modprobe, and lsmod. When I try modinfo, it doesn't know that module:

modinfo openmpi-i386
ERROR: modinfo: could not find module openmpi-i386

Does that tell you anything?

I appreciate all the help, and I'll keep trying if I can figure out
what to to :-)

-Mike

Revision history for this message
Johannes Ring (johannr) said :
#5

So if you type

  module load openmpi-i386

you get "module: command not found" or something like that?

I am no expert on Fedora but perhaps the "module" command is in /sbin or /usr/sbin and that these directories are not in your PATH? Try for instance one of these commands:

  /sbin/module load openmpi-i386
  /usr/sbin/module load openmpi-i386

You can try to locate the module command by running

  locate module

or maybe

  locate module | grep bin

Maybe someone familiar with Fedora could help out?

Revision history for this message
Mike Witt (msg2mw) said :
#6

> Maybe someone familiar with Fedora could help out?

That would be good. I found some information on the module command. It
is
apparently created dynamically:

  Package Initialization
        The Modules package and the module command are initialized
when a
        shell-specific initialization script is sourced into the
shell. The
        script creates the module command, either as an alias
or shell
        function, creates Modules environment variables, and if
enabled to do
        so, a snapshot of the environment is saved ...

I have absolutely no idea what this means.

Revision history for this message
Johannes Ring (johannr) said :
#7

Hi Mike, sorry for the late reply. This should fix your problem:

Add

  source /etc/profile

in your ~/.bashrc file and start a new terminal. Then run Dorsal again and follow the instructions.

Revision history for this message
Mike Witt (msg2mw) said :
#8

Thanks. I notice that the thing about /etc/profile is actually in the dorsal output. I wonder if I just ran it in two small a window the first time and some of that scrolled off the screen. Anyway, I get much further now. I end up with:

  UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):
  PTScotch needs bison installed
  Failure with exit status: 1
  Exit message: There was a problem configuring petsc-3.2-p5.

For what it's worth, I can't find a file called "configure.log"

I should mention that I have set up an Ubuntu system, and I'm going to try Fenics there. So the Fedora setup is not critical. I will still be happy to go ahead and try things, if there is anything useful to be learned. But if I'm just wasting people's time with my own ignorance, then we can drop it.

Revision history for this message
Johannes Ring (johannr) said :
#9

> Thanks. I notice that the thing about /etc/profile is actually in the
> dorsal output. I wonder if I just ran it in two small a window the first
> time and some of that scrolled off the screen.

I added the note about /etc/profile yesterday so that is probably why.

> Anyway, I get much
> further now. I end up with:
>
>  UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for details):
>  PTScotch needs bison installed
>  Failure with exit status: 1
>  Exit message: There was a problem configuring petsc-3.2-p5.

Installing the bison package with yum should fix this problem. I have
added this (in Dorsal) to the list of packages that needs to be
installed on Fedora.

> I should mention that I have set up an Ubuntu system, and I'm going to
> try Fenics there. So the Fedora setup is not critical. I will still be
> happy to go ahead and try things, if there is anything useful to be
> learned. But if I'm just wasting people's time with my own ignorance,
> then we can drop it.

Installing FEniCS on Ubuntu should be less troublesome, but it would
be nice to know that it also works on Fedora.

Revision history for this message
Mike Witt (msg2mw) said :
#10

Thanks Johannes. I will keep trying. After getting the latest script, this is the last part of the output:

Probing the environment ...

-- Setting CMAKE_BUILD_TYPE=RELEASE since it was not set ...
-- CMAKE_BUILD_TYPE='RELEASE'
-- The C compiler identification is unknown
-- Check for working C compiler: mpicc
CMake Error: your C compiler: "mpicc" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name.
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check for working C compiler: mpicc -- broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler "mpicc" is not able to compile a simple test program.

  It fails with the following output:

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  cmake/package_arch/PackageArchGlobalMacros.cmake:970 (ENABLE_LANGUAGE)
  CMakeLists.txt:232 (PACKAGE_ARCH_PRE_SETUP_ENV)

CMake Error: your C compiler: "mpicc" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name.
-- Configuring incomplete, errors occurred!
Failure with exit status: 1
Exit message: There was a problem configuring trilinos-10.8.5-Source.

Revision history for this message
Mike Witt (msg2mw) said :
#11

Perhaps I should say one more thing, just in case it's important. Earlier on in the build, I do get this message:

        MPI auto-detection failed: unknown wrapper compiler mpic++
        Please report this error to the Boost mailing list: http://www.boost.org
        You will need to manually configure MPI support.

It seems to "pause" for a while after that and some other output. But then the build continues and that stuff scrolls away, so I assumed that maybe it didn't matter.

There are actually a lot of "warning" message (like you typically get in a build) that I have just been ignoring, but perhaps the one above seems a little more serious. I wasn't sure.

Revision history for this message
Johannes Ring (johannr) said :
#12

Did you do "source /etc/profile" and "module load openmpi-i386" again before running Dorsal? You should add those commands to your ~/.bashrc file to make sure that the OpenMPI compilers are available whenever you start a new terminal.

Revision history for this message
Mike Witt (msg2mw) said :
#13

No, I didn't add it to my .bashrc I only sourced it in the shell I did the build in. I guess the issue is that subshells may be generated and they don't "inherit" the module command?

Anyway, I added the source line to my .bashrc and that appears to have fixed all remaining problems. The build appeared to complete successfully and I was able to run: "demo_poisson.py" and see the "viper" window come up with a plot.

I as far as I can tell I'm up and running on FC-14.

Thank you very much for all the help!