unable to install dolfin-0.8.2-hpc

Asked by algra

I would like to install Unicorn 0.1.3-hpc. For that, I installed the required old versions of ufc and ffc as stated in README. I am also trying to install dolfin-0.8.2-hpc with the same purpose, however when I complile I get the error:

alba@feo:~/src/dolfin-0.8.2-hpc$ make
Making all in src
make[1]: Entering directory `/home/alba/src/dolfin-0.8.2-hpc/src'
Making all in common
make[2]: Entering directory `/home/alba/src/dolfin-0.8.2-hpc/src/common'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/alba/src/dolfin-0.8.2-hpc/src/common'
Making all in elements
make[2]: Entering directory `/home/alba/src/dolfin-0.8.2-hpc/src/elements'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/alba/src/dolfin-0.8.2-hpc/src/elements'
Making all in fem
make[2]: Entering directory `/home/alba/src/dolfin-0.8.2-hpc/src/fem'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/alba/src/dolfin-0.8.2-hpc/src/fem'
Making all in function
make[2]: Entering directory `/home/alba/src/dolfin-0.8.2-hpc/src/function'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/alba/src/dolfin-0.8.2-hpc/src/function'
Making all in graph
make[2]: Entering directory `/home/alba/src/dolfin-0.8.2-hpc/src/graph'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/alba/src/dolfin-0.8.2-hpc/src/graph'
Making all in io
make[2]: Entering directory `/home/alba/src/dolfin-0.8.2-hpc/src/io'
/bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../include/dolfin/config -I/usr/include/libxml2 -I../../include -I/usr/local/include -g -O2 -MT MFile.lo -MD -MP -MF .deps/MFile.Tpo -c -o MFile.lo MFile.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../include/dolfin/config -I/usr/include/libxml2 -I../../include -I/usr/local/include -g -O2 -MT MFile.lo -MD -MP -MF .deps/MFile.Tpo -c MFile.cpp -o MFile.o
MFile.cpp: In member function 'virtual void dolfin::MFile::operator<<(dolfin::GenericVector&)':
MFile.cpp:38:41: error: 'fopen' was not declared in this scope
MFile.cpp:41:22: error: 'fprintf' was not declared in this scope
MFile.cpp:53:12: error: 'fclose' was not declared in this scope
MFile.cpp: In member function 'virtual void dolfin::MFile::operator<<(dolfin::Mesh&)':
MFile.cpp:63:41: error: 'fopen' was not declared in this scope
MFile.cpp:68:34: error: 'fprintf' was not declared in this scope
MFile.cpp:86:28: error: 'fprintf' was not declared in this scope
MFile.cpp:88:45: error: 'fprintf' was not declared in this scope
MFile.cpp:97:52: error: 'fprintf' was not declared in this scope
MFile.cpp:99:50: error: 'fprintf' was not declared in this scope
MFile.cpp:103:65: error: 'fprintf' was not declared in this scope
MFile.cpp:105:62: error: 'fprintf' was not declared in this scope
MFile.cpp:108:18: error: 'fprintf' was not declared in this scope
MFile.cpp:135:12: error: 'fclose' was not declared in this scope
make[2]: *** [MFile.lo] Error 1
make[2]: Leaving directory `/home/alba/src/dolfin-0.8.2-hpc/src/io'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/alba/src/dolfin-0.8.2-hpc/src'
make: *** [all-recursive] Error 1

I believe this is not related to the message I got when installing ufc:

alba@feo:~/src/ufc-1.1.1$ sudo scons install
[sudo] password for alba:
scons: Reading SConscript files ...

scons: warning: The PathOption() function is deprecated; use the PathVariable() function instead.
File "/home/alba/src/ufc-1.1.1/SConstruct", line 34, in <module>

scons: warning: The BoolOption() function is deprecated; use the BoolVariable() function instead.
File "/home/alba/src/ufc-1.1.1/SConstruct", line 39, in <module>

scons: warning: The Options class is deprecated; use the Variables class instead.
File "/home/alba/src/ufc-1.1.1/SConstruct", line 53, in <module>
Checking for SWIG...(cached) yes
Checking for SWIG version > 1.3.35...(cached) yes
Checking for Boost...(cached) yes
Checking for Python...(cached) yes
scons: done reading SConscript files.
scons: Building targets ...
scons: `install' is up to date.
scons: done building targets.

---------------------------------------------------------
*** Warning: Old ufc module

    /usr/lib/python2.7/dist-packages/ufc

still excists in installation path.
Try remove these files with:

    scons -c cleanOldUFC=Yes

Note that you may need to be root.

What am I doing wrong?

Many thanks.

Question information

Language:
English Edit question
Status:
Answered
For:
Unicorn Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Aurélien Larcher (aurelien-larcher) said :
#1

You just need to add an include for stdio.h in MFile.cpp.
I believe it is fixed in 0.8.3-hpc.
Cheers

Aurelien

Revision history for this message
Niclas Jansson (njansson) said :
#2

Aurélien Larcher <email address hidden> writes:

> Question #229345 on Unicorn changed:
> https://answers.launchpad.net/unicorn/+question/229345
>
> Status: Open => Answered
>
> Aurélien Larcher proposed the following answer:
> You just need to add an include for stdio.h in MFile.cpp.
> I believe it is fixed in 0.8.3-hpc.
> Cheers
>
> Aurelien

Yes, these and several other bug fixes has been fixed in 0.8.3-hpc,
which can be downloaded from dryad.csc.kth.se

Cheers,
Niclas

Revision history for this message
algra (algra) said :
#3

Many thanks for your quick responses. However I must stick to Dolfin-0.8.2-hpc (and not to later versions) to install and run Unicorn-0.1.3-hpc, right?

Revision history for this message
Niclas Jansson (njansson) said :
#4

algra <email address hidden> writes:

> Question #229345 on Unicorn changed:
> https://answers.launchpad.net/unicorn/+question/229345
>
> algra posted a new comment:
> Many thanks for your quick responses. However I must stick to
> Dolfin-0.8.2-hpc (and not to later versions) to install and run
> Unicorn-0.1.3-hpc, right?

No, Unicorn 0.1.3-hpc will work fine together with DOLFIN
0.8.3-hpc. However, you need to patch the configure.ac file of Unicorn
such that it will accept the newer DOLFIN version, i.e.,

Change,

PKG_CHECK_MODULES([DOLFIN], [dolfin = 0.8.2-hpc])

to,

PKG_CHECK_MODULES([DOLFIN], [dolfin = 0.8.3-hpc])

and don't forget to run regen.sh before reconfigure Unicorn.

Niclas

PS. We will release a new version of Unicorn soon (available from
dryad.csc.kth.se)

Revision history for this message
algra (algra) said :
#5

I see, thank you very much for the detailed answer; that's really appreciated.

Unfortunately, I get error messages when installing dolfin-0.8.3-hpc:

checking for inflateEnd in -lz... yes
configure: error: Linear Algebra backend not found

As Ji Peng in #4 (https://answers.launchpad.net/unicorn/+question/224407) suggested, I installed the version 2.3.3 of PETSc. I get exactly the same message. My excuses for this question-bombing, but would anyone know how this could be solved?

Thank you very much.

Revision history for this message
algra (algra) said :
#6

Sorry, I forgot to say that I gave the argument --with-petsc to ./configure, but no success:

checking for PETSc... no
configure: error: Linear Algebra backend not found

Revision history for this message
Niclas Jansson (njansson) said :
#7

algra <email address hidden> writes:

> Question #229345 on Unicorn changed:
> https://answers.launchpad.net/unicorn/+question/229345
>
> algra posted a new comment:
> Sorry, I forgot to say that I gave the argument --with-petsc to
> ./configure, but no success:
>
> checking for PETSc... no
> configure: error: Linear Algebra backend not found

Try to give the configure script the hint, --with-petsc-dir= which
should point to the PETSc directory.

Niclas

Revision history for this message
algra (algra) said :
#8

Thank you, Niclas. Since apparently I have petsc installed in two different directories:

alba@feo:~/src/dolfin-0.8.3-hpc$ whereis petsc
petsc: /usr/lib/petsc /usr/include/petsc

i have tried --with-petsc-dir=/usr/include/petsc , with no success. However, I have download petsc-2.3.3 in ~/src/petsc-2.3.3-p16, and I successfully configured and compiled dolfin. I further configured unicorn with no errors, but when I compile I get errors with MPI_comm:

AdaptiveRefinement.cpp:281:3: error: invalid conversion from 'int' to 'MPI_Comm {aka ompi_communicator_t*}' [-fpermissive]
/usr/lib/openmpi/include/mpi.h:874:20: error: initializing argument 6 of 'int MPI_Allreduce(void*, void*, int, MPI_Datatype, MPI_Op, MPI_Comm)' [-fpermissive]
AdaptiveRefinement.cpp:298:29: error: invalid conversion from 'int' to 'MPI_Comm {aka ompi_communicator_t*}' [-fpermissive]
/usr/lib/openmpi/include/mpi.h:1208:20: error: initializing argument 11 of 'int MPI_Sendrecv(void*, int, MPI_Datatype, int, int, void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Status*)' [-fpermissive]
AdaptiveRefinement.cpp:302:51: error: invalid conversion from 'int' to 'MPI_Comm {aka ompi_communicator_t*}' [-fpermissive]
/usr/lib/openmpi/include/mpi.h:1208:20: error: initializing argument 11 of 'int MPI_Sendrecv(void*, int, MPI_Datatype, int, int, void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Status*)' [-fpermissive]
make[1]: *** [AdaptiveRefinement.lo] Error 1
make[1]: Leaving directory `/home/alba/src/unicorn-0.1.3-hpc/src'
make: *** [all-recursive] Error 1

Could it be related to the new location of petsc? My apologies for all these questions...

Revision history for this message
Thomas Ward (thomas-ward) said :
#9

Hi Algra,

...probably too late for you but someone else might benefit...

with
dolfin-hpc.0.8.4

./configure --with-petsc --with-petsc-dir=/usr/lib/petsc

worked for me on Ubuntu 14.04 without having to compile a new petsc

did you manage to get unicorn 1.3 working on Ubuntu in the end?

regards

Thomas

Can you help with this problem?

Provide an answer of your own, or ask algra for more information if necessary.

To post a message you must log in.