Commit 266ae0a2 authored by incardon's avatar incardon

Fixing Cuda 10.1 warning

parent 654f72d6
......@@ -21,8 +21,8 @@ set(PETSC_ROOT CACHE PATH "If compiling with linear algebra indicate the PETSC r
set(ENV{PETSC_DIR} ${PETSC_ROOT})
set (CMAKE_CXX_STANDARD 11)
set (CMAKE_CUDA_STANDARD 11)
set (CMAKE_CXX_STANDARD 14)
set (CMAKE_CUDA_STANDARD 14)
if(NOT TINYOBJLOADER_FOUND)
set(TINYOBJLOADER_ROOT CACHE PATH "TinyObjLoader library path")
......@@ -40,12 +40,15 @@ if(ENABLE_GPU)
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=611 --diag_suppress=2885 --diag_suppress=2886 --diag_suppress=2887 --diag_suppress=2888 --diag_suppress=186 --diag_suppress=111 " --expt-extended-lambda)
elseif ( CUDA_VERSION_MAJOR EQUAL 10 AND CUDA_VERSION_MINOR EQUAL 1 )
message("CUDA is compatible")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=2915 --diag_suppress=2912 --diag_suppress=2913 --diag_suppress=111 --diag_suppress=186 --diag_suppress=611 " --expt-extended-lambda)
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=2931 --diag_suppress=2930 --diag_suppress=2929 --diag_suppress=2928 --diag_suppress=1835 --diag_suppress=128 --diag_suppress=186 --diag_suppress=611 " --expt-extended-lambda )
elseif ( CUDA_VERSION_MAJOR EQUAL 10 AND CUDA_VERSION_MINOR EQUAL 2 )
message("CUDA is compatible")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=2977 --diag_suppress=2976 --diag_suppress=2979 --diag_suppress=186" --expt-extended-lambda)
elseif ( CUDA_VERSION_MAJOR EQUAL 11 AND CUDA_VERSION_MINOR EQUAL 0 )
message("CUDA is compatible")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=3059 --diag_suppress=3058 --diag_suppress=3057 --diag_suppress=3056 --diag_suppress=611 --diag_suppress=186" --expt-extended-lambda)
else()
message(FATAL_ERROR "CUDA is incompatible, version 9.2 10.1 and 10.2 is only supported")
message(FATAL_ERROR "CUDA is incompatible, version 9.2 10.1 10.2 and 11.0 is only supported")
endif()
endif()
......
......@@ -224,14 +224,13 @@ class VTKWriter<pair,VECTOR_POINTS>
return v_out;
}
/*! \brief It get the vertex properties list
/*! \brief It get the point position header string
*
* It get the vertex properties list of the vertex defined as a VTK header
* It get the vertex position header of the vertex defined as a VTK header
*
* \return a string that define the vertex properties in graphML format
* \return a string that define the vertex position format
*
*/
std::string get_point_properties_list(file_type ft)
{
//! vertex property output string
......@@ -239,10 +238,7 @@ class VTKWriter<pair,VECTOR_POINTS>
// write the number of vertex
if (ft == file_type::ASCII)
{v_out += "POINTS " + std::to_string(get_total()) + " float" + "\n";}
else
{v_out += "POINTS " + std::to_string(get_total()) + " " + getType<typename pair::first::value_type::coord_type>() + "\n";}
v_out += "POINTS " + std::to_string(get_total()) + " " + getType<typename pair::first::value_type::coord_type>() + "\n";
// return the vertex properties string
return v_out;
......
......@@ -1115,6 +1115,54 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set_properties )
}
}
BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set_check_out_precision )
{
Vcluster<> & v_cl = create_vcluster();
if (v_cl.getProcessUnitID() != 0)
return;
{
// Create 3 vectors with random particles
openfpm::vector<Point<3,double>> v1ps;
openfpm::vector<aggregate<float,double[3]>> v1pp;
// fill the vector with random data
v1ps.resize(100);
v1pp.resize(100);
for (size_t i = 0 ; i < v1ps.size(); i++)
{
v1ps.template get<0>(i)[0] = std::numeric_limits<double>::max();
v1ps.template get<0>(i)[1] = std::numeric_limits<double>::max();
v1ps.template get<0>(i)[2] = std::numeric_limits<double>::max();
v1pp.template get<0>(i) = std::numeric_limits<float>::max();
v1pp.template get<1>(i)[0] = std::numeric_limits<double>::max();
v1pp.template get<1>(i)[1] = std::numeric_limits<double>::max();
v1pp.template get<1>(i)[2] = std::numeric_limits<double>::max();
}
openfpm::vector<std::string> prop_names;
// Create a writer and write adding names to the properties
VTKWriter<boost::mpl::pair<openfpm::vector<Point<3,double>>,openfpm::vector<aggregate<float,double[3]>>>,VECTOR_POINTS> vtk_v;
vtk_v.add(v1ps,v1pp,75);
openfpm::vector<std::string> prp_names({"scalar","vector"});
vtk_v.write("vtk_points_with_prp_names_prec_check.vtk",prp_names);
#ifndef SE_CLASS3
// Check that match
bool test = compare("vtk_points_with_prp_names_prec_check.vtk","test_data/vtk_points_with_prp_names_prec_check_test.vtk");
BOOST_REQUIRE_EQUAL(test,true);
#endif
}
}
BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set_binary )
{
Vcluster<> & v_cl = create_vcluster();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment