Re: [brlcad-devel] Help understanding code

2016-03-22 Thread Vasco Alexandre da Silva Costa
Your EPA patch works well on my system and the code looks fine so I applied it to SVN. I also commented out all writes to vpriv in the normal computation code from all primitives to prevent normal computation errors. In case this is causing any rendering issues. Please check to see if you get the

Re: [brlcad-devel] Help understanding code

2016-03-22 Thread Vasco Alexandre da Silva Costa
On Tue, Mar 22, 2016 at 7:32 AM, Param Hanji wrote: > Hi > > Currently the blank screen issue happens only with EPA. The others work > fine. > So it doesn't happen with EHY anymore? It's kind of weird because this should have been fixed with the patch I made to

Re: [brlcad-devel] Help understanding code

2016-03-22 Thread Vasco Alexandre da Silva Costa
On Tue, Mar 22, 2016 at 6:12 AM, Christopher Sean Morrison wrote: > > > Right. But I think it's also necessary to change the CMakefiles in order > to install the .cl files somewhere. I'm unsure where to place them. > > Probably best will be to just put them in some subdir of our

Re: [brlcad-devel] Help understanding code

2016-03-22 Thread Param Hanji
Hi Currently the blank screen issue happens only with EPA. The others work fine. On Tue 22 Mar, 2016, 9:28 AM Vasco Alexandre da Silva Costa, < vasco.co...@gmail.com> wrote: > On Tue, Mar 22, 2016 at 3:17 AM, Param Hanji > wrote: > >> I updated my svn repo to

Re: [brlcad-devel] Help understanding code

2016-03-22 Thread Christopher Sean Morrison
> Right. But I think it's also necessary to change the CMakefiles in order to > install the .cl files somewhere. I'm unsure where to place them. Probably best will be to just put them in some subdir of our data dir for now. We’ll probably eventually want to set things up in the

Re: [brlcad-devel] Help understanding code

2016-03-21 Thread Vasco Alexandre da Silva Costa
On Tue, Mar 22, 2016 at 3:17 AM, Param Hanji wrote: > I updated my svn repo to revision 67420. However, rt.cl wasn't changed > and I still can't get a preview. > Also, here's the patch. > I made the change in [r67361]

Re: [brlcad-devel] Help understanding code

2016-03-21 Thread Param Hanji
I updated my svn repo to revision 67420. However, rt.cl wasn't changed and I still can't get a preview. Also, here's the patch. On Tue, Mar 22, 2016 at 1:27 AM Vasco Alexandre da Silva Costa < vasco.co...@gmail.com> wrote: > On Mon, Mar 21, 2016 at 4:58 AM, Christopher Sean Morrison

Re: [brlcad-devel] Help understanding code

2016-03-21 Thread Vasco Alexandre da Silva Costa
On Mon, Mar 21, 2016 at 4:58 AM, Christopher Sean Morrison wrote: > > Still no image preview? > > > > PS: This should be improved with some kind of smart way to find the > directory where the files are in, or at least by looking the directory up > in an environment variable, but

Re: [brlcad-devel] Help understanding code

2016-03-21 Thread Vasco Alexandre da Silva Costa
On Mon, Mar 21, 2016 at 12:21 PM, Param Hanji wrote: > > > On Mon, Mar 21, 2016 at 10:28 AM Christopher Sean Morrison > wrote: > >> >> Still no image preview? >> >> >> > Nope. I still get a blank image. I tried generating the png with the -l2 > option

Re: [brlcad-devel] Help understanding code

2016-03-21 Thread Vasco Alexandre da Silva Costa
On Mon, Mar 21, 2016 at 7:42 AM, Param Hanji wrote: > Hello, > > Ok, now the code compiles! I checked the code and functionally it looks >> good. But you need to indent the code according to the BRL-CAD coding >> style. e.g. indent the code with 4 spaces and use

Re: [brlcad-devel] Help understanding code

2016-03-20 Thread Christopher Sean Morrison
Still no image preview? > PS: This should be improved with some kind of smart way to find the directory > where the files are in, or at least by looking the directory up in an > environment variable, but the current clt_init and clt_read_code aren't that > smart. You should have got some

Re: [brlcad-devel] Help understanding code

2016-03-20 Thread Vasco Alexandre da Silva Costa
On Sun, Mar 20, 2016 at 7:32 PM, Vasco Alexandre da Silva Costa < vasco.co...@gmail.com> wrote: > Ok, now the code compiles! I checked the code and functionally it looks > good. But you need to indent the code according to the BRL-CAD coding > style. e.g. indent the code with 4 spaces and use

Re: [brlcad-devel] Help understanding code

2016-03-20 Thread Vasco Alexandre da Silva Costa
Ok, now the code compiles! I checked the code and functionally it looks good. But you need to indent the code according to the BRL-CAD coding style. e.g. indent the code with 4 spaces and use regular tabs with 8 spaces. This is particularly noticeable in the .cl file. The style rules are under

Re: [brlcad-devel] Help understanding code

2016-03-19 Thread Vasco Alexandre da Silva Costa
On Thu, Mar 17, 2016 at 7:54 PM, Vasco Alexandre da Silva Costa < vasco.co...@gmail.com> wrote: > On Thu, Mar 17, 2016 at 7:47 PM, Christopher Sean Morrison > wrote: > >> >> >> On Mar 17, 2016, at 05:33 AM, Param Hanji >> wrote: >> >> Great. I'm

Re: [brlcad-devel] Help understanding code

2016-03-19 Thread Vasco Alexandre da Silva Costa
On Thu, Mar 17, 2016 at 7:47 PM, Christopher Sean Morrison wrote: > > > On Mar 17, 2016, at 05:33 AM, Param Hanji > wrote: > > Great. I'm happy to help! > Also is ehy running fine in OpenCL mode? My generated PNG is just a blank > black screen with no

Re: [brlcad-devel] Help understanding code

2016-03-19 Thread Vasco Alexandre da Silva Costa
On Wed, Mar 16, 2016 at 8:15 PM, Param Hanji wrote: > Hi Vasco Costa, > > Yes -z 1 did it. :) > > Now fopen() throws an error! Function clt_read_code() in primitiive_util.c > fopen() returns a NULL. I included and printed the error as > described here > > >

Re: [brlcad-devel] Help understanding code

2016-03-19 Thread Param Hanji
Fixed it On Sun, Mar 20, 2016 at 6:47 AM Vasco Alexandre da Silva Costa < vasco.co...@gmail.com> wrote: > It doesn't compile. It seems you forgot a function declaration in a header > file: > > .../brlcad/trunk/src/librt/primitives/primitive_util.c: In function > ‘clt_solid_pack’: >

Re: [brlcad-devel] Help understanding code

2016-03-19 Thread Vasco Alexandre da Silva Costa
It doesn't compile. It seems you forgot a function declaration in a header file: .../brlcad/trunk/src/librt/primitives/primitive_util.c: In function ‘clt_solid_pack’: .../brlcad/trunk/src/librt/primitives/primitive_util.c:648:25: error: implicit declaration of function ‘clt_epa_pack’

Re: [brlcad-devel] Help understanding code

2016-03-19 Thread Vasco Alexandre da Silva Costa
On Wed, Mar 16, 2016 at 7:36 PM, Vasco Alexandre da Silva Costa < vasco.co...@gmail.com> wrote: > On Wed, Mar 16, 2016 at 7:28 PM, Param Hanji > wrote: > >> Hi, >> >> Installing the AMD SDK gave me OpenCL 1.2 support. I managed to configure >> cmake using cmake-gui

Re: [brlcad-devel] Help understanding code

2016-03-19 Thread Vasco Alexandre da Silva Costa
On Wed, Mar 16, 2016 at 8:26 PM, Vasco Alexandre da Silva Costa < vasco.co...@gmail.com> wrote: > On Wed, Mar 16, 2016 at 8:15 PM, Param Hanji > wrote: > >> Hi Vasco Costa, >> >> Yes -z 1 did it. :) >> >> Now fopen() throws an error! Function clt_read_code() in >>

Re: [brlcad-devel] Help understanding code

2016-03-19 Thread Vasco Alexandre da Silva Costa
On Wed, Mar 16, 2016 at 9:12 PM, Param Hanji wrote: > Yes, there was an error message on the terminal. Manually copying > everything to my current directory worked. Compilation starts but throws a > "pixel fb_write error". I think this is from rt/do.c from clt_run().

Re: [brlcad-devel] Help understanding code

2016-03-19 Thread Param Hanji
Hello, On Thu, Mar 17, 2016 at 4:57 AM Vasco Alexandre da Silva Costa < vasco.co...@gmail.com> wrote: > On Wed, Mar 16, 2016 at 9:44 PM, Param Hanji > wrote: > > You will need a lot of time to port bool.c so you need to schedule > appropriately. That code is rife

Re: [brlcad-devel] Help understanding code

2016-03-19 Thread Param Hanji
Oops I did manually edit the patch. I ran diff again and uploaded the patch without changes. I also changed the ID used to 19. On Sat 19 Mar, 2016, 2:51 AM Vasco Alexandre da Silva Costa, < vasco.co...@gmail.com> wrote: > On Fri, Mar 18, 2016 at 9:14 PM, Vasco Alexandre da Silva Costa < >

Re: [brlcad-devel] Help understanding code

2016-03-19 Thread Vasco Alexandre da Silva Costa
On Wed, Mar 16, 2016 at 9:44 PM, Param Hanji wrote: > Yeah sending the output to the file fixed it. I'll add in my > implementation for epa and submit a patch soon. > Oh ok. If you don't define an output that will happen. Now I can reproduce that issue here as well.

Re: [brlcad-devel] Help understanding code

2016-03-19 Thread Christopher Sean Morrison
-- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more.

Re: [brlcad-devel] Help understanding code

2016-03-19 Thread Param Hanji
Hi, My parallel epa still shows up a black screen. Is there anything wrong with my code? I looked hard for errors but couldn't find anything.I'll send you my patch. Thanks! On Fri, Mar 18, 2016 at 3:06 AM Vasco Alexandre da Silva Costa < vasco.co...@gmail.com> wrote: > On Thu, Mar 17, 2016 at

Re: [brlcad-devel] Help understanding code

2016-03-19 Thread Param Hanji
Yeah sending the output to the file fixed it. I'll add in my implementation for epa and submit a patch soon. Also, I was wondering if my GSOC proposal could include accelerating some more primitives(perhaps even all). This will buy me time to get use to the BRL-CAD codebase and also enable me to

Re: [brlcad-devel] Help understanding code

2016-03-19 Thread Param Hanji
On Fri, Mar 18, 2016 at 6:47 PM Param Hanji wrote: > > I'll start looking into the code as soon as i can. Is there any resource I > can refer to get a brief high level understanding of how ray tracing > occurs. I have no knowledge of computer graphics and even

Re: [brlcad-devel] Help understanding code

2016-03-19 Thread Vasco Alexandre da Silva Costa
On Thu, Mar 17, 2016 at 8:49 PM, Christopher Sean Morrison wrote: > > > On Mar 17, 2016, at 03:55 PM, Vasco Alexandre da Silva Costa < > vasco.co...@gmail.com> wrote: > > The problem is the material lighting code. The results are not the same. > In OpenCL mode it renders that ehy

Re: [brlcad-devel] Help understanding code

2016-03-19 Thread Vasco Alexandre da Silva Costa
On Wed, Mar 16, 2016 at 9:32 PM, Vasco Alexandre da Silva Costa < vasco.co...@gmail.com> wrote: > On Wed, Mar 16, 2016 at 9:12 PM, Param Hanji > wrote: > >> Yes, there was an error message on the terminal. Manually copying >> everything to my current directory worked.

Re: [brlcad-devel] Help understanding code

2016-03-19 Thread Christopher Sean Morrison
-- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more.

Re: [brlcad-devel] Help understanding code

2016-03-18 Thread Vasco Alexandre da Silva Costa
On Wed, Mar 16, 2016 at 7:28 PM, Param Hanji wrote: > Hi, > > Installing the AMD SDK gave me OpenCL 1.2 support. I managed to configure > cmake using cmake-gui and built successfully. But raytrace still doesn't > happen on my GPU. By adding fprintf statements, I found

Re: [brlcad-devel] Help understanding code

2016-03-18 Thread Param Hanji
Hi Vasco Costa, Yes -z 1 did it. :) Now fopen() throws an error! Function clt_read_code() in primitiive_util.c fopen() returns a NULL. I included and printed the error as described here http://stackoverflow.com/questions/8633909/what-is-the-reason-for-fopens-failure-to-open-a-file The error

Re: [brlcad-devel] Help understanding code

2016-03-18 Thread Vasco Alexandre da Silva Costa
On Fri, Mar 18, 2016 at 9:14 PM, Vasco Alexandre da Silva Costa < vasco.co...@gmail.com> wrote: > On Fri, Mar 18, 2016 at 1:17 PM, Param Hanji > wrote: > >> Hello, >> >> On Thu, Mar 17, 2016 at 4:57 AM Vasco Alexandre da Silva Costa < >> vasco.co...@gmail.com> wrote:

Re: [brlcad-devel] Help understanding code

2016-03-15 Thread Param Hanji
Hello, Yup I did run the OpenCL programs. I still can run them. I tried clinfo on root as well. Still no luck. Everyone seems to have issues with Nvidia OpenCL support. I'll first try the AMD SDK which should hopefully work. Otherwise I could use my desktop at home which has an AMD card and

Re: [brlcad-devel] Help understanding code

2016-03-15 Thread Vasco Alexandre da Silva Costa
On Tue, Mar 15, 2016 at 8:05 PM, Vasco Alexandre da Silva Costa < vasco.co...@gmail.com> wrote: > On Tue, Mar 15, 2016 at 11:52 AM, Param Hanji > wrote: > >> Further reading hinted at the lack of OpenCL 1.2 on Nvidia graphics >> cards. The clinfo package for Ubuntu

Re: [brlcad-devel] Help understanding code

2016-03-14 Thread Vasco Alexandre da Silva Costa
On Mon, Mar 14, 2016 at 6:32 PM, Param Hanji wrote: > Hello, > > I got the -z working. However only CPU parallelization is done. In my > build/CmakeCache.txt, the boolean BRLCAD_ENABLE_OPENCL is OFF. > I guess Cmake isn't detecting OpenCL on your system. You might

Re: [brlcad-devel] Help understanding code

2016-03-14 Thread Param Hanji
Hi everyone, Sorry for the brief period of absence. I did a fresh build and got the GUI working. A build with .cl file for accelerating epa also completes successfully. I've generated the .patch file as well. However, parallel ray trace fails on every primitive(including ell, ehy, sph etc). I

Re: [brlcad-devel] Help understanding code

2016-03-08 Thread Christopher Sean Morrison
> I had run just cmake .. (which was described as the default). After > re-making, I can run mged and produce the .pix files on the command line. I > then used the pix-png tool to view the shapes and they are accurate. The GUI > still doesn't open up. Note you can render directly to png from

Re: [brlcad-devel] Help understanding code

2016-03-08 Thread Vasco Alexandre da Silva Costa
On Tue, Mar 8, 2016 at 3:14 PM, Param Hanji wrote: > I had run just cmake .. (which was described as the default). After > re-making, I can run mged and produce the .pix files on the command line. I > then used the pix-png tool to view the shapes and they are

Re: [brlcad-devel] Help understanding code

2016-03-08 Thread Param Hanji
Um running 'rt' gives me a message "view does not exist". The same message is displayed if I try any other primitive(like ell, sph as well). So maybe, it's an installation issue? However 'make check' gave me no errors. Also, I can't get a GUI to work. 'mged' starts and offers to attach either a

Re: [brlcad-devel] Help understanding code

2016-03-08 Thread Vasco Alexandre da Silva Costa
Are you using the Tcl/Tk version of mged? BRL-CAD comes with the libraries. To use the included libraries compile after: cmake .. -DBRLCAD_BUNDLED_LIBS=ON This was explained in the SVN page I originally linked: http://brlcad.org/wiki/Building_from_SVN Once you get mged working in Tcl/Tk you can

Re: [brlcad-devel] Help understanding code

2016-03-08 Thread Param Hanji
PS: I can't seem to get 'brlterm' to run as well(don't know how to). For now I'm launching 'mged' directly from /usr/brlcad/dev-7.25.0/bin/mged. Cheers, Param Hanji On Tue, Mar 8, 2016 at 8:01 AM Param Hanji wrote: > Um running 'rt' gives me a message "view does not

Re: [brlcad-devel] Help understanding code

2016-03-08 Thread Param Hanji
I had run just cmake .. (which was described as the default). After re-making, I can run mged and produce the .pix files on the command line. I then used the pix-png tool to view the shapes and they are accurate. The GUI still doesn't open up. Also, how do I render with OpenCl? I'm assuming what

Re: [brlcad-devel] Help understanding code

2016-03-07 Thread Vasco Alexandre da Silva Costa
PS: I originally suggested the 'eto' primitive because it is useful to design vehicle wheels. But other people who have been around here longer than I have can better suggest you which primitives are most useful to implement. Sean and Erik were my GSoC mentors last year. They should know that

Re: [brlcad-devel] Help understanding code

2016-03-07 Thread Vasco Alexandre da Silva Costa
On Mon, Mar 7, 2016 at 11:28 AM, Param Hanji wrote: > Hi, > > I've managed to accelerate "librt/primitives/epa". I now need to create an > ID for it in "primitives/rt.cl". It's okay if I define it with ID 40 > right(on line 94)? > > I've also made changes to

Re: [brlcad-devel] Help understanding code

2016-03-05 Thread Vasco Alexandre da Silva Costa
PS: When I was starting out programming in this project I used the NetBeans IDE to browse the BRL-CAD source code so I could understand the code structure better. As a last resort grep is your friend... On Sat, Mar 5, 2016 at 10:25 PM, Vasco Alexandre da Silva Costa < vasco.co...@gmail.com>

Re: [brlcad-devel] Help understanding code

2016-03-05 Thread Vasco Alexandre da Silva Costa
The primitives folder has the primitive implementation code. See librt/primitives/primitive_util.c for the OpenCL C calls proper. On Sat, Mar 5, 2016 at 7:10 AM, Param Hanji wrote: > Hello, > > I was going through the code in librt/primitives folder. The OpenCL >

[brlcad-devel] Help understanding code

2016-03-05 Thread Param Hanji
Hello, Let me start off by saying that I'm new to OpenCL and large open source projects like BRL-CAD, and could really use a bit of guidance. I was going through the code in librt/primitives/ehy folder as pointed out by a member of this community yesterday. The "ehy_shot.cl" file in this folder