Hello,
If you still have issues you can try downloading the last known working
version of BRL-CAD with opencl (r70379):
$ svn co -r r70379 svn://svn.code.sf.net/p/brlcad/code/brlcad/trunk brlcad
There may be some issues compiling that version due to LTO so you can
compile it like this:
$ make build
$ cd build
$ cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
-DBRLCAD_ENABLE_OPENCL=ON -DBRLCAD_ENABLE_STRICT=NO
In case it helps, I'm using Ubuntu 17.04 Zesty (later Ubuntu versions use
Wayland as default, instead of X11, and that breaks a lot of things),
I also installed the following packages:
$ sudo bash apt install clinfo cmake g++ libx11-dev subversion
I use the AMD APP SDK 2.9.1 as an OpenCL ICD. AMD APP SDK 3.0 links against
/usr/lib/x86_64-linux-gnu/librt.so.1 which causes lib name conflicts (or at
least warnings) with BRL-CAD's own librt.so.2.
You should be able to find all the relevant dependencies (Ubuntu, AMD APP
SDK) here:
http://old-releases.ubuntu.com/releases/17.04/ubuntu-17.04-desktop-amd64.iso
https://developer.amd.com/amd-accelerated-parallel-processing-app-sdk/ -
make sure to select "AMD APP SDK built for 64-bit Linux®" 2.9.1.
Note: Because Ubuntu 17.04 is EOL'ed you'll have to change the sources.list
to get apt-get to work properly with it. see:
https://stackoverflow.com/questions/48324701/google-compute-engine-ubuntu-17-04-zesty-does-no-longer-have-a-release-file
I tested this configuration clean on a VirtualBox image and it works ok.
Hopefully Ubuntu 18.04 won't have these issues since X11 is supposed to
become default once more.
The latest SVN version of BRL-CAD seems to have issues with the compiler in
this version of Ubuntu. In the meantime you can work based on r70379.
> On Wed, Mar 21, 2018 at 3:22 PM, Sreyansh Jain <sreyanshjai...@gmail.com>
> wrote:
>
>> I've tried symlinking awk to both gawk(4.1.3) and mawk, but I still get
>> the same error. I'm using Ubuntu 16.04.
>>
>> Also, I've made the changes in the proposal. Now that I'm aware roughly
>> about the tasks to be done, I think it's better to stick to either one of
>> BOT plate mode or BREP support. If time permits, I'll do the other. I'll do
>> a bit of detailed background study in both cases to check which one should
>> be plausible in the given time frame and update it in the proposal
>> accordingly.
>>
>> Warm Regards,
>>
>> *Sreyansh Kumhar Jain*
>> 4th Year Undergraduate Student
>> Department of Mechanical Engineering
>> Indian Institute of Technology, Kharagpur
>> *+91-9933958066 <+91%2099339%2058066>*
>>
>> sreyanshjai...@gmail.com
>> Facebook <https://www.facebook.com/sreyansh.sonu> | LinkedIn
>> <https://www.linkedin.com/in/sreyansh-kumhar-jain-a61428104/>
>>
>> On Wed, Mar 21, 2018 at 6:42 AM, Vasco Alexandre da Silva Costa <
>> vasco.co...@gmail.com> wrote:
>>
>>> BTW, the build instructions, like mentioned in the INSTALL file would be
>>> something like:
>>>
>>> cd to the brlcad sources directory (where the INSTALL file is)
>>> $ mkdir build
>>> $ cd build
>>> $ cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
>>> -DBRLCAD_ENABLE_OPENCL=ON
>>> $ make
>>>
>>>
>>> On Wed, Mar 21, 2018 at 12:56 AM, Vasco Alexandre da Silva Costa <
>>> vasco.co...@gmail.com> wrote:
>>>
>>>> That seems like a really strange error message. I would assume the
>>>> particular libpng configuration script depends on a version of awk
>>>> different than the one you have installed (probably gawk). On which
>>>> operating system are you trying to compile BRL-CAD?
>>>>
>>>>
>>>> On Tue, Mar 20, 2018 at 8:55 PM, Sreyansh Jain <
>>>> sreyanshjai...@gmail.com> wrote:
>>>>
>>>>> Yes, I was able to configure the build with OpenCL library but I was
>>>>> stuck at compiling when the following error came:
>>>>>
>>>>> [ 5%] Generating pnglibconf.c
>>>>>> options.awk: bad line (10): com
>>>>>> CMake Error at scripts/gensrc.cmake:68 (message):
>>>>>> Failed to generate pnglibconf.tf5
>>>>>>
>>>>>> src/other/libpng/CMakeFiles/genfiles.dir/build.make:84: recipe for
>>>>>> target 'src/other/libpng/pnglibconf.c' failed
>>>>>> make[2]: *** [src/other/libpng/pnglibconf.c] Error 1
>>>>>> CMakeFiles/Makefile2:4019: recipe for target
>>>>>> 'src/other/libpng/CMakeFiles/genfiles.dir/all' failed
>>>>>> make[1]: *** [src/other/libpng/CMakeFiles/genfiles.dir/all] Error 2
>>>>>> Makefile:160: recipe for target 'all' failed
>>>>>> make: *** [all] Error 2
>>>>>
>>>>>
>>>>> How do I proceed from here?
>>>>>
>>>>>
>>>>> Okay. Thank you for the review and guidance. I'll make those changes
>>>>> in the proposal accordingly.
>>>>>
>>>>>
>>>>> Warm Regards,
>>>>>
>>>>> *Sreyansh Kumhar Jain*
>>>>> 4th Year Undergraduate Student
>>>>> Department of Mechanical Engineering
>>>>> Indian Institute of Technology, Kharagpur
>>>>> *+91-9933958066 <+91%2099339%2058066>*
>>>>>
>>>>> sreyanshjai...@gmail.com
>>>>> Facebook <https://www.facebook.com/sreyansh.sonu> | LinkedIn
>>>>> <https://www.linkedin.com/in/sreyansh-kumhar-jain-a61428104/>
>>>>>
>>>>> On Tue, Mar 20, 2018 at 9:51 PM, Vasco Alexandre da Silva Costa <
>>>>> vasco.co...@gmail.com> wrote:
>>>>>
>>>>>> I've looked at the draft proposal. It seems a bit ambitious with
>>>>>> regards to timelines (e.g. DSP, PIPE, are non-trivial). But overall it
>>>>>> seems to be an interesting proposal. Make sure you submit patches as you
>>>>>> go
>>>>>> so it will make it easier to integrate the code into the mainline tree.
>>>>>> The
>>>>>> deliverables (i.e. code drops) need to be made clearer in the proposal
>>>>>> text. While I am assuming you'll make a patch per primitive that's isn't
>>>>>> clear. See:
>>>>>> https://google.github.io/gsocguides/student/writing-a-proposal
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> On Tue, Mar 13, 2018 at 9:48 PM, Sreyansh Jain <
>>>>>> sreyanshjai...@gmail.com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I've submitted the patch file. Do let me know suggestions for that,
>>>>>>> if any. I'll share the rough initial draft of the proposal for your
>>>>>>> review
>>>>>>> and recommendation soon.
>>>>>>>
>>>>>>>
>>>>>>> Warm Regards,
>>>>>>>
>>>>>>> *Sreyansh Kumhar Jain*
>>>>>>> 4th Year Undergraduate Student
>>>>>>> Department of Mechanical Engineering
>>>>>>> Indian Institute of Technology, Kharagpur
>>>>>>> *+91-9933958066 <+91%2099339%2058066>*
>>>>>>>
>>>>>>> sreyanshjai...@gmail.com
>>>>>>> Facebook <https://www.facebook.com/sreyansh.sonu> | LinkedIn
>>>>>>> <https://www.linkedin.com/in/sreyansh-kumhar-jain-a61428104/>
>>>>>>>
>>>>>>> On Tue, Mar 13, 2018 at 7:40 AM, Christopher Sean Morrison <
>>>>>>> brl...@mac.com> wrote:
>>>>>>>
>>>>>>>> Sreyansh,
>>>>>>>>
>>>>>>>> Before moving onto other primitives, please submit a patch file
>>>>>>>> with your changes (including any new files) and demonstrate the
>>>>>>>> superell
>>>>>>>> working via OpenCL…
>>>>>>>>
>>>>>>>> You should definitely be drafting a proposal for review at this
>>>>>>>> point. Proposal submissions opened today.
>>>>>>>>
>>>>>>>> Cheers!
>>>>>>>> Sean
>>>>>>>>
>>>>>>>>
>>>>>>>> On Mar 12, 2018, at 5:50 PM, Sreyansh Jain <
>>>>>>>> sreyanshjai...@gmail.com> wrote:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Thank you so much for the detailed guidance. Having gone through
>>>>>>>> all the reference codes given, I've successfully ported the SUPERELL
>>>>>>>> primitive to OpenCL. I'll try to do the same for HYP and others as
>>>>>>>> well before the final application deadline. Should I proceed with
>>>>>>>> drafting the proposal for review or is there something else that needs
>>>>>>>> to
>>>>>>>> be done?
>>>>>>>>
>>>>>>>> Eagerly looking to your revert.
>>>>>>>>
>>>>>>>>
>>>>>>>> Warm Regards,
>>>>>>>>
>>>>>>>> *Sreyansh Kumhar Jain*
>>>>>>>> 4th Year Undergraduate Student
>>>>>>>> Department of Mechanical Engineering
>>>>>>>> Indian Institute of Technology, Kharagpur
>>>>>>>> *+91-9933958066 <+91%2099339%2058066>*
>>>>>>>>
>>>>>>>> sreyanshjai...@gmail.com
>>>>>>>> Facebook <https://www.facebook.com/sreyansh.sonu> | LinkedIn
>>>>>>>> <https://www.linkedin.com/in/sreyansh-kumhar-jain-a61428104/>
>>>>>>>>
>>>>>>>> On Tue, Mar 6, 2018 at 10:56 PM, Vasco Alexandre da Silva Costa <
>>>>>>>> vasco.co...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hello!
>>>>>>>>> You can start by implementing one of the primitives which hasn't
>>>>>>>>> been ported over to OpenCL yet.
>>>>>>>>> There were a lot of issues with porting the HRT primitive last
>>>>>>>>> year, probably because of the solver, so I would advise you to try to
>>>>>>>>> port
>>>>>>>>> something simpler like either HYP or SUPERELL which shouldn't have any
>>>>>>>>> issues.
>>>>>>>>>
>>>>>>>>> There is a quick reference guide to BRL-CAD MGED commands and
>>>>>>>>> primitives here:
>>>>>>>>> http://brlcad.org/w/images/5/52/MGED_Quick_Reference_Card.pdf
>>>>>>>>>
>>>>>>>>> Here is a reference card for OpenCL 1.2 (what we currently use)
>>>>>>>>> commands and language constructs:
>>>>>>>>> https://www.khronos.org/files/opencl-1-2-quick-reference-card.pdf
>>>>>>>>>
>>>>>>>>> I code for BRL-CAD using the Linux operating system. The other
>>>>>>>>> developers typically use either that or Mac OS X.
>>>>>>>>> Make sure to setup your development environment and install OpenCL
>>>>>>>>> on your system. This program might be of help since it queries the
>>>>>>>>> installed OpenCL versions to determine the supported version, etc:
>>>>>>>>> https://github.com/simleb/clinfo
>>>>>>>>>
>>>>>>>>> You should provide a patch for that primitive (HYP or SUPERELL)
>>>>>>>>> before GSoC officially starts. It shouldn't be too hard to do since
>>>>>>>>> you can
>>>>>>>>> use one of the other already ported primitives (like ELL) as a
>>>>>>>>> template.
>>>>>>>>> You basically need to port the ray-primitive intersection (shot) code
>>>>>>>>> from
>>>>>>>>> C to OpenCL and to provide the glue code which packs and unpacks that
>>>>>>>>> primitive from the C side to the OpenCL side.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I have a task list, of things to do, for the OpenCL ray tracer
>>>>>>>>> here:
>>>>>>>>> http://brlcad.org/wiki/User:Vasco.costa
>>>>>>>>>
>>>>>>>>> You can use this as a basis to write your actual proposal. Of the
>>>>>>>>> things in that todo list I would say that PIPE, DSP, BOT plate mode,
>>>>>>>>> and
>>>>>>>>> BREPs are the most significant.
>>>>>>>>>
>>>>>>>>> Before you write the proposal and allocate time for the tasks you
>>>>>>>>> should read the relevant code that you will have to port from ANSI
>>>>>>>>> C/C++ to
>>>>>>>>> OpenCL to get an idea of the complexity of the tasks. Most of the
>>>>>>>>> relevant
>>>>>>>>> code is located in this code tree:
>>>>>>>>> https://svn.code.sf.net/p/brlcad/code/brlcad/trunk/src/librt
>>>>>>>>> /primitives/
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>> On Tue, Mar 6, 2018 at 4:28 PM, Sreyansh Jain <
>>>>>>>>> sreyanshjai...@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> I'm new to the open source community but I'm well-versed with
>>>>>>>>>> Python, C and CUDA while a beginner in OpenCL. I went through the
>>>>>>>>>> project
>>>>>>>>>> ideas list and I believe I can contribute to one on *GPGPU
>>>>>>>>>> Raytracing*. Can you guide me on how to start contributing to
>>>>>>>>>> these as of now. I hope I'm not that late.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Warm Regards,
>>>>>>>>>>
>>>>>>>>>> Sreyansh Kumhar Jain
>>>>>>>>>> 4th Year Undergraduate
>>>>>>>>>> IIT Kharagpur
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ------------------------------------------------------------
>>>>>>>>>> ------------------
>>>>>>>>>> Check out the vibrant tech community on one of the world's most
>>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>>>>>>> _______________________________________________
>>>>>>>>>> BRL-CAD Developer mailing list
>>>>>>>>>> brlcad-devel@lists.sourceforge.net
>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Vasco Alexandre da Silva Costa
>>>>>>>>> PhD in Computer Engineering (Computer Graphics)
>>>>>>>>> Instituto Superior Técnico/University of Lisbon, Portugal
>>>>>>>>>
>>>>>>>>> ------------------------------------------------------------
>>>>>>>>> ------------------
>>>>>>>>> Check out the vibrant tech community on one of the world's most
>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>>>>>> _______________________________________________
>>>>>>>>> BRL-CAD Developer mailing list
>>>>>>>>> brlcad-devel@lists.sourceforge.net
>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>>>>>>>>>
>>>>>>>>>
>>>>>>>> ------------------------------------------------------------
>>>>>>>> ------------------
>>>>>>>> Check out the vibrant tech community on one of the world's most
>>>>>>>> engaging tech sites, Slashdot.org <http://slashdot.org/>! http://sd
>>>>>>>> m.link/slashdot_______________________________________________
>>>>>>>> BRL-CAD Developer mailing list
>>>>>>>> brlcad-devel@lists.sourceforge.net
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ------------------------------------------------------------
>>>>>>>> ------------------
>>>>>>>> Check out the vibrant tech community on one of the world's most
>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>>>>> _______________________________________________
>>>>>>>> BRL-CAD Developer mailing list
>>>>>>>> brlcad-devel@lists.sourceforge.net
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------
>>>>>>> ------------------
>>>>>>> Check out the vibrant tech community on one of the world's most
>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>>>> _______________________________________________
>>>>>>> BRL-CAD Developer mailing list
>>>>>>> brlcad-devel@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Vasco Alexandre da Silva Costa
>>>>>> PhD in Computer Engineering (Computer Graphics)
>>>>>> Instituto Superior Técnico/University of Lisbon, Portugal
>>>>>>
>>>>>> ------------------------------------------------------------
>>>>>> ------------------
>>>>>> Check out the vibrant tech community on one of the world's most
>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>>> _______________________________________________
>>>>>> BRL-CAD Developer mailing list
>>>>>> brlcad-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>>>>>>
>>>>>>
>>>>>
>>>>> ------------------------------------------------------------
>>>>> ------------------
>>>>> Check out the vibrant tech community on one of the world's most
>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>> _______________________________________________
>>>>> BRL-CAD Developer mailing list
>>>>> brlcad-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Vasco Alexandre da Silva Costa
>>>> PhD in Computer Engineering (Computer Graphics)
>>>> Instituto Superior Técnico/University of Lisbon, Portugal
>>>>
>>>
>>>
>>>
>>> --
>>> Vasco Alexandre da Silva Costa
>>> PhD in Computer Engineering (Computer Graphics)
>>> Instituto Superior Técnico/University of Lisbon, Portugal
>>>
>>> ------------------------------------------------------------
>>> ------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> BRL-CAD Developer mailing list
>>> brlcad-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>>>
>>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> BRL-CAD Developer mailing list
>> brlcad-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>>
>>
>
>
> --
> Vasco Alexandre da Silva Costa
> PhD in Computer Engineering (Computer Graphics)
> Instituto Superior Técnico/University of Lisbon, Portugal
>
--
Vasco Alexandre da Silva Costa
PhD in Computer Engineering (Computer Graphics)
Instituto Superior Técnico/University of Lisbon, Portugal
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel