diff --git a/examples/Parallel Computing/Monitoring an MPI Simulation - 1.ipynb b/examples/Parallel Computing/Monitoring an MPI Simulation - 1.ipynb index 526fe29..b64cb38 100644 --- a/examples/Parallel Computing/Monitoring an MPI Simulation - 1.ipynb +++ b/examples/Parallel Computing/Monitoring an MPI Simulation - 1.ipynb @@ -90,7 +90,7 @@ "bcast = mpi.bcast\n", "barrier = mpi.barrier\n", "rank = mpi.rank\n", - "print \"MPI rank: %i/%i\" % (mpi.rank,mpi.size)" + "print(\"MPI rank: %i/%i\" % (mpi.rank,mpi.size))" ], "language": "python", "metadata": { @@ -270,7 +270,7 @@ " try:\n", " Z = np.concatenate(mpi_order(view['Z']))\n", " except ValueError:\n", - " print \"dimension mismatch in Z, not plotting\"\n", + " print(\"dimension mismatch in Z, not plotting\")\n", " ax = plt.gca()\n", " return ax.figure\n", " \n", @@ -361,7 +361,7 @@ " if not simulation_alive():\n", " plot_current_results(in_place=plots_in_place)\n", " plt.close('all')\n", - " print 'Simulation has already finished, no monitoring to do.'\n", + " print('Simulation has already finished, no monitoring to do.')\n", " return\n", " \n", " t0 = dt.datetime.now()\n", @@ -380,8 +380,8 @@ " clear_output(wait=True)\n", " plt.close('all')\n", " display(fig)\n", - " print msg\n", - " print 'Monitored for: %s.' % tmon" + " print(msg)\n", + " print('Monitored for: %s.' % tmon)" ], "language": "python", "metadata": { @@ -540,4 +540,4 @@ "metadata": {} } ] -} \ No newline at end of file +} diff --git a/examples/Parallel Computing/Monitoring an MPI Simulation - 2.ipynb b/examples/Parallel Computing/Monitoring an MPI Simulation - 2.ipynb index 6205db3..adb8b29 100644 --- a/examples/Parallel Computing/Monitoring an MPI Simulation - 2.ipynb +++ b/examples/Parallel Computing/Monitoring an MPI Simulation - 2.ipynb @@ -100,7 +100,7 @@ "bcast = mpi.bcast\n", "barrier = mpi.barrier\n", "rank = mpi.rank\n", - "print \"MPI rank: %i/%i\" % (mpi.rank,mpi.size)" + "print(\"MPI rank: %i/%i\" % (mpi.rank,mpi.size))" ], "language": "python", "metadata": {}, @@ -317,7 +317,7 @@ " if ar.ready():\n", " plot_current_results(ar, in_place=plots_in_place)\n", " plt.close('all')\n", - " print 'Simulation has already finished, no monitoring to do.'\n", + " print('Simulation has already finished, no monitoring to do.')\n", " return\n", " \n", " t0 = dt.datetime.now()\n", @@ -336,8 +336,8 @@ " clear_output(wait=True)\n", " plt.close('all')\n", " display(fig)\n", - " print msg\n", - " print 'Monitored for: %s.' % tmon" + " print(msg)\n", + " print('Monitored for: %s.' % tmon)" ], "language": "python", "metadata": {}, @@ -409,4 +409,4 @@ "metadata": {} } ] -} \ No newline at end of file +}