<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Using Docker is certainly the easiest way to do this in my experience! You can install docker desktop here <a href="https://hub.docker.com/editions/community/docker-ce-desktop-mac/" class="">https://hub.docker.com/editions/community/docker-ce-desktop-mac/</a><div class=""><br class=""></div><div class="">Then make a docker context file (preferably in an empty directory somewhere) with the following contents:</div><div class=""><br class=""></div><div class="">FROM jedbrown/mpich-ccache                                                                           <br class="">USER root<br class=""><br class=""># PACKAGE INSTALL                                                                                    <br class="">RUN apt-get -y update<br class="">RUN apt-get -y upgrade<br class="">RUN apt-get -y install build-essential<div class="">RUN apt-get -y install python3</div><div class=""><br class=""></div><div class=""># OPTIONAL</div><div class="">RUN apt-get -y install libc6-dbg</div><div class=""><br class=""></div><div class=""># VALGRIND  BUILD FROM SOURCE                                                                                         </div><div class="">WORKDIR /<br class="">RUN git clone <a href="git://sourceware.org/git/valgrind.git" class="">git://sourceware.org/git/valgrind.git</a><br class="">WORKDIR /valgrind<br class="">RUN git pull<br class="">RUN ./autogen.sh<br class="">RUN ./configure --with-mpicc=/usr/local/bin/mpicc<br class="">RUN make -j 5<br class="">RUN make install</div><div class=""><br class=""></div><div class=""># ENV VARIABLES                                                                                      <br class="">ENV PETSC_DIR="/petsc"<br class="">ENV PETSC_ARCH="arch-linux-c-debug”<br class="">RUN echo 'export PATH="/usr/lib/ccache:$PATH"' >>  ~/.bashrc</div><div class=""><br class=""></div><div class="">RUN "/usr/sbin/update-ccache-symlinks"<br class="">WORKDIR /petsc<br class=""><br class="">Then simply run these commands from command line:</div><div class=""><br class="">docker build -t valgrinddocker:latest /PATH/TO/DOCKER/FILE</div><div class="">docker run -it --rm --cpus 4 -v ${PETSC_DIR}:/petsc:delegated valgrinddocker:latest’</div><div class=""><br class=""></div><div class="">This will build and launch docker image called “valgrinddocker” based on ubuntu with mpi and ccache preinstalled as well as optionally build valgrind from source. It also most importantly mounts your current ${PETSC_DIR} inside the container meaning you don’t have to reinstall PETSc inside docker. Anything you do inside the docker will also be mirrored on your “local” machine inside ${PETSC_DIR}. You will have to have a separate arch folder for running inside the image however so you will have to go through ./configure again.</div><div class=""><br class=""></div><div class="">Alternatively If you don’t want to build valgrind from source and instead use apt-get to install it you may remove the commands regarding building valgrind and installing libc6-dbg.</div><div class=""><br class=""></div><div class="">Hope this helps!</div><div class=""><br class=""><div class="">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div>Best regards,<br class=""><br class="">Jacob Faibussowitsch<br class="">(Jacob Fai - booss - oh - vitch)<br class="">Cell: (312) 694-3391</div></div>

</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On May 5, 2020, at 7:46 AM, MUKKUND SUNJII <<a href="mailto:mukkundsunjii@gmail.com" class="">mukkundsunjii@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Greetings, <br class=""><br class="">I have been working on modifying ex11.c by adding source terms to the existing model. <br class=""><br class="">In the process, I had introduced some memory corruption errors. The modifications are fairly large, hence it is difficult to single out the problem. <br class=""><br class="">In the FAQ page, I saw that we can use the flag -malloc_debug and/or CHKMEMQ statements. However, they don’t seem to help my case. <br class=""><br class="">At this point of time, Valgrind is not supported by MAC OS X as I have the newer version of the OS. Any suggestions on how to figure out the source of the problem?<br class=""><br class="">Regards, <br class=""><br class="">Mukkund </div></div></blockquote></div><br class=""></div></div></body></html>