#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2015 CEA/DEN, EDF R&D
+# Copyright (C) 2007-2016 CEA/DEN, EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
size = MPI_Comm_size(MPI_COMM_WORLD)
rank = MPI_Comm_rank(MPI_COMM_WORLD)
if size != 5:
- raise RuntimeError, "Expect MPI_COMM_WORLD size == 5"
+ raise RuntimeError("Expect MPI_COMM_WORLD size == 5")
nproc_source = 3
-procs_source = range( nproc_source )
-procs_target = range( size - nproc_source + 1, size)
+procs_source = list(range(nproc_source))
+procs_target = list(range(size - nproc_source + 1, size))
interface = CommInterface()
field_before_int = [parafield.getVolumeIntegral(1)]
MPI_Bcast(field_before_int, 1, MPI_DOUBLE, 0, MPI_COMM_WORLD);
dec.synchronize()
- print "DEC usage"
+ print("DEC usage")
dec.setForcedRenormalization(False)
dec.sendData()
epsilon = 1e-6
if abs(field_before_int[0] - field_after_int[0]) > epsilon:
- print "Field before is not equal field after: %s != %s"%\
- (field_before_int[0],field_after_int[0])
+ print("Field before is not equal field after: %s != %s"%\
+ (field_before_int[0],field_after_int[0]))
pass
MPI_Barrier(MPI_COMM_WORLD)
MPI_Finalize()
-print "# End of testNonCoincidentDEC"
+print("# End of testNonCoincidentDEC")