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

COMP: Fix Regitration::FEM module PrintSelf compiler errors #3918

Conversation

jhlegarreta
Copy link
Member

Fix miscellaneous compiler errors in Registration::FEM module classes' PrintSelf methods.

Fixes:

ITK\Modules\Registration\FEM\include\itkFEMFiniteDifferenceFunctionLoad.hxx(358,3):
error C2440:
'static_cast':
cannot convert from 'const itk::fem::Solution::ConstPointer' to 'const itk::LightObject *'
ITK\Modules\Registration\FEM\include\itkFEMFiniteDifferenceFunctionLoad.hxx(358,3):
error C2039:
'Print': is not a member of 'itk::fem::Solution'

and

ITK\Modules\Numerics\FEM\include\itkImageToRectilinearFEMObjectFilter.hxx(302,22):
error C2275:
'itk::fem::Material': expected an expression instead of a type
ITK\Modules\Numerics\FEM\include\itkImageToRectilinearFEMObjectFilter.hxx(302,3):
error C3861:
'itkPrintSelfObject': identifier not found

and

ITK\Modules\Registration\FEM\include\itkFEMRegistrationFilter.hxx(1471,9):
error C2440:
'static_cast': cannot convert from 'const unsigned int' to 'itk::Size<3>'
ITK\Modules\Registration\FEM\include\itkFEMRegistrationFilter.hxx(1529,16):
error C2679:
binary '<<': no operator found which takes a right-hand operand of type
'const itk::fem::FEMRegistrationFilter<InputImageType,InputImageType,FEMObjectType>::LandmarkArrayType'
(or there is no acceptable conversion)

raised for example in:
https://open.cdash.org/viewBuildError.php?buildid=8462352

Inadvertently introduced in c47ed1c.

PR Checklist

Fix miscellaneous compiler errors in `Registration::FEM` module classes'
`PrintSelf` methods.

Fixes:
```
ITK\Modules\Registration\FEM\include\itkFEMFiniteDifferenceFunctionLoad.hxx(358,3):
error C2440:
'static_cast':
cannot convert from 'const itk::fem::Solution::ConstPointer' to 'const itk::LightObject *'
```

```
ITK\Modules\Registration\FEM\include\itkFEMFiniteDifferenceFunctionLoad.hxx(358,3):
error C2039:
'Print': is not a member of 'itk::fem::Solution'
```

and
```
ITK\Modules\Numerics\FEM\include\itkImageToRectilinearFEMObjectFilter.hxx(302,22):
error C2275:
'itk::fem::Material': expected an expression instead of a type
```

```
ITK\Modules\Numerics\FEM\include\itkImageToRectilinearFEMObjectFilter.hxx(302,3):
error C3861:
'itkPrintSelfObject': identifier not found
```

and
```
ITK\Modules\Registration\FEM\include\itkFEMRegistrationFilter.hxx(1471,9):
error C2440:
'static_cast': cannot convert from 'const unsigned int' to 'itk::Size<3>'
```

```
ITK\Modules\Registration\FEM\include\itkFEMRegistrationFilter.hxx(1529,16):
error C2679:
binary '<<': no operator found which takes a right-hand operand of type
'const itk::fem::FEMRegistrationFilter<InputImageType,InputImageType,FEMObjectType>::LandmarkArrayType'
(or there is no acceptable conversion)
```

raised for example in:
https://open.cdash.org/viewBuildError.php?buildid=8462352

Inadvertently introduced in c47ed1c.
@github-actions github-actions bot added type:Compiler Compiler support or related warnings area:Registration Issues affecting the Registration module area:Numerics Issues affecting the Numerics module labels Feb 9, 2023
Copy link
Member

@thewtex thewtex left a comment

Choose a reason for hiding this comment

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

Thank you @jhlegarreta! 💚

@dzenanz dzenanz merged commit dde9dc3 into InsightSoftwareConsortium:master Feb 13, 2023
@jhlegarreta jhlegarreta deleted the RegistrationFEMModulePrintSelfMiscFixes branch February 13, 2023 16:11
@dzenanz
Copy link
Member

dzenanz commented Feb 14, 2023

These look like new errors: https://open.cdash.org/viewBuildError.php?buildid=8473470.

@jhlegarreta
Copy link
Member Author

These look like new errors: https://open.cdash.org/viewBuildError.php?buildid=8473470.

Will have a look tonight. The build was passing locally for me on a Win machine with the module at issue enabled. We might want to set up an Azure build with all non-default modules enabled to avoid as much as possible such issues.

@jhlegarreta
Copy link
Member Author

jhlegarreta commented Feb 15, 2023

These look like new errors: https://open.cdash.org/viewBuildError.php?buildid=8473470.

Had a look at them. They are the same as those pointed bi Mikhail in #3872 (comment).

They were addressed as followed in #3872 (comment).

Not sure why the have been reported to the dashboard.

e.g. the error:

M:\Dashboard\ITK\Modules\Registration\FEM\include\itkFEMFiniteDifferenceFunctionLoad.hxx(358,3):
error C2440: 'static_cast':
cannot convert from
'const itk::fem::Solution::ConstPointer' to
'const itk::LightObject *' [M:\Dashboard\ITK-build\Modules\Registration\FEM\test\ITKFEMRegistrationTestDriver.vcxproj]

points to this line:
https://github.com/InsightSoftwareConsortium/ITK/pull/3918/files#diff-2f895bbf70bfcc5cf3cbe42cdd153220f8f6570498c24af2117262e39bbdabd2R358

which only contains a string that is being serialized to the ostream.

@dzenanz
Copy link
Member

dzenanz commented Feb 15, 2023

For some reason, it used an old hash from last week. Info found here. Let's see whether the error persists tonight.

@dzenanz
Copy link
Member

dzenanz commented Feb 15, 2023

I just realized that when ITK_USE_GPU is enabled, there are more compile errors coming from PrintSelf PR.

@jhlegarreta
Copy link
Member Author

I just realized that when ITK_USE_GPU is enabled, there are more compile errors coming from PrintSelf PR.

My local set up does not allow me to test that as I do not have OpenCL installed/CMake does not install it when enabling the GPU flag, so if you can set up a machine that enables the flag, I would be able to try to address them.

Thanks.

@dzenanz
Copy link
Member

dzenanz commented Feb 15, 2023

@dzenanz
Copy link
Member

dzenanz commented Feb 15, 2023

Here is the log from building on my machine:
Output-Build.txt

@jhlegarreta
Copy link
Member Author

Did you give https://github.com/KhronosGroup/OpenCL-SDK/releases a try?
I haven't: I do not use the GPU classes/the time/space I have is too limited for this unfortunately.

So PR #3928:

@dzenanz
Copy link
Member

dzenanz commented Feb 15, 2023

I assume that lack of Print in TimeProbe and ResourceProbe is an oversight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Numerics Issues affecting the Numerics module area:Registration Issues affecting the Registration module type:Compiler Compiler support or related warnings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants