dealii 9.3.0 make install fails at "Generating mpi.inst" with Invalid instantiation list: missing 'for'

48 views
Skip to first unread message

vachanpo...@gmail.com

unread,
Jun 22, 2021, 9:20:51 AM6/22/21
to deal.II User Group
Dear all,

I am installing a newer version of dealii on our cluster (cray xc50) and make install fails at "Generating mpi.inst" with the statement
Invalid instantiation list: missing 'for'
make[2]: *** [source/base/CMakeFiles/obj_base_inst.dir/build.make:135: source/base/mpi.inst] Error 1
make[1]: *** [CMakeFiles/Makefile2:2408: source/base/CMakeFiles/obj_base_inst.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

I am attaching the output of the configuration. The options used for configuration are as follows.

cmake -DCMAKE_INSTALL_PREFIX=~/bin/dealii-9.3.0/ \
        -DWITH_64BIT_INDICES=ON \
-DCMAKE_PREFIX_PATH=/opt/cray/pe/lib64 \
-DWITH_MPI=ON \
                -DMPI_DIR=/opt/cray/pe/mpt/default/gni/mpich-gnu/8.2/ \
                -DMPI_CXX_INCLUDE_PATH=/opt/cray/pe/mpt/default/gni/mpich-gnu/8.2/include/ \
                -DCMAKE_CXX_COMPILER=$(which CC) \
                -DCMAKE_C_COMPILER=$(which cc) \
                -DCMAKE_Fortran_COMPILER=$(which ftn) \
        -DWITH_BLAS=OFF \
        -DWITH_LAPACK=OFF \
        -DWITH_SCALAPACK=OFF \
        -DWITH_PETSC=ON \
-DWITH_P4EST=ON -DP4EST_DIR=~/bin/p4est-2.2/ \
        -DCMAKE_SYSTEM_NAME=CrayLinuxEnvironment \
~/source/dealii-9.3.0

Earlier, with some fixes, I was able to install 9.1.1. I am unable to ascertain the source of this. Any help would be greatly appreciated.

Thanking in anticipation
Vachan
configure.log

vachan potluri

unread,
Jun 23, 2021, 2:18:36 AM6/23/21
to dea...@googlegroups.com
I had noticed that this make error would occur if the file being expanded doesn't have a prefix 'for'. The following snippet is from line 453- of dealii/cmake/scripts/expand_instantiations.cc
if (!has_prefix(whole_file, "for"))
{
std::cerr << "Invalid instantiation list: missing 'for'" << std::endl;
std::exit(1);
}

Now, I also noticed that dealii/source/base/mpi.inst.in has all the template function instantiations enclosed within #ifndef DOXYGEN ... #endif. And in fact, this is the only instantiation file which does so. I thought this could be the issue and commented these two statements (#ifndef and #endif). Then the installation went past this point (not complete yet though).

I have two questions based on what I saw so far.
  1. Why are the mpi function instantiations to be declared only when doxygen is not configured.
  2. If I understand correctly, the function expand_instantiations.cc also has the following code snippet to ignore any preprocessor macros (line 445). Why is this not working when the line #ifndef DOXYGEN is added to mpi.inst.in?
// output preprocessor defines as is:
if (has_prefix(whole_file, "#"))
{
std::cout << get_substring_with_delim(whole_file, "\n") << '\n';
skip_space(whole_file);
continue;
}

Thanks,
Vachan

vachan potluri

unread,
Jun 23, 2021, 3:07:20 AM6/23/21
to dea...@googlegroups.com
After some time, the installation again halts with the same error this time with the file source/sundials/n_vector.inst.in.

Meanwhile, I had also noticed that there are indeed files with preprocessor commands which got through the installation. For example, source/multigrid/mg_level_global_transfer.inst.in had no issue. I went through some such files and noticed that while these files have preprocessor macros inside the "for" loop, source/sundials/n_vector.inst.in and source/base/mpi.inst.in have them outside the loop. I am guessing that this specific ordering is causing an error.

I am puzzled as to why such a thing is happening. I had installed 9.3.0 on two computers before this and had no issue. It would be great if anyone can help me with a hack to fix this.

Thanks,
Vachan
Reply all
Reply to author
Forward
0 new messages