@@ -372,13 +372,14 @@ TEST_CASE("Serial vs. Serial with MPI Forward Backward") {
372
372
CHECK (mse <= average_intensity * 1e-3 );
373
373
}
374
374
375
+ #ifdef PURIFY_H5
375
376
TEST_CASE (" MPI_fb_factory_hdf5" ) {
376
377
auto const world = sopt::mpi::Communicator::World ();
377
378
const size_t N = 13107 ;
378
379
379
380
const std::string &test_dir = " expected/fb/" ;
380
381
const std::string &input_data_path = data_filename (test_dir + " input_data.h5" );
381
- const std::string &result_path = data_filename (test_dir + " mpi_fb_result .fits" );
382
+ const std::string &result_path = data_filename (test_dir + " mpi_fb_result_hdf5 .fits" );
382
383
H5::H5Handler h5file (input_data_path, world);
383
384
384
385
auto uv_data = H5::stochread_visibility (h5file, 6000 , false );
@@ -414,11 +415,10 @@ TEST_CASE("MPI_fb_factory_hdf5") {
414
415
415
416
auto const diagnostic = (*fb)();
416
417
const Image<t_complex> image = Image<t_complex>::Map (diagnostic.x .data (), imsizey, imsizex);
417
- if (world.is_root ())
418
- {
419
- pfitsio::write2d (image.real (), result_path);
420
- // pfitsio::write2d(residual_image.real(), expected_residual_path);
421
- }
418
+ // if (world.is_root())
419
+ // {
420
+ // pfitsio::write2d(image.real(), result_path);
421
+ // }
422
422
423
423
const std::string &expected_solution_path = data_filename (test_dir + " solution.fits" );
424
424
const std::string &expected_residual_path = data_filename (test_dir + " residual.fits" );
@@ -436,7 +436,6 @@ TEST_CASE("MPI_fb_factory_hdf5") {
436
436
CHECK (mse <= average_intensity * 1e-3 );
437
437
}
438
438
439
- #ifdef PURIFY_H5
440
439
TEST_CASE (" fb_factory_stochastic" ) {
441
440
const std::string &test_dir = " expected/fb/" ;
442
441
const std::string &input_data_path = data_filename (test_dir + " input_data.h5" );
@@ -494,17 +493,10 @@ TEST_CASE("fb_factory_stochastic") {
494
493
495
494
auto const diagnostic = fb ();
496
495
const Image<t_complex> image = Image<t_complex>::Map (diagnostic.x .data (), imsizey, imsizex);
497
- SOPT_HIGH_LOG (" God help me." );
498
- if (comm.is_root ())
499
- {
500
- SOPT_HIGH_LOG (" Root write file" );
501
- pfitsio::write2d (image.real (), result_path);
502
- // pfitsio::write2d(residual_image.real(), expected_residual_path);
503
- }
504
- else
505
- {
506
- SOPT_HIGH_LOG (" Worker has nowt to do." );
507
- }
496
+ // if (comm.is_root())
497
+ // {
498
+ // //pfitsio::write2d(image.real(), result_path);
499
+ // }
508
500
509
501
auto soln_flat = Vector<t_complex>::Map (solution.data (), solution.size ());
510
502
double average_intensity = soln_flat.real ().sum () / soln_flat.size ();
0 commit comments