Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use AlignedVector in ReadWriteVector. #16568

Merged
merged 1 commit into from Jan 31, 2024

Conversation

drwells
Copy link
Member

@drwells drwells commented Jan 30, 2024

Why not?

Copy link
Member

@bangerth bangerth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, why not?

@bangerth
Copy link
Member

But you'll have to fix these issues:

/home/runner/work/dealii/dealii/include/deal.II/lac/read_write_vector.templates.h:853:52: error: no member named 'get' in 'dealii::AlignedVector<double>'
        cudaError_t error_code = cudaMemcpy(values.get(),
                                            ~~~~~~ ^
/home/runner/work/dealii/dealii/build/source/lac/read_write_vector.inst:12:17: note: in instantiation of member function 'dealii::LinearAlgebra::ReadWriteVector<double>::import_elements' requested here
 template class ReadWriteVector< double >;
                ^
In file included from /home/runner/work/dealii/dealii/source/lac/read_write_vector.cc:16:
/home/runner/work/dealii/dealii/include/deal.II/lac/read_write_vector.h:499:7: error: no matching member function for call to 'import_elements'
      import_elements(V, operation, communication_pattern);
      ^~~~~~~~~~~~~~~
/home/runner/work/dealii/dealii/build/source/lac/read_write_vector.inst:12:17: note: in instantiation of member function 'dealii::LinearAlgebra::ReadWriteVector<double>::import' requested here
 template class ReadWriteVector< double >;
                ^
/home/runner/work/dealii/dealii/include/deal.II/lac/read_write_vector.h:302:5: note: candidate function not viable: no known conversion from 'const CUDAWrappers::Vector<double>' to 'const dealii::Vector<double>' for 1st argument
    import_elements(
    ^
/home/runner/work/dealii/dealii/include/deal.II/lac/read_write_vector.h:331:5: note: candidate template ignored: could not match 'dealii::LinearAlgebra::distributed::Vector' against 'dealii::LinearAlgebra::CUDAWrappers::Vector'
    import_elements(
    ^
In file included from /home/runner/work/dealii/dealii/source/lac/read_write_vector.cc:17:
/home/runner/work/dealii/dealii/include/deal.II/lac/read_write_vector.templates.h:853:52: error: no member named 'get' in 'dealii::AlignedVector<float>'
        cudaError_t error_code = cudaMemcpy(values.get(),
                                            ~~~~~~ ^
/home/runner/work/dealii/dealii/build/source/lac/read_write_vector.inst:19:17: note: in instantiation of member function 'dealii::LinearAlgebra::ReadWriteVector<float>::import_elements' requested here
 template class ReadWriteVector< float >;
                ^
In file included from /home/runner/work/dealii/dealii/source/lac/read_write_vector.cc:16:
/home/runner/work/dealii/dealii/include/deal.II/lac/read_write_vector.h:499:7: error: no matching member function for call to 'import_elements'
      import_elements(V, operation, communication_pattern);
      ^~~~~~~~~~~~~~~
/home/runner/work/dealii/dealii/build/source/lac/read_write_vector.inst:19:17: note: in instantiation of member function 'dealii::LinearAlgebra::ReadWriteVector<float>::import' requested here
 template class ReadWriteVector< float >;
                ^
/home/runner/work/dealii/dealii/include/deal.II/lac/read_write_vector.h:302:5: note: candidate function not viable: no known conversion from 'const CUDAWrappers::Vector<float>' to 'const dealii::Vector<float>' for 1st argument
    import_elements(
    ^
/home/runner/work/dealii/dealii/include/deal.II/lac/read_write_vector.h:331:5: note: candidate template ignored: could not match 'dealii::LinearAlgebra::distributed::Vector' against 'dealii::LinearAlgebra::CUDAWrappers::Vector'
    import_elements(
    ^
In file included from /home/runner/work/dealii/dealii/source/lac/read_write_vector.cc:17:
/home/runner/work/dealii/dealii/include/deal.II/lac/read_write_vector.templates.h:853:52: error: no member named 'get' in 'dealii::AlignedVector<std::complex<double>>'
        cudaError_t error_code = cudaMemcpy(values.get(),
                                            ~~~~~~ ^
/home/runner/work/dealii/dealii/build/source/lac/read_write_vector.inst:58:17: note: in instantiation of member function 'dealii::LinearAlgebra::ReadWriteVector<std::complex<double>>::import_elements' requested here
 template class ReadWriteVector< std::complex<double> >;
                ^
In file included from /home/runner/work/dealii/dealii/source/lac/read_write_vector.cc:16:
/home/runner/work/dealii/dealii/include/deal.II/lac/read_write_vector.h:499:7: error: no matching member function for call to 'import_elements'
      import_elements(V, operation, communication_pattern);
      ^~~~~~~~~~~~~~~
/home/runner/work/dealii/dealii/build/source/lac/read_write_vector.inst:58:17: note: in instantiation of member function 'dealii::LinearAlgebra::ReadWriteVector<std::complex<double>>::import' requested here
 template class ReadWriteVector< std::complex<double> >;
                ^
/home/runner/work/dealii/dealii/include/deal.II/lac/read_write_vector.h:302:5: note: candidate function not viable: no known conversion from 'const CUDAWrappers::Vector<complex<double>>' to 'const dealii::Vector<complex<double>>' for 1st argument
    import_elements(
    ^
/home/runner/work/dealii/dealii/include/deal.II/lac/read_write_vector.h:331:5: note: candidate template ignored: could not match 'dealii::LinearAlgebra::distributed::Vector' against 'dealii::LinearAlgebra::CUDAWrappers::Vector'
    import_elements(
    ^
In file included from /home/runner/work/dealii/dealii/source/lac/read_write_vector.cc:17:
/home/runner/work/dealii/dealii/include/deal.II/lac/read_write_vector.templates.h:853:52: error: no member named 'get' in 'dealii::AlignedVector<std::complex<float>>'
        cudaError_t error_code = cudaMemcpy(values.get(),
                                            ~~~~~~ ^
/home/runner/work/dealii/dealii/build/source/lac/read_write_vector.inst:65:17: note: in instantiation of member function 'dealii::LinearAlgebra::ReadWriteVector<std::complex<float>>::import_elements' requested here
 template class ReadWriteVector< std::complex<float> >;
                ^
In file included from /home/runner/work/dealii/dealii/source/lac/read_write_vector.cc:16:
/home/runner/work/dealii/dealii/include/deal.II/lac/read_write_vector.h:499:7: error: no matching member function for call to 'import_elements'
      import_elements(V, operation, communication_pattern);
      ^~~~~~~~~~~~~~~
/home/runner/work/dealii/dealii/build/source/lac/read_write_vector.inst:65:17: note: in instantiation of member function 'dealii::LinearAlgebra::ReadWriteVector<std::complex<float>>::import' requested here
 template class ReadWriteVector< std::complex<float> >;
                ^
/home/runner/work/dealii/dealii/include/deal.II/lac/read_write_vector.h:302:5: note: candidate function not viable: no known conversion from 'const CUDAWrappers::Vector<complex<float>>' to 'const dealii::Vector<complex<float>>' for 1st argument
    import_elements(
    ^
/home/runner/work/dealii/dealii/include/deal.II/lac/read_write_vector.h:331:5: note: candidate template ignored: could not match 'dealii::LinearAlgebra::distributed::Vector' against 'dealii::LinearAlgebra::CUDAWrappers::Vector'
    import_elements(
    ^

@drwells drwells force-pushed the read-write-vector-aligned-vector branch from c40e411 to 8159941 Compare January 31, 2024 00:44
@drwells
Copy link
Member Author

drwells commented Jan 31, 2024

Fixed!

@kronbichler kronbichler merged commit bd6af56 into dealii:master Jan 31, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants