Petsc configure failure : --with-ml-lib
Hi all,
I am trying to install using dorsal on openSUSE 11.4. The dorsal script has a problem when installing Petsc, however, and gives the following error:
"
TESTING: configureLibrary from PETSc.packages.
['/home/
TESTING: check from config.
*******
UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):
-------
--with-
--with-
*******
"
I have checked the path and libml.so does exist at that location.
I have followed everything in that the dorsal script suggested for openSUSE 11.4, *except*:
1) I had to manually install rpms for umfpack-devel and hdf5-devel , because zypper didn't have them
2) I manually add UMFPACK_
3) I did not run "mpi-selector --set openmpi-1.3.2" because i already have mpich2 installed on my system.
I'm not sure if this is relevant, but configuring Trilinos also gave the additional error for pytrilinos:
Could NOT find PythonLibs (missing: PYTHON_LIBRARIES)
Does anyone have any ideas what is wrong ?? Attempting to install this has already eaten a lot of my time, so I'd be grateful for any suggestions that you have. Thanks,
Iain
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Dorsal Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Iain Waugh
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Take a look in /home/icw26/
Are you using Dorsal 1.0.0? I would recommend to use the development version instead.
Revision history for this message
|
#2 |
Thanks for the reply Johannes,
I had looked at the petsc configure.log but couldn't understand why the problem occured.
I tried again with dorsal-1.0-beta2 as you suggested and Igot further. It crashed out when trying to download fiat and ufc from the web, because the web addresses were wrong. I replaced "trunk" with "1.0.x"for fiat and "2.0.x" for ufc, so that the addresses were valid and that helped.
It then had a problem compiling ufc, because the PYTHON_INCLUDE_DIR or PYTHON_LIBRARY flags are not set. Dorsal has downloaded its own python distribution, and I can't find it's include directory - "find . -name Python.h" in the FEniCS build directory gives nothing.
I tried setting the PYTHON_INCLUDE_DIR to one that I previously had on my computer "/home/
"
make[2]: Entering directory `/home/
Linking CXX shared module _ufc.so
/usr/lib64/
/home/icw26/
collect2: ld returned 1 exit status
make[2]: *** [_ufc.so] Error 1
"
This suggested that what I was doing was stupid. So, what should the PYTHON_INCLUDE_DIR or PYTHON_LIBRARY flags be for ufc?
Thanks again,
Iain
Revision history for this message
|
#3 |
Sorry if I was being unclear, but with development version I meant the one from the Bazaar branch on Launchpad. You can fetch it by running:
bzr branch lp:dorsal
(The 1.0-beta2 is older than 1.0.0.)
Revision history for this message
|
#4 |
Hi Johannes,
I tried the development version and it fails in exactly the same place as dorsal1.0.0 , i.e. it fails in petsc, with the options --with-ml-lib and --with-ml-include .
Again, I couldn't understand why this was failing from the configure logs. I've put them on the internet, so if you have time to have a look at them then I would be grateful, because you're likely to see something that I will not.
http://
Thanks,
Iain
Revision history for this message
|
#5 |
The problem is almost at the bottom of configure.log, looking like this:
sh: mpicxx -o /tmp/petsc-
Executing: mpicxx -o /tmp/petsc-
sh:
Possible ERROR while running linker: /usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
collect2: ld returned 1 exit status
output: ret = 256
error message = {/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
/usr/lib64/
collect2: ld returned 1 exit status
}
One way to fix this will be to rebuild Trilinos and link it with the SuiteSparse libraries. Look at FEniCS/
Revision history for this message
|
#6 |
Thanks Johannes,
Modifying UMFPACK_DIR seems to have solved that problem. The installation continued until it reached ufc, where it failed in exactly the same manner as the second post above (which used dorsal-1.0-beta2). The ufc package does not know the value of the required flags PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. The exact error message is included below.
I previously tried to set these myself (see above post) but this didn't help. Do you have any idea what I should set PYTHON_INCLUDE_DIR and PYTHON_LIBRARY to ?? In particular, I'm not sure what filenames that ufc is going to be looking for - i.e. does it want something called libpython? I only have one of them (libpython2.7.a) and it didn't like that last time because of an fPIC issue.
Any ideas? Thanks for taking the time to reply.
Iain
Building ufc-2.0.5
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
SWIG_MODULE_
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PYTHON_INCLUDE_DIR (ADVANCED)
used as include directory in directory /home/icw26/
PYTHON_LIBRARY (ADVANCED)
linked by target "_ufc" in directory /home/icw26/
-- Configuring incomplete, errors occurred!
Revision history for this message
|
#7 |
You should build the development versions of the FEniCS packages by setting STABLE_BUILD=false in dorsal.cfg. I'm not sure if that will fix the problem with UFC and Python, but let's try that first.
Revision history for this message
|
#8 |
I've just re-run it with STABLE_BUILD=false. Exactly the same issue.
Revision history for this message
|
#9 |
PYTHON_INCLUDE_DIR should be set to the directory which includes Python.h, while PYTHON_LIBRARY should point to the Python library (libpythonX.Y). These are normally detected automatically. Are you sure you have installed python-devel?
Revision history for this message
|
#10 |
Yes, I have python-devel version 2.7-8.12.1, according to "zypper info python-devel", and it comes from the system packages.
I managed to solve the python problem above, however, by:
1) recompiling my python distribution with --enable-shared
2) setting PYTHON_
Unfortunately there were then further complications:
1) A lot of the compile shared libraries in ${INSTALL_PATH}/lib had missing links. For example, libdolfin.so had no idea where any of the trilinos libraries that it wanted were set. I solved this by running "export LD_RUN_PATH= ${INSTALL_
2) The dolfin module folder does not get copied to ${INSTALL_
I tried to run the demo_navier-
-----------
python demo_navier-
Traceback (most recent call last):
File "demo_navier-
from dolfin import *
File "/home/
import cpp
File "/home/
exec("import %s" % module_name)
File "<string>", line 1, in <module>
ImportError: No module named common
-----
'common' is a submodule in this dolfin module folder, but I think that cpp cannot find it because common is not a submodule in the cpp folder - i.e. the folder structure is dolfin->cpp and dolfin->common not dolfin-
Do you have any idea why the dolfin module is not being installed properly? I have put the dorsal_
http://
Thanks for the help,
Iain
Revision history for this message
|
#11 |
Python support was not been enabled, as can be seen from the dorsal_
-- The following optional packages could not be found:
-- -------
-- (**) UMFPACK
-- (**) CHOLMOD
-- (**) PASTIX
-- (**) PYTHON
-- (**) SPHINX
-- (**) HDF5
Try to set PYTHON_INCLUDE_DIR and PYTHON_LIBRARY for DOLFIN like you did for UFC.
Revision history for this message
|
#12 |
Thanks again Johannes, setting those python flags enabled the dolfin python module to install, just as you thought. Is it a problem that the other files listed are not found? Should I try and enable umfpack etc.?
The demo_navier-stokes file still crashed though. I believe that it is something to do with atlas. The output error was:
-------
python demo_navier-
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling DOLFIN just-in-time (JIT) compiler, this may take some time.
In instant.
ImportError:
Failed to import module found in cache. Modulename: 'dolfin_
Path: '/home/
ImportError:
Traceback (most recent call last):
File "demo_navier-
p_in = Expression(
File "/home/
cpp_base, members = compile_
File "/home/
code_snippets), classnames)
File "/home/
compiled_module = compile_
File "/home/
return local_jit(*args, **kwargs)
File "/home/
**instant_
File "/home/
module = import_
File "/home/
instant_
File "/home/
raise AssertionError(
AssertionError: Failed to import module found in cache. Modulename: 'dolfin_
Path: '/home/
ImportError:
-------
Again, any ideas that you have are greatly appreciated.
Iain
Revision history for this message
|
#13 |
Interestingly, the cpp version of the navier-stokes demo compiles and runs ok, it is only the python version which does not.
Revision history for this message
|
#14 |
Yes, it looks like it is not linking correctly with ATLAS. Take a look at FEniCS/
Revision history for this message
|
#15 |
Thanks for the reply Johannes. Can you be any more specific about which flags I need to include? Or is there more information I can provide? I have just spend several more hours trying to solve this problem, but have run out of ideas. I have included a summary below of what I looked at, in case it is of any use.
1) examining the library that fails to load (/home/
Running lddtree for this library shows that it finds all the .so files that it requires (recursively).
2) I checked the dolfin/
declare -x BLAS_LIBRARIES=
(BLAS LIBRARIES is included in the CONFOPTS too)
declare -x LD_RUN_
(This variable is also exported - but the libraries are static, so this shouldn't be a problem)
3) I tried manually adding flags to the CONFOPTS in the dorsal_configure file, in the same syntax as those for blas etc., but that did not seem to help.
-D LAPACK_
4) I checked the static library /usr/lib64/
ATL_zgemoveT.o:
0000000000000000 T ATL_zgemoveT
U ATL_zgemoveT
5) I checked the library that fails to load (the one in .instant/cache) for undefined symbols. It has quite a few, some examples being:
.....U ATL_zgemaxnrm.....U PyArg_ParseTupl
6) dorsal_
Not knowing the exact process by which dorsal and dolfin are compiling/linking, I'm fairly out of my depth with this, so any suggestions that you have would be welcome.
Iain
Revision history for this message
|
#16 |
Try switching the order of the libraries in dolfin.pc. That is, instead of
-L/usr/
try this:
-L/usr/
Revision history for this message
|
#17 |
Thanks for the reply Johannes. I just tried that - having started again with your new dorsal version and trilinos 11 - but it did not change anything at all. Same ATL_zgemoveT symbol is undefined. I have even completely rebuilt and reinstalled atlas from scratch, that didn't help either.
Have you any other ideas what it could be? I have absolutely no idea, and am fairly close to giving up this end!
Iain
Revision history for this message
|
#18 |
I'm afraid I'm running out of ideas.
One thing you could try is to let Dorsal build ATLAS.
Revision history for this message
|
#19 |
I spent some time with Patrick Farrell yesterday, and he managed to get it up and running. Basically, FEniCS did not like the atlas static library. By providing it with a dynamic library equivalent, it was suddenly happy. I guess that this results in a minor loss of performance, but I'm just happy to have it up and running.
Thanks for all your help Johannes, I wouldn't have got this done without you. For others attempting to install on openSUSE 11.4, I have included a summary below of what helped me, although there are no guarantees that it will help!
Iain
#######
#######
INSTALLING ON OPENSUSE 11.4
This worked for me - it may not for you. I hope that it helps.
1) I used the development version of dorsal (at the time of writing), available with command: bzr branch lp:dorsal
2) Follow what dorsal.sh tells you to install. For SUSE 11.4, zypper does not have copies of several things that dorsal suggests. I had to also use:
wget http://
rpm -Uvh umfpack-devel.rpm
wget http://
rpm -Uvh libamd2_
wget http://
rpm -Uvh libumfpack5_
zypper in hdf5
zypper in hdf5-devel
zypper in python-ply
zypper in python-devel
3) I had to recompile my python library with --enable-shared, so that I had a libpython.so file.
4) On openSUSE umfpack bits are default put in /usr/lib64/
In trilinos.package change -D UMFPACK_
5) In trilinos.package, because my python library was not installed as root, I also had to add to the CONFOPTS: -D PYTHON_
This may not be necessary if your python is installed in /usr/lib or /usr/lib64 .
6) In dolfin.package, I had to give the directory to find armadillo, my python library again and umfpack again. I added to the CONFOPTS: -D UMFPACK_
-D PYTHON_
-D ARMADILLO_
-D ARMADILLO_
7) I needed to use a shared atlas library, which isn't naturally provided by suse 11.4. Create a symlink to one that is there:
ln -s /usr/lib64/
8) I needed to export LD_RUN_PATH in the shell before running ./dorsal.sh, because otherwise none of the libraries in ${INSTALL_PATH}/lib were linked. This looked like:
export LD_RUN_