-
Notifications
You must be signed in to change notification settings - Fork 55
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
Cannot downconvert and widen scalar type 'double' to vector type '__float4' running examples #31
Comments
Hello @simingbayer, take a look a this issue and the attached patch maybe it's relevant for your OS. Let us know whether it helped. |
Thank you for your answer! Actually I have already read this post before I open a new issue here. That is also where I got the assumption that my openCL compiler may be the problem. So should I try to use another version of openCL ? If yes, which one should I use? Or is there anyother way to solve this problem (because in the older isse, there is no detailed solution for the problem)? Thanks! |
@AvtechScientific Hi guys, I am trying to use the poroelastic file. With the debugger I find out, the error was called in this order. line 124 poroelastic.cc: elasticity ->init() -->line 133 aslFDPoroElasticity.cxx kernel. Please help me to fix this bug!!! I really need this framework, especially the one for poroelasticity. Here is a part of the error output: Data initialization... -2450 0 0 ; 62500; 0.0015625 :54:15: error: Cannot downconvert and widen scalar type 'double' to vector type '__float4' Thanks, |
const float3 slopes = 1.0 / ray; was changed to: const float3 slopes = 1.0f / ray; So in our case you may try to change: (pv_f7=pv_f11*0.5); to (pv_f7=pv_f11*0.5f); You can't do this directly, so look for places where constants are fed into kernel, and add an "f" afterwards. Please let us know about your progress. |
Thank you! I will try these solutions! best, |
@AvtechScientific Hi guys, For the 1) st solution: According to the information provided by Apple, MacBook Pro (mid 2015) is delivered Intel Iris Pro GPU and with OpenCL installed. On my machine, the OpenCL version is 2.8.6. The output of cmake was: openCL version 1.1-not found, openCL version 1.2 -- not found,openCL version 2.0 -not found. But the openCL library was found and it is the default version installed by Apple. Unlike in Linux machine, OpenCL on a MacBook can only updated/changed by Apple. Is that possible that the ASL framework doesn´t works with OpenCL 2.8.6 version? Looking for CL_VERSION_2_0 For the 3) rd solution: I've change the constant to .5f and also changed every variable declared as double to float. It didn´t help. For the 2)nd solution: Since I don´t have a Linux computer, I am try to set up one. It will take some time. So I still don´t know if it works. Do you have anyother idea? Thanks in advance. |
|
@AvtechScientific
I also noticed that the parameters a_f1 to a_f11 (look at the error output, Kernel source code section) was declared as type float4 before
Thank you!! |
Hi, I am facing a similar problem when I installed ASL on my Mac. My OS is Mac OSSierra. Have you solved this issue and could you provide me a status on this issue? |
I just ran into the same issue with macOS 10.12.6 on a Mac mini late 2014 with Intel Core i5 when trying to run the asl-locomotive example. I found a solution to this problem following the hint to the issue in message 2 of this thread. In ...ASL/src/acl/DataTypes/aclConstant.h I changed lines 54 and 60 to:
With that in place, the simulation is running now. I am not an expert in C++, and perhaps there is a better place for adding a trailing "f" on floating point constants. |
Thanks for the information!
… Am 28.07.2017 um 00:21 schrieb Dr. Rolf Jansen ***@***.***>:
I just ran into the same issue on a Mac mini late 2014 with Intel Core i5 and trying to run the asl-locomotive example.
I found a solution to this problem following the hint to the issue <oseiskar/raytracer#1> in message 2 of this thread.
In ...ASL/src/acl/DataTypes/aclConstant.h I changed lines 54 and 60 to:
return (typeid(T) == typeid(float) || typeid(T) == typeid(double)) ? valueStr+"f" : valueStr;
With that in place, the simulation is running now.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#31 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AFZ8eN19tqmsm6A-EE8f0JsvQ7411ACNks5sSQ1vgaJpZM4MKmF0>.
|
@cyclaero Adding a trailing "f" does not work when
or a In any case precision is lost because of the possible double to float conversion, so the developers might want to find a more elegant way to take care of this in their kernel generator. |
I'm now hitting the same error when running ASL with pocl. The error comes from LLVM:
I think that LLVM is correct here, OpenCL 1.2 standard, page 209, on implicit conversions:
|
@Senui, I like the Thank you very much. |
…tor data types (here double to float) are disallowed in OpenCL 1.2, and LLVM does enforce this. Therefore explicitly coerce ACL constants to float.
issue #31 – LLVM does not allow Implicit conversions between built-in vector data types
Hi guys,
I just compiled ASL on my machine (macbook pro) following the instruction successfully. However, once I run the exmples, I get the following error:
Cannot downconvert and widen scalar type 'double' to vector type '__float4'
libc++abi.dylib: terminating with uncaught exception of type std::logic_error: ASL ERROR: Program::build() (-11).
And I tried every example, and get the same error. Is this an OpenCL issue? Does anybody knows how to solve it?
best,
Siming
The text was updated successfully, but these errors were encountered: