#!/bin/sh

# makeg.sh
# MHDA
#
# Created by Jacques Richard on 1/21/10.
# Copyright 2010 Texas A & M University. All rights reserved.

#cppcheck -a -v --force --unused-functions -I/usr/local/boost_1_46_1/ -I/usr/local/mimas-2.1 -I/usr/local/mimas-2.1/include -I/usr/local/petsc-3.2-p2/arch-darwin-c-debug/include ../source/MHD-MAIN.CPP ../source/fourier.cc


mpic++ -L/usr/local/lib -fno-stack-protector -D_REENTRANT -lmpi_cxx -lmpi -lopen-rte -lopen-pal -lutil -m64 -arch x86_64 -g3 -DVIEW_F -DDEBUG -Wdiv-by-zero -ftrapv -fexceptions -fnon-call-exceptions -fsched2-use-traces -ftrapping-math -fsignaling-nans -fno-finite-math-only -fmath-errno -Wextra -Wall -I/usr/local/mimas-2.1 -I/usr/local/mimas-2.1/include -I/usr/local/boost_1_46_1/ -framework veclib -lboost_mpi -lboost_serialization -lfftw3 ../source/slbmpi.cpp ../source/fourier.cc -o BM 


mpiexec -np 1 valgrind -v --leak-check=full --show-reachable=yes --leak-resolution=high --num-callers=50 --track-origins=yes --partial-loads-ok=yes --tool=memcheck ./BM 
