[dune-pdelab] Heat Equation in Parallel

Dominic Kempf dominic.r.kempf at gmail.com
Fri Jun 17 10:12:11 CEST 2016


Hey Afshin,

the flags you are specifying are not meant for manual tweaking.
They should instead be set by the buildsystem through the MPI test.
When you get shown the summary from configure, does it list MPI
among the found packages.

Best,
Dominic

On Thu, Jun 16, 2016 at 7:17 PM, Afshin Loni <afshin.loni at gmail.com> wrote:

> Hi Jö,
>
> Thanks for the reply, Actually I did delete the build directory, I am
> making a debug build folder generally and I deleted it. I have an
> Install.sh file which takes care of everything and also generates the opt
> file , here it is :
>
> #!/bin/bash
>
> ROOT=$(pwd)
> if [ ! "$F77" ]; then
>   F77=gfortran
> fi
> if [ ! "$CC" ]; then
> CC=gcc
> fi
> if [ ! "$CXX" ]; then
> CXX=g++
> fi
> if [ ! "$CXXFLAGS" ]; then
> CXXFLAGS="-O3 -DNDEBUG"
> fi
> CFLAGS="$CXXFLAGS"
> if [ ! "$MAKE_FLAGS" ]; then
> MAKE_FLAGS="-j2"
> fi
>
> # To avoid an ugly cmake bug we expand our compiler variables to absolute
> paths
> export CC=$(which $CC)
> export CXX=$(which $CXX)
> export F77=$(which $F77)
>
> # Check whether we have built external dependencies
> if [ ! -d "$(pwd)/external/ug" ]; then
>   ./external.sh
> fi
>
>
> # generate an opts file with debug flags
> echo "CMAKE_FLAGS=\"
> -DUG_ROOT=$ROOT/external/ug
> -DCMAKE_C_COMPILER='$CC'
> -DCMAKE_CXX_COMPILER='$CXX'
> -DMPI_CC_COMPILER=mpicc.mpich
> -DMPI_CXX_COMPILER=mpicxx.mpich
> -DCMAKE_CXX_FLAGS='-Wall
> -DDUNE_AVOID_CAPABILITIES_IS_PARALLEL_DEPRECATION_WARNING'
> -DCMAKE_CXX_FLAGS_DEBUG='-O0 -ggdb'
> -DDUNE_SYMLINK_TO_SOURCE_TREE=1
> -DCMAKE_BUILD_TYPE=Debug
> -DCMAKE_INSTALL_PREFIX=/home/afshin/dunes/installation2
> \"" > debug.opts
>
>
>
> ./dune-common/bin/dunecontrol --opts=debug.opts
> --builddir=$(pwd)/debug-build all
>
> #to install
>  mkdir /home/afshin/dunes/installation2
>  ./dune-common/bin/dunecontrol --opts=debug.opts
> --builddir=$(pwd)/debug-build make install
>
>
> Best,
> Afshin
>
> On Thu, Jun 16, 2016 at 4:59 PM, Jö Fahlke <jorrit at jorrit.de> wrote:
>
>> Am Thu, 16. Jun 2016, 12:28:11 +0200 schrieb Afshin Loni:
>> > I am trying to solve a heat equation in parallel but it seems impossible
>> > for me, So here's the story.
>> > I have the tutorials of the course that took place in March. and
>> tutorial 3
>> > is solving the heat equation. basically the tutorial says you can run
>> the
>> > code in parallel by simply running the mpirun. as you know the code
>> checks
>> > for the mpi with mpihelper and then it prints out e.g. running in
>> parallel
>> > on 1 process(es). but when I run the heat equation on two processors it
>> > prints
>> >
>> > running in parallel on 1 process(es)
>> > running in parallel on 1 process(es)
>> >
>> > which basically means the code is running sequentially twice.
>> > I thought I need to use some flags, so I used the following flags to
>> > compile:
>> >
>> > -DMPI_CC_COMPILER=mpicc.mpich \
>> > -DMPI_CXX_COMPILER=mpicxx.mpich
>>
>> Hi!
>>
>> You need to delete your build directory and rebuild completely after
>> changing
>> such configuration flags.
>>
>> In case you did that already, or in case that did not help:  how exactly
>> are
>> you specifying those flags?  E.g. if you specify them in your .opts-file,
>> please provide it here.
>>
>> Regards,
>> Jö.
>>
>> > but I got no change.
>> > I thought tutorial 3 is incapable of running in parallel so I tried
>> > tutorial 6 which is about parallelization. But I got the same results.
>> > MPICH is also installed on my ubuntu 15.10 system.
>> >
>> > Any help would be appreciated.
>> >
>> > Regards,
>> > Afshin
>>
>> > _______________________________________________
>> > dune-pdelab mailing list
>> > dune-pdelab at dune-project.org
>> > http://lists.dune-project.org/mailman/listinfo/dune-pdelab
>>
>>
>> --
>> Jorrit (Jö) Fahlke, Institute for Computational und Applied Mathematics,
>> University of Münster, Orleans-Ring 10, D-48149 Münster
>> Tel: +49 251 83 35146 Fax: +49 251 83 32729
>>
>> If God had intended Man to Smoke, He would have set him on Fire.
>> -- fortune
>>
>
>
> _______________________________________________
> dune-pdelab mailing list
> dune-pdelab at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-pdelab
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune-pdelab/attachments/20160617/cb473a27/attachment.htm>


More information about the dune-pdelab mailing list