File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1313if len (sys .argv ) > 1 and sys .argv [1 ] == '-p' :
1414 import mfem .par as mfem
1515 use_parallel = True
16- from mfem .common .mpi_debug import nicePrint as print
16+ from mfem .common .mpi_debug import nicePrint
1717 from mpi4py import MPI
1818 myid = MPI .COMM_WORLD .rank
1919
2020else :
2121 import mfem .ser as mfem
2222 use_parallel = False
2323 myid = 0
24+ nicePrint = print
2425
2526
2627class s_coeff (mfem .PyCoefficient ):
@@ -321,23 +322,23 @@ def m_func5(p):
321322 end = time .time ()
322323 a3 .Finalize ()
323324 M3 = a3 .SpMat ()
324- print ("Numba (simpler interface) (matrix)" , end - start )
325+ nicePrint ("Numba (simpler interface) (matrix)" , end - start )
325326
326327 start = time .time ()
327328 m_func4_complex .SetTime (3.0 )
328329 a4 .Assemble ()
329330 end = time .time ()
330331 a4 .Finalize ()
331332 M4 = a4 .SpMat ()
332- print ("Numba (complex dependency as complex) (matrix)" , end - start )
333+ nicePrint ("Numba (complex dependency as complex) (matrix)" , end - start )
333334
334335 start = time .time ()
335336 m_func4_split .SetTime (3.0 )
336337 a5 .Assemble ()
337338 end = time .time ()
338339 a5 .Finalize ()
339340 M5 = a5 .SpMat ()
340- print ("Numba (complex dependency as decomposed) (matrix)" , end - start )
341+ nicePrint ("Numba (complex dependency as decomposed) (matrix)" , end - start )
341342
342343 #from mfem.commmon.sparse_utils import sparsemat_to_scipycsr
343344 #csr1 = sparsemat_to_scipycsr(M1, float)
@@ -360,7 +361,7 @@ def compare_mat(M1o, M2o):
360361 compare_mat (M1 , M5 )
361362
362363 # print(m_func3.SpaceDimension())
363- print ("PASSED" )
364+ nicePrint ("PASSED" )
364365
365366
366367if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments