[deal.II] deal.II installation on cray XC50 giving MPI_VERSION=0.0

2020-02-05 Thread vachan potluri
Hello,

I am trying to install deal.II on a cray XC50 supercomputer.

cmake -DCMAKE_INSTALL_PREFIX=~/bin/dealii-9.1.1 \
-DPREFIX_PATH=/opt/cray/pe \
-DCMAKE_CXX_COMPILER=/opt/cray/pe/craype/2.5.13/bin/CC \
-DWITH_MPI=ON \
-DWITH_PETSC=OFF -DPETSC_DIR=$PETSC_DIR -DPETSC_ARCH=$PETSC_ARCH \
-DWITH_P4EST=ON -DP4EST_DIR=~/bin/p4est-2.2 \
~/source/dealii-9.1.1

I have attached detailed.log and summary.log. Although the configuring 
exits without errors, I can see in detailed.log that MPI_VERSION was not 
detected correctly. The compilers were correctly detected. All other 
variables are just blanks. The relevant snippet of detailed.log is as 
follows:

#DEAL_II_WITH_MPI set up with external dependencies
#MPI_VERSION = 0.0
#MPI_C_COMPILER = /opt/cray/pe/craype/2.5.13/bin/cc
#MPI_CXX_COMPILER = /opt/cray/pe/craype/2.5.13/bin/CC
#MPI_Fortran_COMPILER = /opt/cray/pe/craype/2.5.13/bin/ftn
#MPI_CXX_FLAGS = 
#MPI_LINKER_FLAGS = 
#MPI_INCLUDE_DIRS = 
#MPI_USER_INCLUDE_DIRS = 
#MPI_LIBRARIES = 

Is this an issue? How to fix this? I had loaded cray-mpich module before 
invoking cmake and switched PrgEnv-cray with PrgEnv-gnu.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/71a50bd5-acf1-4cd5-b3a8-bcb0fd295399%40googlegroups.com.
###
#
#  deal.II configuration:
#CMAKE_BUILD_TYPE:   DebugRelease
#BUILD_SHARED_LIBS:  ON
#CMAKE_INSTALL_PREFIX:   
/home/ComptGasDynLab/vachanpotluri/bin/dealii-9.1.1
#CMAKE_SOURCE_DIR:   
/home/ComptGasDynLab/vachanpotluri/source/dealii-9.1.1
#(version 9.1.1)
#CMAKE_BINARY_DIR:   
/home/ComptGasDynLab/vachanpotluri/build/dealii-9.1.1
#CMAKE_CXX_COMPILER: GNU 7.2.0 on platform Linux x86_64
#/opt/cray/pe/craype/2.5.13/bin/CC
#CMAKE_C_COMPILER:   /opt/cray/pe/craype/2.5.13/bin/cc
#CMAKE_Fortran_COMPILER: /opt/cray/pe/craype/2.5.13/bin/ftn
#CMAKE_GENERATOR:Unix Makefiles
#
#  Base configuration (prior to feature configuration):
#DEAL_II_CXX_FLAGS:-pedantic -fPIC -Wall -Wextra 
-Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wsuggest-override -Wswitch 
-Wsynth -Wwrite-strings -Wno-placement-new -Wno-deprecated-declarations 
-Wno-literal-suffix -Wno-psabi -fopenmp-simd -std=c++17
#DEAL_II_CXX_FLAGS_RELEASE:-O2 -funroll-loops -funroll-all-loops 
-fstrict-aliasing -Wno-unused-local-typedefs
#DEAL_II_CXX_FLAGS_DEBUG:  -O0 -ggdb -Wa,--compress-debug-sections
#DEAL_II_LINKER_FLAGS: -Wl,--as-needed -rdynamic -fuse-ld=gold
#DEAL_II_LINKER_FLAGS_RELEASE: 
#DEAL_II_LINKER_FLAGS_DEBUG:   -ggdb
#DEAL_II_DEFINITIONS:  
#DEAL_II_DEFINITIONS_RELEASE:  
#DEAL_II_DEFINITIONS_DEBUG:DEBUG
#DEAL_II_USER_DEFINITIONS: 
#DEAL_II_USER_DEFINITIONS_REL: 
#DEAL_II_USER_DEFINITIONS_DEB: DEBUG
#DEAL_II_INCLUDE_DIRS  
#DEAL_II_USER_INCLUDE_DIRS:
#DEAL_II_BUNDLED_INCLUDE_DIRS: 
#DEAL_II_LIBRARIES:
#DEAL_II_LIBRARIES_RELEASE:
#DEAL_II_LIBRARIES_DEBUG:  
#DEAL_II_COMPILER_VECTORIZATION_LEVEL: 0
#
#  Configured Features (DEAL_II_ALLOW_BUNDLED = ON, DEAL_II_ALLOW_AUTODETECTION 
= ON):
#  ( DEAL_II_WITH_64BIT_INDICES = OFF )
#  ( DEAL_II_WITH_ADOLC = OFF )
#  ( DEAL_II_WITH_ARPACK = OFF )
#  ( DEAL_II_WITH_ASSIMP = OFF )
#DEAL_II_WITH_BOOST set up with bundled packages
#BOOST_CXX_FLAGS = -Wno-unused-local-typedefs
#BOOST_DEFINITIONS = BOOST_NO_AUTO_PTR
#BOOST_USER_DEFINITIONS = BOOST_NO_AUTO_PTR
#BOOST_BUNDLED_INCLUDE_DIRS = 
/home/ComptGasDynLab/vachanpotluri/source/dealii-9.1.1/bundled/boost-1.62.0/include
#BOOST_LIBRARIES = rt
#DEAL_II_WITH_COMPLEX_VALUES = ON
#  ( DEAL_II_WITH_CUDA = OFF )
#DEAL_II_WITH_CXX14 = ON
#DEAL_II_WITH_CXX17 = ON
#  ( DEAL_II_WITH_GINKGO = OFF )
#  ( DEAL_II_WITH_GMSH = OFF )
#  ( DEAL_II_WITH_GSL = OFF )
#  ( DEAL_II_WITH_HDF5 = OFF )
#  ( DEAL_II_WITH_LAPACK = OFF )
#  ( DEAL_II_WITH_METIS = OFF )
#DEAL_II_WITH_MPI set up with external dependencies
#MPI_VERSION = 0.0
#MPI_C_COMPILER = /opt/cray/pe/craype/2.5.13/bin/cc
#MPI_CXX_COMPILER = /opt/cray/pe/craype/2.5.13/bin/CC
#

[deal.II] Error in make_hanging_node_constraints() while using parallel::distributed::Triangulation with hp::DoFHandler

2020-02-05 Thread Chaitanya Dev
Dear Deal.II Community,

I am trying to use parallel::distributed::Triangulation with 
hp::DoFHandler. I run into the below error in 
DoFTools::make_hanging_node_constraints..

I work on shape optimization using embedding domain discretization 
techniques. In my problems, I have to repeatedly refine the mesh and 
approximate the geometry. Then I assign different FESystem for the cells 
within and outside the geometry. 

I have implemented the code in serial with serial triangulation and 
hp::DoFHandler and the program works. 

Now I wish to solve larger problems so I have decided to parallelize the 
code and hence I use parallel::distributed::Triangulation.

Here I run into a problem in system_setup, specifically in the 
function DoFTools::make_hanging_node_constraints.

Hear is the error message.

An error occurred in line <1119> of file 

 
in function
void dealii::DoFTools::internal::make_hp_hanging_node_constraints(const 
DoFHandlerType&, dealii::AffineConstraints&) [with DoFHandlerType = 
dealii::hp::DoFHandler<2, 2>; number = double]
The violated condition was: 
cell->face(face)->child(c)->n_active_fe_indices() == 1
Additional information: 
This exception -- which is used in many places in the library -- 
usually indicates that some condition which the author of the code thought 
must be satisfied at a certain point in an algorithm, is not fulfilled. An 
example would be that the first part of an algorithm sorts elements of an 
array in ascending order, and a second part of the algorithm later 
encounters an element that is not larger than the previous one.

There is usually not very much you can do if you encounter such an 
exception since it indicates an error in deal.II, not in your own program. 
Try to come up with the smallest possible program that still demonstrates 
the error and contact the deal.II mailing lists with it to obtain help.

Stacktrace:
---
#0  
/opt/dealii-9.1.1/opt/spack/linux-ubuntu18.04-haswell/gcc-7.4.0/dealii-9.1.1-holxtax5bwynpjaccyvwkli2ybveslrl/lib/libdeal_II.g.so.9.1.1:
 
void 
dealii::DoFTools::internal::make_hp_hanging_node_constraints, double>(dealii::hp::DoFHandler<2, 2> const&, 
dealii::AffineConstraints&)
#1  
/opt/dealii-9.1.1/opt/spack/linux-ubuntu18.04-haswell/gcc-7.4.0/dealii-9.1.1-holxtax5bwynpjaccyvwkli2ybveslrl/lib/libdeal_II.g.so.9.1.1:
 
void 
dealii::DoFTools::make_hanging_node_constraints, double>(dealii::hp::DoFHandler<2, 2> const&, 
dealii::AffineConstraints&)
#2  hp-dist-test: TestProblem<2>::setup_system()
#3  hp-dist-test: TestProblem<2>::run()
#4  hp-dist-test: main


This is my setup_system function.

*template*
*void TestProblem::setup_system() {*

* dof_handler.initialize(triangulation, fe_collection);*

* for (auto cell : dof_handler.active_cell_iterators()) {*
* if (!cell->is_locally_owned())*
* continue;*
* if (cell->user_flag_set())*
* cell->set_active_fe_index(0);*
* else*
* cell->set_active_fe_index(1);*
* }*

* dof_handler.distribute_dofs(fe_collection);*
* locally_owned_dofs = dof_handler.locally_owned_dofs();*
* DoFTools::extract_locally_relevant_dofs(dof_handler, 
locally_relevant_dofs);*

* hanging_node_constraints.clear();*
* hanging_node_constraints.reinit(locally_relevant_dofs);*

* DoFTools::make_hanging_node_constraints(dof_handler,*
* hanging_node_constraints);*
* hanging_node_constraints.close();*
*}*

I did some debugging and found that the Assert fail 
cell->face(face)->child(c)->n_active_fe_indices() 
== 1 is failing on the *ghost cells*. To avoid this error  I tried to 
set_active_fe_index for the ghost cells, but this is not allowed. 

Please let me know where I am going wrong.

I have attached a MWE. You can reproduce the error with mpirun for np >= 2 
cores (the code will work for np=1, because no ghost cells). 

Thank you,
Chaitanya Dev.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/626cb4ca-8971-4511-a4d1-3ed27388%40googlegroups.com.
##
#  CMake script
##

# Set the name of the project and target:
SET(TARGET "hp-dist-test")

# Declare all source files the target consists of. Here, this is only
# the one step-X.cc file, but as you expand your project you may wish
# to add other source files as well. If your project becomes much larger,
# you may want to either replace the following statement by something like
#  FILE(GLOB_RECURSE TARGET_SRC  "source/*.cc")
#  FILE(GLOB_RECURSE TARGET_INC  "include/*.h")
#  SET(TARGET_SRC ${TARGET_SRC}  ${TARGET_INC})
# or switch altogether to the la

Re: [deal.II] Question on KINSOL::SUNDIALS

2020-02-05 Thread Daniel Arndt
Rochan,

there is Algorithms::Newton that can be used to set up a Newton method and
there are multiple tutorial examples that deal with nonlinear problems.
Have a look at step-15, step-25, step-44 and in particular step-42.

Best,
Daniel

On Tue, Feb 4, 2020, 6:45 PM rru  wrote:

> Dear dealii developers,
>
> I have a quick question on non-linear solvers in dealii.
> As far as I could gather, the only option for a newton solver is the
> wrapper SUNDIALS::KINSOL, and for DAE the wrapper SUNDIALS::IDA. Is that
> correct ?
> In that event, is it possible to set up inequality constraints. In the
> documentation it is mentioned that the following "optional" functions can
> be supplied but syntax or description for them is not provided :
>
>- get_lower_than_zero_constrained_entries()
>- get_greater_than_zero_constrained_entries()
>- get_lower_equal_than_zero_constrained_entries()
>- get_greater_or_equal_than_zero_constrained_entries()
>
> Regards,
> Rochan
>
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/8c34994d-1ef3-4930-83e6-dc25c3c873c9%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAOYDWbK9g19obM4RtpxaQHVGNMiKPcvdz84cA3Yrq0xEbPmUCQ%40mail.gmail.com.