Commit c0d5cac3 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Removed mesh ordering algorithms from the benchmarks

The mesh can be reordered separately, saved into a file and loaded in
the benchmarks.
parent c8e36b9b
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
[submodule "libs/spatial"]
	path = libs/spatial
	url = git://git.code.sf.net/p/spatial/code
[submodule "libs/tnl"]
[submodule "libs/tnl"]
	path = libs/tnl
	path = libs/tnl
	url = ../tnl-dev.git
	url = ../tnl-dev.git
+4 −25
Original line number Original line Diff line number Diff line
@@ -26,7 +26,6 @@
#include <cuda_profiler_api.h>
#include <cuda_profiler_api.h>
#endif
#endif


#include "MeshOrdering.h"
#include "MeshConfigs.h"
#include "MeshConfigs.h"
#include "MemoryInfo.h"
#include "MemoryInfo.h"


@@ -90,46 +89,26 @@ struct MeshBenchmarks
         {"real", getType< typename Mesh::RealType >()},
         {"real", getType< typename Mesh::RealType >()},
         {"gid_t", getType< typename Mesh::GlobalIndexType >()},
         {"gid_t", getType< typename Mesh::GlobalIndexType >()},
         {"lid_t", getType< typename Mesh::LocalIndexType >()},
         {"lid_t", getType< typename Mesh::LocalIndexType >()},
         {"order", ""},
      };
      };
      benchmark.setMetadataColumns( metadataColumns );


      const String & meshFile = parameters.getParameter< String >( "mesh-file" );
      const String & meshFile = parameters.getParameter< String >( "mesh-file" );
      Mesh mesh;
      Mesh mesh;
      if( ! loadMesh( mesh, meshFile ) ) {
      if( ! loadMesh( mesh, meshFile ) ) {
         std::cerr << "Failed to load mesh from file '" << meshFile << "'." << std::endl;
         benchmark.addErrorMessage( "Failed to load mesh from file '" + meshFile );
         return false;
         return false;
      }
      }


      // collect memory usage
      // collect memory usage
//      const MemoryBenchmarkResult meminfo = testMemoryUsage( parameters, mesh );

      // natural ordering
      metadataColumns.back() = {"order", "nat"};
      benchmark.setMetadataColumns( metadataColumns );
      // TODO: pass result to the dispatchAlgorithms to append the timings
      // TODO: pass result to the dispatchAlgorithms to append the timings
//      MemoryBenchmarkResult result = meminfo;
//      const MemoryBenchmarkResult meminfo = testMemoryUsage( parameters, mesh );
//      auto noop = [](){};
//      auto noop = [](){};
//      benchmark.time< TNL::Devices::Host >( "CPU", noop, result );
//      benchmark.time< TNL::Devices::Host >( "CPU", noop, meminfo );
      dispatchAlgorithms( benchmark, parameters, mesh );

      // k-d tree ordering
      metadataColumns.back() = {"order", "kdt"};
      benchmark.setMetadataColumns( metadataColumns );
      using KdTreeOrdering = MeshOrdering< Mesh, KdTreeOrdering >;
      KdTreeOrdering kd;
      kd.reorder( mesh );
      dispatchAlgorithms( benchmark, parameters, mesh );


#ifdef HAVE_CUDA
#ifdef HAVE_CUDA
      cudaProfilerStart();
      cudaProfilerStart();
#endif
#endif


      // RCM ordering
      metadataColumns.back() = {"order", "rcm"};
      benchmark.setMetadataColumns( metadataColumns );
      using RCMOrdering = MeshOrdering< Mesh, CuthillMcKeeOrdering<> >;
      RCMOrdering rcm;
      rcm.reorder( mesh );
      dispatchAlgorithms( benchmark, parameters, mesh );
      dispatchAlgorithms( benchmark, parameters, mesh );


#ifdef HAVE_CUDA
#ifdef HAVE_CUDA

MeshOrdering.h

deleted100644 → 0
+0 −510

File deleted.

Preview size limit exceeded, changes collapsed.

spatial @ 6c2f2eba

Original line number Original line Diff line number Diff line
Subproject commit 6c2f2eba15d9a1ca993c738ca8fc6c8c09de6603