ADOL-C not found through SPACK installation of deal.ii 9.2

94 views
Skip to first unread message

Behrooz Karami

unread,
Jan 8, 2021, 2:22:44 AM1/8/21
to dea...@googlegroups.com
Dear Everyone,

During installation of deal.ii 9.2 through SPACK I receive the following error on ADOL-C:
1 error found in build log:
     549    -- Could not find a sufficient ADOL-C installation: Possible symbol
             clash between the ADOL-C library and Trilinos' SEACASChaco detecte
            d
     550    -- Performing Test ADOLC_DOUBLE_CAST_CHECK
     551    -- Performing Test ADOLC_DOUBLE_CAST_CHECK - Success
     552    -- Performing Test ADOLC_ADOUBLE_OSTREAM_CHECK
     553    -- Performing Test ADOLC_ADOUBLE_OSTREAM_CHECK - Success
     554    -- DEAL_II_WITH_ADOLC has unmet external dependencies.
  >> 555    CMake Error at cmake/macros/macro_configure_feature.cmake:112 (MESS
            AGE):

This is while 3 versions of ADOL-C are installed (separately and through SPACK as well) and even deal.ii is detecting one of them as:
==> adol-c is already installed in /home/behrooz/Spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.3.0/adol-c-develop-omjty56hedqyctgkyppbd5cgszby3fmv

Any idea on what I should do about that?
Thanks very much,
Behrooz


Jean-Paul Pelteret

unread,
Jan 8, 2021, 1:22:45 PM1/8/21
to dea...@googlegroups.com
Dear Behrooz,

The problem here is that your Trilinos installation includes the SEACASChaco package. We'd discovered that there's a common global symbol that both ADOL-C and Trilinos-SEACASChaco emit, which causes some very strange issues when using ADOL-C. Naturally, we had to make sure that nobody runs into these troubles, because the symptoms of the issue are not indicative of the underlying problem and are incredibly difficult to debug. So although deal.II is picking up the ADOL-C library, deal.II also detects that Trilinos has the SEACASChaco module enabled and therefore is doing the safe thing by having the configuration process fail with an error.

I'm betting that you have a slightly old version of Spack, because we have some conflicts in place to prevent this "illegal" combination of packages / package variants from being installed. You can see these restrictions here:
https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/dealii/package.py#L273-L284
The way to fix the problem is by recompiling Trilinos without this package (variant, in Spack parlance) enabled. You can do this in the following way:
spack install dealii@9.2+adol-c+trilinos ^trilinos~chaco

You'll note that it's also not possible to enable both ADOL-C and Netcdf, for the same reason, so you actually want to be even more restrictive:
spack install dealii@9.2+adol-c+trilinos~netcdf ^trilinos~chaco~exodus~netcdf~pnetcdf

I hope that this helps you getting deal.II installed through Spack.

Best,
Jean-Paul
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/CAPPKNqY0h0ZBUQ_D8tzPOuP_mz7L%3DwaPFUD%2B0dmHgqtCQMwmJA%40mail.gmail.com.

Behrooz Karami

unread,
Jan 13, 2021, 5:50:29 AM1/13/21
to deal.II User Group
Dear  Jean-Paul,

Thanks very much for your explanations. It helped me a lot to better understanding of Spack environment and its functionality. You were also right, my Spack version is a bit old.
Anyway, after some further manipulations I was a able to configure Trilions.

However thereafter, and when it comes to deal.ii installation I receive the following error message:
Error: ProcessError: Command exited with status 2:
    'make' '-j8'

Since the machine on which I am trying to install deal.ii is old and I have already been facing memory limitations, I thought it might be a again memory related issue. Thereby I reduced the number of jobs to 4 but it did not help this time and conditions exist with the same message.
So I was wondering if there might still be any way around?

Thank you very much,
Behrooz

Jean-Paul Pelteret

unread,
Jan 13, 2021, 2:14:07 PM1/13/21
to dea...@googlegroups.com
Hi Behrooz,

Great, I'm glad that you're at least one step closer to getting deal.II installed. Unfortunately, the information that you've provided about the build error is not enough to diagnose what the problem is. Can you attach the build log so that we can take a look at them? When the build is not successful, Spack normally tells you where the log files are located (they're in a "staging" directory where deal.II gets built, so its some temporary that Spack sets up and is specific to your system so I can't tell you precisely where they'd be). For further reference, search for "build log" on this page
https://spack-tutorial.readthedocs.io/en/latest/tutorial_packaging.html#creating-the-package-file
to see what I mean -- they give an example of some output of a package that has not built successfully.

Best,
Jean-Paul

Behrooz Karami

unread,
Jan 14, 2021, 4:45:18 AM1/14/21
to dea...@googlegroups.com
Hi Jean-Paul,

Please kindly find the 'spack-build.out' file as attached. This is what Spack mentioned as a build log for details. Hope to be the correct one.

Thank you very much,
Behrooz
spack-build.out

Jean-Paul Pelteret

unread,
Jan 14, 2021, 1:52:38 PM1/14/21
to dea...@googlegroups.com
Hi Behrooz,

It looks like you're getting some internal compiler errors:

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
source/dofs/CMakeFiles/obj_dofs_debug.dir/build.make:169: recipe for target 'source/dofs/CMakeFiles/obj_dofs_debug.dir/dof_handler_policy.cc.o' failed
make[2]: *** [source/dofs/CMakeFiles/obj_dofs_debug.dir/dof_handler_policy.cc.o] Error 4
make[2]: *** Waiting for unfinished jobs....

This could indicate that you're still running out of memory. I would suggest compiling with '-j 2' or even '-j 1', just to be sure.

Let us know if you still have troubles after trying that. You're using GCC 7.3.0, which as far as I know shouldn't have any troubles building the library.

Best,
Jean-Paul

Behrooz Karami

unread,
Jan 16, 2021, 4:04:11 AM1/16/21
to deal.II User Group
Hi Jean-Paul,

Thanks very much again. '-j 2'  worked! And deal.ii 9.2 was successfully installed. It just has remained hopefully a minor issue; as when I test my installation against step-18 I receive the following message showing cmake is looking  a wrong place for configurations:

Error! This tutorial requires a deal.II library that was configured with
  the following options:

      DEAL_II_WITH_MPI = ON
      DEAL_II_WITH_PETSC = ON
      DEAL_II_PETSC_WITH_COMPLEX = OFF
However, the deal.II library found at /usr/local was configured with these
  options

      DEAL_II_WITH_MPI = OFF
      DEAL_II_WITH_PETSC = OFF
      DEAL_II_PETSC_WITH_COMPLEX =

This is while I use the 
'cmake -DDEAL_II_DIR=/path/to/the/source .'
command to address the right configurations. Also when I check the cmake configurations in installed folder they look OK and with correct configurations.
Could you please advise me on this issue as well?

Thank you,
Behrooz

Wolfgang Bangerth

unread,
Jan 16, 2021, 11:25:01 AM1/16/21
to dea...@googlegroups.com
On 1/16/21 2:04 AM, Behrooz Karami wrote:
>
> Error! This tutorial requires a deal.II library that was configured with
>   the following options:
>
>       DEAL_II_WITH_MPI = ON
>       DEAL_II_WITH_PETSC = ON
>       DEAL_II_PETSC_WITH_COMPLEX = OFF
> However, the deal.II library found at /usr/local was configured with these
>   options
>
>       DEAL_II_WITH_MPI = OFF
>       DEAL_II_WITH_PETSC = OFF
>       DEAL_II_PETSC_WITH_COMPLEX =
>
> This is while I use the
> 'cmake -DDEAL_II_DIR=/path/to/the/source .'
> command to address the right configurations. Also when I check the cmake
> configurations in installed folder they look OK and with correct configurations.
> Could you please advise me on this issue as well?

Behrooz -- the error message says what the problem is. step-18 requires
"DEAL_II_WITH_MPI=ON", but your installation has "DEAL_II_WITH_MPI=OFF", and
similarly for PETSc. In order to run step-18, you need to install deal.II with
a PETSc installation and with MPI installed, but you didn't. The steps
necessary to do that are listed in the doc/readme.html file.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Behrooz Karami

unread,
Jan 17, 2021, 6:50:18 AM1/17/21
to dea...@googlegroups.com
Hi Wolfgang,

That's true but maybe I should have given a bit of a background here.

I have three versions of deal.ii installed at the moment. The first one 9.0 installed through Spack, the second one 9.2 manually installed according to procedures described in the readme file; and the third one again 9.2 but installed through Spack.

The reason for the third installation was exactly the same problem mentioned here (which happened after the 2nd installation). Meaning that during the 2nd installation I didn't call my required libraries . But as the third attempt I decided to use Spack as it was already available on the machine and could install all the libraries along the way.
Finally the third installation was successful according to the output log. And when I check the config. files they are correct. I mean it seems that installation has been done with PETSc, MPI and all other required libraries. The configurations are also correct e.g. it has been indicated that:

DEAL_II_WITH_MPI = ON
DEAL_II_WITH_PETSC = ON
DEAL_II_PETSC_WITH_COMPLEX = FALSE (not OFF!)

I attach the config. files here as a reference.

So to me still it seems that deal.ii is not looking at the right folder.

I have not installed deal.ii in "/usr/local" but I could see that somehow it has been installed there (as well) probably by default! I guess it in fact has happened during the second installation. Because I got the same message when I was using the 2nd installation. I am not sure exactly which of my modifications resolved it but it was revealed to me that somehow I have a copy of deal.ii there which is called as a first choice.

Regards,
Behrooz



--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
deal.IIConfigVersion.cmake
deal.IIFeatureConfig.cmake
deal.IITargets-debugrelease.cmake
deal.IITargets.cmake
deal.IIConfig.cmake

Jean-Paul Pelteret

unread,
Jan 17, 2021, 8:30:17 AM1/17/21
to dea...@googlegroups.com
Hi Behrooz,

When you install deal.II using Spack, it is completely isolated from the system environment. That way, you can install multiple versions of the same package without them conflicting with one another. Before you can use deal.II though spack, you populate all of the environment variables with the paths to deal.II and its dependencies. The quickest way to do this is using "spack load" which is documented here (spack's documentation) and here (the deal.II wiki). For you, this would mean running "spack load dealii@9.2" or something similar, and then simply running "cmake ." in the tutorial folder (don't forget to delete CMakeCache.txt first). You can also look into using filesystem views and environment modules to the same effect.

Best,
Jean-Paul

Behrooz Karami

unread,
Jan 18, 2021, 11:46:41 AM1/18/21
to dea...@googlegroups.com
Hi Jean-Paul,

It was another to the point advice which resolved the issue completely. Much appreciated.

Best,
Behrooz

Reply all
Reply to author
Forward
0 new messages