[deal.II] repartition of parallel::shared::Triangulation

2016-07-10 Thread Ce Qin
Dear all,

When a shared::Triangulation is copied, the partition information is lost.
The triangulation is on an invalid state. I think we should reimplement the
*copy_triangulation* function that do the partition operation after the
data is copied.

I also have a suggestion that we can add a virtual function *repartition*
to its parent class parallel::Triangulation and reimplement it in
shared::Triangulation. Does this make sense? If yes, I can help with this.

Best regards,
Ce Qin

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] repartition of parallel::shared::Triangulation

2016-07-10 Thread Wolfgang Bangerth


Ce,


When a shared::Triangulation is copied, the partition information is lost. The
triangulation is on an invalid state. I think we should reimplement the
*copy_triangulation* function that do the partition operation after the data
is copied.


Yes, indeed. Can you open a bug at
  https://github.com/dealii/dealii/issues
for this? Any help in fixing this would of course be much appreciated!



I also have a suggestion that we can add a virtual function *repartition*to
its parent class parallel::Triangulation and reimplement it in
shared::Triangulation. Does this make sense? If yes, I can help with this.


That's a bit more tricky. A virtual function would only make sense if it could 
be called from some of the functions in ::Triangulation. But it's not clear to 
me where that would be. One could think about the end of 
execute_coarsening_and_refinement(), for example, but that's not how this 
currently works with p::d::Triangulation (which has a much more complicated 
scheme). So I'm not sure how much making such a function virtual would 
actually help.


Best
 W.

--

Wolfgang Bangerth   email:bange...@math.tamu.edu
www: http://www.math.tamu.edu/~bangerth/

--
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.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Re: Deal.II does not pass quick tests after installation

2016-07-10 Thread Thien Binh Nguyen
Dear Mr. Wells,

Thanks for your guidance!

I have checked whether our system has libpthread.so or not. Indeed, we have
the library installed in /usr/lib64 as shown in the below find results

[image: Hình ảnh nội tuyến 1]
So I guess this would not be the cause of the error ...

Yours sincerely,
Nguyen Thien Binh

2016-07-09 0:59 GMT+09:00 David Wells :

> Mr. Nguyen,
>
> Well, this is awkward. I looked over your files carefully and I see
> nothing unusual in the configuration. CMake definitely, at some point,
> recognizes that it needs to link against libpthread but it never seems to
> do it. I really hope that we can figure this out because it is probably a
> bug in our CMake code.
>
> I think that one way to get around this temporarily would be to compile
> the library without threads, i.e., compile it with the flag
> -DDEAL_II_WITH_THREADS=OFF. That should let you compile the library but you
> won't be able to use threads (bad, but better than nothing).
>
> I am running out of explanations for this error. Would you humor me and
> check that you do have /usr/lib/libpthread.so or /usr/lib64/libpthread.so
> on your system? Perhaps the libraries are in some strange place that CMake
> cannot find.
>
> Thanks,
> David Wells
>
> On Tuesday, July 5, 2016 at 12:02:43 AM UTC-4, deal.II newbie wrote:
>>
>> Dear Mr. Wells,
>>
>> Thanks for your help again!
>>
>> I would like to send you the detailed.log as well as summary.log and
>> quicktests.log. Could you please have a check on the attachment?
>>
>> I hope these will give some information about the error.
>>
>> Yours sincerely,
>> Nguyen Thien Binh
>>
>> 2016-07-05 6:40 GMT+09:00 David Wells :
>>
>>> Mr. Nguyen,
>>>
>>> Not a problem; I hope that I can help :)
>>>
>>> That is odd; it doesn't seem to have linked (or tried to link) against
>>> libpthread at all. This implies that (since it compiled successfully) it
>>> never tried to link with libpthread. Would you please post the file
>>> detailed.log (should be in your build directory)? Mine specifies the
>>> variable THREAD_LINKER_FLAGS; I suspect that variable is not correct in
>>> your copy.
>>>
>>> Thanks,
>>> David Wells
>>>
>>>
>>> On Sun, Jul 3, 2016 at 9:30 PM, Thien Binh Nguyen 
>>> wrote:
>>>
 Dear Mr. Wells,

 Thank you very much for your prompt response, and I am also sorry for
 my late reply!

 When ldd either to libdeal_II.so or libdeal_II.g.so, I received the
 following messages

 [image: Hình ảnh nội tuyến 1]
 As you noticed, I compiled Deal.II with root privilege. I was trying to
 re-installed and complied Deal.II with my own account. But I still got the
 same error messages.

 Thank you very much!

 Yours sincerely,
 Nguyen Thien Binh

 2016-07-01 23:42 GMT+09:00 David Wells :

> Hi there,
>
> Well that is something I have not seen before: it looks like it did
> not link correctly to your copy of libpthread.so. To confirm this, could
> you run
>
> ldd build-directory/lib/libdeal_II.so
>
> (where build-directory is whereever you compiled the library)
>
> and see if it did not find a particular library.
>
> Since it looks like the library is in '/root/': did you compile this
> as root? If so weird things can happen; you should build it as an
> unprivileged user.
>
> Thanks,
> David Wells
>
> On Thursday, June 30, 2016 at 2:00:22 AM UTC-4, deal.II newbie wrote:
>>
>> Hi! I am a newbie to Deal.II. After the installation, I typed the
>> command make test for running the quick tests. But all four tests failed
>> out of four. The reason listed below in the quicktests.log is the same 
>> for
>> all 4 tests. I would like to ask if anyone could please help indicate 
>> what
>> the error is and how to fix it? Any help or hints would be much
>> appreciated! Thank you very much in advance!
>>
>> The error is the same for all 4 tests as follows,
>>
>> Scanning dependencies of target tbb.debug
>> [100%] Building CXX object
>> tests/quick_tests/CMakeFiles/tbb.debug.dir/tbb.cc.o
>> /root/dealii-8.4.1/tests/quick_tests/tbb.cc:49:6: warning: unused
>> parameter ‘scratch’ [-Wunused-parameter]
>> Linking CXX executable tbb.debug
>> ../../lib/libdeal_II.g.so.8.4.1: undefined reference to
>> `pthread_mutexattr_destroy'
>> ../../lib/libdeal_II.g.so.8.4.1: undefined reference to `pthread_join'
>> ../../lib/libdeal_II.g.so.8.4.1: undefined reference to
>> `pthread_detach'
>> ../../lib/libdeal_II.g.so.8.4.1: undefined reference to
>> `pthread_barrier_wait'
>> ../../lib/libdeal_II.g.so.8.4.1: undefined reference to
>> `pthread_mutexattr_settype'
>> ../../lib/libdeal_II.g.so.8.4.1: undefined reference to
>> `pthread_mutex_trylock'
>> ../../lib/libdeal_II.g.so.8.4.1: undefined reference to
>> `pthread_barrier_init'
>> ../../lib/libdeal_II.g.

Re: [deal.II] repartition of parallel::shared::Triangulation

2016-07-10 Thread Ce Qin
Dear Wolfgang,


> Yes, indeed. Can you open a bug at
>   https://github.com/dealii/dealii/issues
> for this? Any help in fixing this would of course be much appreciated!
>
>
I have opened an issue at #2798
. I will try to fix it.

Best regards,
Ce Qin

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Re: Deal.II does not pass quick tests after installation

2016-07-10 Thread Thien Binh Nguyen
Dear Mr. Wells,

I am sorry but if you would please kindly delete the attached figure in the
previous mail and replace it with the following?

[image: Hình ảnh nội tuyến 1]
This is because the previous one contains our machine's IP address. Since
all these messages are supposed to be on public in Deal.II community, I
think it would be better such information is not shown in cases of any
unexpected problems.

Thank you very much!

Yours sincerely,
Nguyen Thien Binh

2016-07-11 10:40 GMT+09:00 Thien Binh Nguyen :

> Dear Mr. Wells,
>
> Thanks for your guidance!
>
> I have checked whether our system has libpthread.so or not. Indeed, we
> have the library installed in /usr/lib64 as shown in the below find results
>
> [image: Hình ảnh nội tuyến 1]
> So I guess this would not be the cause of the error ...
>
> Yours sincerely,
> Nguyen Thien Binh
>
> 2016-07-09 0:59 GMT+09:00 David Wells :
>
>> Mr. Nguyen,
>>
>> Well, this is awkward. I looked over your files carefully and I see
>> nothing unusual in the configuration. CMake definitely, at some point,
>> recognizes that it needs to link against libpthread but it never seems to
>> do it. I really hope that we can figure this out because it is probably a
>> bug in our CMake code.
>>
>> I think that one way to get around this temporarily would be to compile
>> the library without threads, i.e., compile it with the flag
>> -DDEAL_II_WITH_THREADS=OFF. That should let you compile the library but you
>> won't be able to use threads (bad, but better than nothing).
>>
>> I am running out of explanations for this error. Would you humor me and
>> check that you do have /usr/lib/libpthread.so or /usr/lib64/libpthread.so
>> on your system? Perhaps the libraries are in some strange place that CMake
>> cannot find.
>>
>> Thanks,
>> David Wells
>>
>> On Tuesday, July 5, 2016 at 12:02:43 AM UTC-4, deal.II newbie wrote:
>>>
>>> Dear Mr. Wells,
>>>
>>> Thanks for your help again!
>>>
>>> I would like to send you the detailed.log as well as summary.log and
>>> quicktests.log. Could you please have a check on the attachment?
>>>
>>> I hope these will give some information about the error.
>>>
>>> Yours sincerely,
>>> Nguyen Thien Binh
>>>
>>> 2016-07-05 6:40 GMT+09:00 David Wells :
>>>
 Mr. Nguyen,

 Not a problem; I hope that I can help :)

 That is odd; it doesn't seem to have linked (or tried to link) against
 libpthread at all. This implies that (since it compiled successfully) it
 never tried to link with libpthread. Would you please post the file
 detailed.log (should be in your build directory)? Mine specifies the
 variable THREAD_LINKER_FLAGS; I suspect that variable is not correct in
 your copy.

 Thanks,
 David Wells


 On Sun, Jul 3, 2016 at 9:30 PM, Thien Binh Nguyen 
 wrote:

> Dear Mr. Wells,
>
> Thank you very much for your prompt response, and I am also sorry for
> my late reply!
>
> When ldd either to libdeal_II.so or libdeal_II.g.so, I received the
> following messages
>
> [image: Hình ảnh nội tuyến 1]
> As you noticed, I compiled Deal.II with root privilege. I was trying
> to re-installed and complied Deal.II with my own account. But I still got
> the same error messages.
>
> Thank you very much!
>
> Yours sincerely,
> Nguyen Thien Binh
>
> 2016-07-01 23:42 GMT+09:00 David Wells :
>
>> Hi there,
>>
>> Well that is something I have not seen before: it looks like it did
>> not link correctly to your copy of libpthread.so. To confirm this, could
>> you run
>>
>> ldd build-directory/lib/libdeal_II.so
>>
>> (where build-directory is whereever you compiled the library)
>>
>> and see if it did not find a particular library.
>>
>> Since it looks like the library is in '/root/': did you compile this
>> as root? If so weird things can happen; you should build it as an
>> unprivileged user.
>>
>> Thanks,
>> David Wells
>>
>> On Thursday, June 30, 2016 at 2:00:22 AM UTC-4, deal.II newbie wrote:
>>>
>>> Hi! I am a newbie to Deal.II. After the installation, I typed the
>>> command make test for running the quick tests. But all four tests failed
>>> out of four. The reason listed below in the quicktests.log is the same 
>>> for
>>> all 4 tests. I would like to ask if anyone could please help indicate 
>>> what
>>> the error is and how to fix it? Any help or hints would be much
>>> appreciated! Thank you very much in advance!
>>>
>>> The error is the same for all 4 tests as follows,
>>>
>>> Scanning dependencies of target tbb.debug
>>> [100%] Building CXX object
>>> tests/quick_tests/CMakeFiles/tbb.debug.dir/tbb.cc.o
>>> /root/dealii-8.4.1/tests/quick_tests/tbb.cc:49:6: warning: unused
>>> parameter ‘scratch’ [-Wunused-parameter]
>>> Linking CXX executable tbb.debug
>>> ../../li

[deal.II] Problem building dealii with PETSc

2016-07-10 Thread Pete Griffin
I am trying to get PETSc running with dealii-8.4.1. (on Ubuntu 16.04) 
Reading the documentation it looks
like I don't need to have MPI. (???) I downloaded petsc-3.6.4 and most 
recently compiled it with:

./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran 
--download-fblaslapack  --with-mpi=0

This resulted in the following being created in 
petsc-3.6.4/arch-linux2-c-debug:

ls -R lib

lib:
libfblas.a  libflapack.a  libpetsc.so  libpetsc.so.3.6  libpetsc.so.3.6.4 
 petsc  pkgconfig

lib/petsc:
conf

lib/petsc/conf:
configure.log  error.logfiles  make.log  PETScConfig.cmake 
 petscvariables  reconfigure-arch-linux2-c-debug.py
configure.log.bkp  fblaslapack  gmake.log  modules   petscrules 
RDict.dbtest.log

lib/petsc/conf/modules:
petsc

lib/petsc/conf/modules/petsc:
3.6.4

lib/pkgconfig:
PETSc.pc

and

ls -R include/

include/:
mpi.modpetscdef.mod  petscdm.mod  petscksp.mod 
   petscpcdef.modpetscsys.mod
petscaodef.mod petscdmcomposite.mod  petscfix.h   
petscmachineinfo.h  petscpc.mod   petsctsdef.mod
petscao.modpetscdmdadef.mod  petscisdef.mod   petscmatdef.mod   
  petscsnesdef.mod  petscts.mod
petscconf.hpetscdmda.mod petscis.mod  petscmat.mod 
   petscsnes.mod petscvecdef.mod
petscconfiginfo.h  petscdmdef.modpetsckspdef.mod  petsc.mod 
  petscsysdef.mod   petscvec.mod

Originally I compiled without the --with-mpi=0 and mpi libraries were 
created. The MPI version
did not work! Since I am running on a single computer MPI was not needed 
and tried without it.

=

The basic error is, with full details below:

-- Found PETSC
-- Could not find a sufficient PETSc installation: PETSc has to be
   configured with the same MPI configuration as deal.II.
-- DEAL_II_WITH_PETSC has unmet external dependencies.
CMake Error at cmake/configure/configure_3_petsc.cmake:110 (MESSAGE):
  

  Could not find the petsc library!

  Could not find a sufficient PETSc installation:

  PETSc has to be configured with the same MPI configuration as deal.II, but
  found:

DEAL_II_WITH_MPI = OFF
PETSC_WITH_MPI   = (NOT FALSE)



I assume the -DDEAL_II_WITH_MPI=OFF switch would work since I created PETsc 
with
  --with-mpi=0 and since mpi files were not created.



Thanks, Pete Griffin


=
THE RESULTS OF cmake for dealii were as follows:
=

$ cd dealii-8.4.1-PETSc/
/dealii-8.4.1-PETSc$ mkdir build
/dealii-8.4.1-PETSc$ cd build
=
/dealii-8.4.1-PETSc/build$ cmake 
-DCMAKE_INSTALL_PREFIX=/home/pgriffin/mylibs/dealii-8.4.1-PETSc 
-DPETSC_DIR=/petsc-3.6.4/arch-linux2-c-debug/lib -DPETSC_ARCH=x86_64 
 -DDEAL_II_WITH_MPI=OFF -DDEAL_II_WITH_PETSC=ON  ../
=
-- This is CMake 3.5.1
-- 
-- Include /dealii-8.4.1-PETSc/cmake/setup_external_macros.cmake
-- Include /dealii-8.4.1-PETSc/cmake/macros/macro_enable_if_supported.cmake
-- Include /dealii-8.4.1-PETSc/cmake/macros/macro_deal_ii_find_file.cmake
-- Include /dealii-8.4.1-PETSc/cmake/macros/macro_deal_ii_setup_target.cmake
-- Include 
/dealii-8.4.1-PETSc/cmake/macros/macro_deal_ii_insource_setup_target.cmake
-- Include /dealii-8.4.1-PETSc/cmake/macros/macro_add_flags.cmake
-- Include 
/dealii-8.4.1-PETSc/cmake/macros/macro_deal_ii_add_dependencies.cmake
-- Include 
/dealii-8.4.1-PETSc/cmake/macros/macro_deal_ii_invoke_autopilot.cmake
-- Include /dealii-8.4.1-PETSc/cmake/macros/macro_push_cmake_required.cmake
-- Include 
/dealii-8.4.1-PETSc/cmake/macros/macro_enable_language_optional.cmake
-- Include 
/dealii-8.4.1-PETSc/cmake/macros/macro_filter_system_libraries.cmake
-- Include /dealii-8.4.1-PETSc/cmake/macros/macro_purge_feature.cmake
-- Include 
/dealii-8.4.1-PETSc/cmake/macros/macro_switch_library_preference.cmake
-- Include /dealii-8.4.1-PETSc/cmake/macros/macro_remove_duplicates.cmake
-- Include 
/dealii-8.4.1-PETSc/cmake/macros/macro_check_cxx_compiler_bug.cmake
-- Include 
/dealii-8.4.1-PETSc/cmake/macros/macro_deal_ii_query_git_information.cmake
-- Include /dealii-8.4.1-PETSc/cmake/macros/macro_clear_cmake_required.cmake
-- Include /dealii-8.4.1-PETSc/cmake/macros/macro_set_if_empty.cmake
-- Include 
/dealii-8.4.1-PETSc/cmake/macros/macro_expand_instantiations.cmake
-- Include /dealii-8.4.1-PETSc/cmake/macros/macro_reset_cmake_required.cmake
-- Include /dealii-8.4.1-PETSc/cmake/macros/macro_replace_flag.cmake
-- Include /dealii-8.4.1-PETSc/cmake/macros/macro_register_feature.cmake
-- Include /dealii-8.4.1-PETSc/cmake/macros/macro_find_package.cmake
-- Include /dealii-8