Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only print on master node in MPI mode #139

Merged
merged 9 commits into from
Dec 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ RUNCODE=""
if test "x$with_mpi" = "xyes"; then
AC_CHECK_PROG(MPIRUN, mpirun, mpirun)
# always use 2 processes for 'make check'
RUNCODE="$MPIRUN -np 2 --verbose -output-filename mpirun.out --timestamp-output"
RUNCODE="$MPIRUN -np 2"
fi
AC_SUBST(RUNCODE)
AM_CONDITIONAL(WITH_MPI, test "x$with_mpi" = "xyes")
Expand Down
6 changes: 6 additions & 0 deletions python/meep.i
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,12 @@ extern boolean point_in_objectp(vector3 p, GEOMETRIC_OBJECT o);
comm = MPI.COMM_WORLD
master_printf('\n**\n** successfully loaded python MPI module (mpi4py)\n**\n')

if comm.Get_rank() != 0:
import os
import sys
saved_stdout = sys.stdout
sys.stdout = open(os.devnull, 'w')

vacuum = Medium(epsilon=1)
air = Medium(epsilon=1)
metal = Medium(epsilon=-1e20)
Expand Down
1 change: 0 additions & 1 deletion python/tests/physical.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# You should have received a copy of the GNU General Public License
# along with this program if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

import unittest

import meep as mp
Expand Down