Trilinos trying to install to wrong directory

Asked by Martin Sandve Alnæs

I'm building the quantal-hpc platform, with the following paths in my local.cfg:

# Where do you want the downloaded source files to go?
DOWNLOAD_PATH=${HOME}/opt/fenics/dorsal-unstable-src-28022013
# Where do you want the compiled software installed?
INSTALL_PATH=${HOME}/opt/fenics/dorsal-unstable-28022013

Many packages have built and installed correctly, and then on trilinos I get the following output. Is this known? Trilinos bug? Dorsal bug?

...
Finished configuring Trilinos!

-- Configuring done
-- Generating done
-- Build files have been written to: /home/martinal/opt/fenics/dorsal-unstable-src-28022013/trilinos-11.0.3-Source/dorsal_build_dir
make: Entering directory `/home/martinal/opt/fenics/dorsal-unstable-src-28022013/trilinos-11.0.3-Source/dorsal_build_dir'
make: Leaving directory `/home/martinal/opt/fenics/dorsal-unstable-src-28022013/trilinos-11.0.3-Source/dorsal_build_dir'
make: Entering directory `/home/martinal/opt/fenics/dorsal-unstable-src-28022013/trilinos-11.0.3-Source/dorsal_build_dir'
Install the project...
-- Install configuration: "RELEASE"
-- Installing: /usr/local/include/Trilinos_version.h
CMake Error at cmake_install.cmake:36 (FILE):
  file INSTALL cannot copy file
  "/home/martinal/opt/fenics/dorsal-unstable-src-28022013/trilinos-11.0.3-Source/dorsal_build_dir/././Trilinos_version.h"
  to "/usr/local/include/Trilinos_version.h".

make: *** [install] Error 1
make: Leaving directory `/home/martinal/opt/fenics/dorsal-unstable-src-28022013/trilinos-11.0.3-Source/dorsal_build_dir'
Failure with exit status: 2
Exit message: There was a problem building trilinos-11.0.3-Source.

Question information

Language:
English Edit question
Status:
Answered
For:
Dorsal Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Johannes Ring (johannr) said :
#1

I think I remember I have seen this before and I think the solution was to just remove the dorsal_build_dir in the Trilinos source folder and rebuild Trilinos.

Revision history for this message
Phil Weir (phil-weir) said :
#2

I have just had the same problem (on OpenSUSE 12.2 using SVN Dorsal and stable build) and think I have an idea where the CMAKE_INSTALL_DIR vars are going. I was also having some difficulty that was not being cleared by wiping the dorsal_build_dir, which led me to get into this rather than deleting CMakeCache.txt and moving on, but I have recorded what I came across in case this helps anyone else confused by a '/usr/local' error.

When you re-run Dorsal and reach Trilinos, CMake compares the CMAKE_C_COMPILER, CMAKE_CXX_COMPILER and CMAKE_Fortran_COMPILER with those cached in ${BUILD_DIR}/src/trilinos-XXX/dolfin_build_dir/CMakeCache.txt . In my case, they did not quite match, and so CMake heads off for another round:

--- dorsal_configure.log: 285-290 ---
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_C_COMPILER= mpicc
CMAKE_CXX_COMPILER= mpicxx
CMAKE_Fortran_COMPILER= mpif90
---------------------------------------------

The log output of the second CMake run follows. As a consequence of this, CMake loses the -D variables on the second round, such as CMAKE_INSTALL_DIR, and gives misleading fail messages.

I found changing CMAKE_C_COMPILER:FILEPATH="mpicxx" to CMAKE_C_COMPILER="mpicxx" in trilinos.package was sufficient to let the comparison pass during the dorsal run.

This may be the same issue in a non-Dorsal setting, although the interpretation there is a bit different: http://www.cmake.org/pipermail/cmake/2011-February/042629.html

Can you help with this problem?

Provide an answer of your own, or ask Martin Sandve Alnæs for more information if necessary.

To post a message you must log in.