Probem with compiling source code of Accelerad

558 views
Skip to first unread message

evaba...@gmail.com

unread,
Jul 25, 2018, 5:34:10 AM7/25/18
to Accelerad Users
Hello!
I am trying to install the Accelerad by source.
I have already download the NVIDIA-OptiX-SDK-5.1.0-linux64_24109458.sh and I have run it, in order to have the NVIDIA-OptiX-SDK-5.1.0-linux64 folder on my Desktop.

When I download the folder with the source code, I have compiling problems in the src/rt folder. (I have already change the path in CMakeLists.txt there, to the correct path of my NVIDIA-OptiX-SDK-5.1.0-linux64 folder so to recognize the Optix libraries).

The problem is the following:

gcc -I../common -L../lib -O2 -Dlinux -D_FILE_OFFSET_BITS=64 -L/usr/X11R6/lib -I/usr/include/X11 -DNOSTEREO -o ./rtrace rtmain.o rtrace.o duphead.o persist.o ../lib/libraycalls.a ../lib/libradiance.a -lrtrad -lm
duphead.o: In function `openheader':
duphead.c:(.text+0x4a): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
rtmain.o: In function `main':
rtmain.c:(.text.startup+0xb74): undefined reference to `printRayTracingTime'
rtmain.c:(.text.startup+0xc71): undefined reference to `printRayTracingTime'
rtrace.o: In function `rtrace':
rtrace.c:(.text+0xe29): undefined reference to `computeOptix'
collect2: error: ld returned 1 exit status
make: *** [rtrace] Error 1

And indeed when I check for example at the file rtrace.c file I find this:

extern void computeOptix(const size_t width, const size_t height, const unsigned int imm_irrad, const double alarm, RAY* rays);

but I do not find the code of this function.

How can I fix it?
Or if I can't how can I find the source code of those finctions?

Thank you,
Eva

Nathaniel Jones

unread,
Jul 25, 2018, 6:50:55 AM7/25/18
to Accelerad Users
Hi Eva,

Are you using CMake? I have not updated any of the other build scripts included with Radiance, so at the moment CMake is the only way to set up the Accelerad project to compile.

Within src/rt/CMakeLists.txt, you'll see that rtrace is built with a number of extra source files and libraries:

add_executable(rtrace rtmain.c rtrace.c duphead.c persist.c ${ACCELERAD_rtrace_files}) target_link_libraries(rtrace ${ACCELERAD_LIBRARY} ${optix_LIBRARY} ${CUDA_CUDART_LIBRARY} raycalls radiance rtrad)

Your gcc command does not include any of the files contained in the lists ${ACCELERAD_rtrace_files}, ${ACCELERAD_LIBRARY}, ${optix_LIBRARY}, or ${CUDA_CUDART_LIBRARY}. That explains your undefined references. Make sure that these files are part of your command. The easiest way to do this is to run CMake.

Nathaniel

evaba...@gmail.com

unread,
Jul 25, 2018, 4:06:08 PM7/25/18
to Accelerad Users
Hello,
no I tried to build it with the command ./makeall install (as I show in the README.txt file).
I tried to run the command 'cmake .' in every directory I have CMakeLists.txt and then run the Makefile (make) but I still do not get the executables I want (executable of rcontrib for example).
Everything I found about building the source code of Accelerad was talking about running the './makeall install' command.
Is there any clear guide for building it with cmake?
Or could you please tell me the correct way, because with the way I tried I did not achieve it.

Thank you,
Eva 

Nathaniel Jones

unread,
Jul 25, 2018, 4:32:17 PM7/25/18
to Accelerad Users
Hi Eva,

There are many resources you can use to learn about CMake. It is helpful to have some knowledge of it before compiling Accelerad. For Windows and Mac, you can follow the instructions on the Daysim site for the most part. For Linux, you can do it as follows:

mkdir AcceleradBuild
cd AcceleradBuild
cmake ../Accelerad
make

Note that CMake is only called on the top level Accelerad directory and is called from outside of that directory.

Accelerad is a fork of Radiance and attempts to deviate as little from Radiance as possible. As such, the README that you see on Github is currently the Radiance README file. It's instructions will not work for Accelerad.

Nathaniel

evaba...@gmail.com

unread,
Jul 26, 2018, 8:38:02 AM7/26/18
to Accelerad Users
Hello,
I typed the commands below, but Accelerad is still not built.

The error message is :

CMake Error at src/rt/CMakeLists.txt:133 (find_package):
  By not providing "FindOptiX.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "OptiX", but
  CMake did not find one.

  Could not find a package configuration file provided by "OptiX" with any of
  the following names:

    OptiXConfig.cmake
    optix-config.cmake

  Add the installation prefix of "OptiX" to CMAKE_PREFIX_PATH or set
  "OptiX_DIR" to a directory containing one of the above files.  If "OptiX"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!


I have changed the path to the correct NVIDIA-OptiX-SDK-5.1.0-linux64 folder and I cannot understand why it is not working.
I cannot find a CMAKE_PREFIX_PATH in the CMakeLists.txt.
Do I have to store somewhere specifically the Radience folder too?

Thank you,
Eva

Nathaniel Jones

unread,
Jul 26, 2018, 9:16:55 AM7/26/18
to Accelerad Users
Hi Eva,

CMAKE_MODULE_PATH is set in src/rt/CMakeLists.txt line 130, immediately before the call to find_package. In the unedited version, it will look for this path:

~/NVIDIA-OptiX-SDK-3.9.2-linux64/SDK/CMake/FindOptiX.cmake

I understand that you have edited the path to the OptiX SDK folder and have installed it in a different location (your desktop). Can you check that FindOptiX.cmake exists and that you have entered the correct path to find it?

You may save yourself some difficulty by using the configuration that was already set in the CMakeLists.txt file: Install OptiX 3.9.2 and save it in the default location (not your desktop). Once you know it is working, then you can experiment with changes.

Nathaniel

evaba...@gmail.com

unread,
Jul 30, 2018, 9:13:06 AM7/30/18
to Accelerad Users
Hello!
Unfortunatelly I have not achieved it yet. The folder is in the same location as mentioned in the src/rt/CMakeLists.txt.
Now whaen I type cmake ../Accelerad I get this error:

CMake Warning (dev) at src/rt/CMakeLists.txt:336 (get_target_property):
  Policy CMP0045 is not set: Error on non-existent target in
  get_target_property.  Run "cmake --help-policy CMP0045" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  get_target_property() called with non-existent target "Qt5::QGifPlugin".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/rt/CMakeLists.txt:337 (get_target_property):
  Policy CMP0045 is not set: Error on non-existent target in
  get_target_property.  Run "cmake --help-policy CMP0045" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  get_target_property() called with non-existent target "Qt5::QICOPlugin".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/rt/CMakeLists.txt:338 (get_target_property):
  Policy CMP0045 is not set: Error on non-existent target in
  get_target_property.  Run "cmake --help-policy CMP0045" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  get_target_property() called with non-existent target "Qt5::QJpegPlugin".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/rt/CMakeLists.txt:339 (get_target_property):
  Policy CMP0045 is not set: Error on non-existent target in
  get_target_property.  Run "cmake --help-policy CMP0045" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  get_target_property() called with non-existent target "Qt5::QTiffPlugin".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/rt/CMakeLists.txt:352 (get_target_property):
  Policy CMP0045 is not set: Error on non-existent target in
  get_target_property.  Run "cmake --help-policy CMP0045" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  get_target_property() called with non-existent target
  "Qt5::QXcbIntegrationPlugin".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at InstallRules/CMakeLists.txt:19 (get_target_property):
  get_target_property() called with non-existent target "Qt5::QGifPlugin".


CMake Error at InstallRules/CMakeLists.txt:20 (get_target_property):
  get_target_property() called with non-existent target "Qt5::QICOPlugin".


CMake Error at InstallRules/CMakeLists.txt:21 (get_target_property):
  get_target_property() called with non-existent target "Qt5::QJpegPlugin".


CMake Error at InstallRules/CMakeLists.txt:22 (get_target_property):
  get_target_property() called with non-existent target "Qt5::QTiffPlugin".


CMake Error at InstallRules/CMakeLists.txt:33 (get_target_property):
  get_target_property() called with non-existent target
  "Qt5::QXcbIntegrationPlugin".


-- Configuring incomplete, errors occurred!

Thank you in advance,
Eva

Nathaniel Jones

unread,
Jul 30, 2018, 12:36:16 PM7/30/18
to Accelerad Users
Hi Eva,

This is a known bug in the Linux installation. The Linux installation is not supposed to have a Qt dependency because it should use X11, but for some reason that is not happening. You can read more about it here.

The Accelerad programs to not require rvu to be built, so as a simple work-around, I suggest commenting out the parts of the src/rt/CMakeLists.txt that build rvu. Those are lines 286-318 and 335-358.

Nathaniel

evaba...@gmail.com

unread,
Jul 30, 2018, 2:44:22 PM7/30/18
to Accelerad Users
Thank you Nathaniel!
Everything is working fine now!

Eva

evaba...@gmail.com

unread,
Sep 20, 2018, 4:58:55 AM9/20/18
to Accelerad Users
Hello Nathaniel,
I am trying again to compile the source code of accelerad in a different computer now, with CentOS linux.
I follow the instructions below:

mkdir AcceleradBuild
cd AcceleradBuild
cmake ../Accelerad
make

But when I type make, I do not produce all the executables I need.
The output is:


[  1%] Built target libreetz
[  2%] Built target mgf
[  3%] Built target rgl
[ 19%] Built target rtrad
[ 29%] Built target radiance
[ 29%] Built target testBSDF
[ 29%] Built target cnt
[ 29%] Built target ev
[ 29%] Built target histo
[ 29%] Built target icalc
[ 29%] Built target neaten
[ 30%] Built target rcalc
[ 30%] Built target rlam
[ 30%] Built target tabfunc
[ 30%] Built target total
[ 30%] Built target 3ds2mgf
[ 30%] Built target arch2rad
[ 30%] Built target bsdf2klems
[ 31%] Built target bsdf2rad
[ 31%] Built target bsdf2ttree
[ 32%] Built target bsdfquery
[ 33%] Built target epw2wea
[ 34%] Built target ies2rad
[ 35%] Built target lampcolor
[ 35%] Built target mgf2inv
[ 36%] Built target meta
[ 36%] Built target mgf2meta
[ 36%] Built target mgf2rad
[ 37%] Built target mgfilt
[ 38%] Built target nff2rad
[ 39%] Built target obj2rad
[ 39%] Built target pkgBSDF
[ 40%] Built target rad2mgf
[ 41%] Built target tmesh2rad
[ 42%] Built target genbeads
[ 42%] Built target genblinds
[ 42%] Built target genbox
[ 42%] Built target genbranch
[ 42%] Built target gencatenary
[ 43%] Built target genclock
[ 43%] Built target gendaylit
[ 43%] Built target gendaymtx
[ 43%] Built target genmarble
[ 44%] Built target genprism
[ 44%] Built target genrev
[ 44%] Built target gensky
[ 45%] Built target gensurf
[ 45%] Built target genworm
[ 45%] Built target raycalls
[ 45%] Built target mkillum
[ 45%] Built target mksource
[ 45%] Built target replmarks
[ 45%] Built target xform
[ 45%] Built target genrhgrid
[ 46%] Built target rhcopy
[ 46%] Built target rhinfo
[ 48%] Built target rholo
[ 49%] Built target rhoptimize
[ 50%] Built target rhpict
[ 51%] Built target x11.hdi
[ 52%] Built target bgraph
[ 53%] Built target cv
[ 53%] Built target dgraph
[ 53%] Built target gcomp
[ 53%] Built target igraph
[ 54%] Built target meta2bmp
[ 55%] Built target meta2tga
CMake Error: cmake version 3.1.1
Usage: /user/other/abinitio/bin/cp2k-5.1_no_inf_mkl_leaf/tools/toolchain/install/cmake-3.1.1/bin/cmake -E [command] [arguments ...]
Available commands: 
  chdir dir cmd [args]...   - run command in a given directory
  compare_files file1 file2 - check if file1 is same as file2
  copy file destination     - copy file to destination (either file or directory)
  copy_directory source destination   - copy directory 'source' content to directory 'destination'
  copy_if_different in-file out-file  - copy file if input has changed
  echo [string]...          - displays arguments as text
  echo_append [string]...   - displays arguments as text but no new line
  env [--unset=NAME]... [NAME=VALUE]... COMMAND [ARG]...
                            - run command in a modified environment
  environment               - display the current environment
  make_directory dir        - create a directory
  md5sum file1 [...]        - compute md5sum of files
  remove [-f] file1 file2 ... - remove the file(s), use -f to force it
  remove_directory dir      - remove a directory and its contents
  rename oldname newname    - rename a file or directory (on one volume)
  tar [cxt][vfz][cvfj] file.tar [file/dir1 file/dir2 ...]
                            - create or extract a tar or zip archive
  sleep <number>...         - sleep for given number of seconds
  time command [args] ...   - run command and return elapsed time
  touch file                - touch a file.
  touch_nocreate file       - touch a file but do not create it.
Available on UNIX only:
  create_symlink old new    - create a symbolic link new -> old

src/meta/CMakeFiles/mta.dir/build.make:49: recipe for target 'src/meta/CMakeFiles/mta' failed
make[2]: * [src/meta/CMakeFiles/mta] Error 1
CMakeFiles/Makefile2:3484: recipe for target 'src/meta/CMakeFiles/mta.dir/all' failed
make[1]: * [src/meta/CMakeFiles/mta.dir/all] Error 2
Makefile:147: recipe for target 'all' failed
make: * [all] Error 2

Any ideas of I could fix it?
Thank you !

Nathaniel Jones

unread,
Sep 20, 2018, 11:34:26 AM9/20/18
to Accelerad Users
Hi Eva,

It looks like Cmake on CentOS is not recognizing the cv command, which is a Radiance command. I suggest you post this issue to the Radiance forum, as they may be able to fix this. You can also remove the target mta from src/meta/CMakeLists.txt because you most likely don't need the symbols.mta and vchars.mta files that it creates. If you do need them, you can build them after you run make by using the commands found in src/meta/CMakeLists.txt.

Nathaniel

evaba...@gmail.com

unread,
Sep 25, 2018, 5:23:36 AM9/25/18
to Accelerad Users
Hello Nathaniel,
thank you so much for your help!
I removed the target mta from src/meta/CMakeLists.txt  as you suggested me, and the compiling is better now. I have more executables now, but still not all of them.

The output I have now is this:
Scanning dependencies of target mtext
[ 56%] Building C object src/meta/CMakeFiles/mtext.dir/mtext.c.o
[ 56%] Building C object src/meta/CMakeFiles/mtext.dir/primout.c.o
[ 56%] Building C object src/meta/CMakeFiles/mtext.dir/mfio.c.o
[ 56%] Building C object src/meta/CMakeFiles/mtext.dir/misc.c.o
[ 56%] Building C object src/meta/CMakeFiles/mtext.dir/syscalls.c.o
Linking C executable ../../bin/mtext
[ 56%] Built target mtext
Scanning dependencies of target pexpand
[ 56%] Building C object src/meta/CMakeFiles/pexpand.dir/pexpand.c.o
[ 56%] Building C object src/meta/CMakeFiles/pexpand.dir/expand.c.o
[ 56%] Building C object src/meta/CMakeFiles/pexpand.dir/segment.c.o
[ 56%] Building C object src/meta/CMakeFiles/pexpand.dir/palloc.c.o
[ 57%] Building C object src/meta/CMakeFiles/pexpand.dir/mfio.c.o
[ 57%] Building C object src/meta/CMakeFiles/pexpand.dir/misc.c.o
[ 57%] Building C object src/meta/CMakeFiles/pexpand.dir/syscalls.c.o
Linking C executable ../../bin/pexpand
[ 57%] Built target pexpand
Scanning dependencies of target plot4
[ 57%] Building C object src/meta/CMakeFiles/plot4.dir/plot4.c.o
[ 58%] Building C object src/meta/CMakeFiles/plot4.dir/primout.c.o
[ 58%] Building C object src/meta/CMakeFiles/plot4.dir/mfio.c.o
[ 58%] Building C object src/meta/CMakeFiles/plot4.dir/misc.c.o
[ 58%] Building C object src/meta/CMakeFiles/plot4.dir/syscalls.c.o
Linking C executable ../../bin/plot4
[ 58%] Built target plot4
Scanning dependencies of target plotin
[ 58%] Building C object src/meta/CMakeFiles/plotin.dir/plotin.c.o
[ 59%] Building C object src/meta/CMakeFiles/plotin.dir/primout.c.o
[ 59%] Building C object src/meta/CMakeFiles/plotin.dir/mfio.c.o
[ 59%] Building C object src/meta/CMakeFiles/plotin.dir/misc.c.o
[ 59%] Building C object src/meta/CMakeFiles/plotin.dir/syscalls.c.o
Linking C executable ../../bin/plotin
[ 59%] Built target plotin
Scanning dependencies of target psmeta
[ 59%] Building C object src/meta/CMakeFiles/psmeta.dir/psmeta.c.o
[ 60%] Building C object src/meta/CMakeFiles/psmeta.dir/psplot.c.o
[ 60%] Building C object src/meta/CMakeFiles/psmeta.dir/mfio.c.o
[ 60%] Building C object src/meta/CMakeFiles/psmeta.dir/misc.c.o
[ 60%] Building C object src/meta/CMakeFiles/psmeta.dir/syscalls.c.o
Linking C executable ../../bin/psmeta
[ 60%] Built target psmeta
Scanning dependencies of target psort
[ 60%] Building C object src/meta/CMakeFiles/psort.dir/psort.c.o
[ 60%] Building C object src/meta/CMakeFiles/psort.dir/sort.c.o
[ 61%] Building C object src/meta/CMakeFiles/psort.dir/palloc.c.o
[ 61%] Building C object src/meta/CMakeFiles/psort.dir/mfio.c.o
[ 61%] Building C object src/meta/CMakeFiles/psort.dir/misc.c.o
[ 61%] Building C object src/meta/CMakeFiles/psort.dir/syscalls.c.o
Linking C executable ../../bin/psort
../common/librtrad.a(paths.c.o): In function `temp_filename':
paths.c:(.text+0x379): warning: the use of `mktemp' is dangerous, better use `mkstemp'
[ 61%] Built target psort
Scanning dependencies of target x11meta
[ 61%] Building C object src/meta/CMakeFiles/x11meta.dir/palloc.c.o
[ 61%] Building C object src/meta/CMakeFiles/x11meta.dir/plot.c.o
[ 61%] Building C object src/meta/CMakeFiles/x11meta.dir/x11plot.c.o
[ 62%] Building C object src/meta/CMakeFiles/x11meta.dir/xmeta.c.o
[ 62%] Building C object src/meta/CMakeFiles/x11meta.dir/mfio.c.o
[ 62%] Building C object src/meta/CMakeFiles/x11meta.dir/misc.c.o
[ 62%] Building C object src/meta/CMakeFiles/x11meta.dir/syscalls.c.o
Linking C executable ../../bin/x11meta
[ 62%] Built target x11meta
Scanning dependencies of target getbbox
[ 62%] Building C object src/ot/CMakeFiles/getbbox.dir/bbox.c.o
[ 62%] Building C object src/ot/CMakeFiles/getbbox.dir/getbbox.c.o
[ 62%] Building C object src/ot/CMakeFiles/getbbox.dir/init2otypes.c.o
[ 63%] Building C object src/ot/CMakeFiles/getbbox.dir/readobj2.c.o
Linking C executable ../../bin/getbbox
[ 63%] Built target getbbox
Scanning dependencies of target obj2mesh
[ 63%] Building C object src/ot/CMakeFiles/obj2mesh.dir/cvmesh.c.o
[ 63%] Building C object src/ot/CMakeFiles/obj2mesh.dir/o_face.c.o
[ 63%] Building C object src/ot/CMakeFiles/obj2mesh.dir/obj2mesh.c.o
[ 63%] Building C object src/ot/CMakeFiles/obj2mesh.dir/wfconv.c.o
[ 63%] Building C object src/ot/CMakeFiles/obj2mesh.dir/writemesh.c.o
Linking C executable ../../bin/obj2mesh
[ 63%] Built target obj2mesh
Scanning dependencies of target oconv
[ 63%] Building C object src/ot/CMakeFiles/oconv.dir/bbox.c.o
[ 63%] Building C object src/ot/CMakeFiles/oconv.dir/initotypes.c.o
[ 63%] Building C object src/ot/CMakeFiles/oconv.dir/o_cone.c.o
[ 63%] Building C object src/ot/CMakeFiles/oconv.dir/o_face.c.o
[ 64%] Building C object src/ot/CMakeFiles/oconv.dir/o_instance.c.o
[ 64%] Building C object src/ot/CMakeFiles/oconv.dir/oconv.c.o
[ 64%] Building C object src/ot/CMakeFiles/oconv.dir/sphere.c.o
[ 64%] Building C object src/ot/CMakeFiles/oconv.dir/writeoct.c.o
Linking C executable ../../bin/oconv
[ 64%] Built target oconv
Scanning dependencies of target macbethcal
[ 64%] Building C object src/px/CMakeFiles/macbethcal.dir/macbethcal.c.o
[ 64%] Building C object src/px/CMakeFiles/macbethcal.dir/pmapgen.c.o
[ 65%] Building C object src/px/CMakeFiles/macbethcal.dir/mx3.c.o
[ 65%] Building C object src/px/CMakeFiles/macbethcal.dir/warp3d.c.o
Linking C executable ../../bin/macbethcal
[ 65%] Built target macbethcal
Scanning dependencies of target pcomb
[ 65%] Building C object src/px/CMakeFiles/pcomb.dir/pcomb.c.o
Linking C executable ../../bin/pcomb
[ 65%] Built target pcomb
Scanning dependencies of target pcompos
[ 66%] Building C object src/px/CMakeFiles/pcompos.dir/pcompos.c.o
Linking C executable ../../bin/pcompos
[ 66%] Built target pcompos
Scanning dependencies of target pcond
[ 66%] Building C object src/px/CMakeFiles/pcond.dir/pcond.c.o
[ 66%] Building C object src/px/CMakeFiles/pcond.dir/pcond2.c.o
[ 66%] Building C object src/px/CMakeFiles/pcond.dir/pcond3.c.o
[ 66%] Building C object src/px/CMakeFiles/pcond.dir/pcond4.c.o
[ 66%] Building C object src/px/CMakeFiles/pcond.dir/warp3d.c.o
Linking C executable ../../bin/pcond
[ 66%] Built target pcond
Scanning dependencies of target pcwarp
[ 67%] Building C object src/px/CMakeFiles/pcwarp.dir/pcwarp.c.o
[ 67%] Building C object src/px/CMakeFiles/pcwarp.dir/warp3d.c.o
Linking C executable ../../bin/pcwarp
[ 67%] Built target pcwarp
Scanning dependencies of target pextrem
[ 67%] Building C object src/px/CMakeFiles/pextrem.dir/pextrem.c.o
Linking C executable ../../bin/pextrem
[ 67%] Built target pextrem
Scanning dependencies of target pfilt
[ 67%] Building C object src/px/CMakeFiles/pfilt.dir/pf2.c.o
[ 67%] Building C object src/px/CMakeFiles/pfilt.dir/pf3.c.o
[ 68%] Building C object src/px/CMakeFiles/pfilt.dir/pfilt.c.o
Linking C executable ../../bin/pfilt
CMakeFiles/pfilt.dir/pfilt.c.o: In function `main':
pfilt.c:(.text+0x7ce): warning: the use of `mktemp' is dangerous, better use `mkstemp'
[ 68%] Built target pfilt
Scanning dependencies of target pflip
[ 68%] Building C object src/px/CMakeFiles/pflip.dir/pflip.c.o
Linking C executable ../../bin/pflip
[ 68%] Built target pflip
Scanning dependencies of target pinterp
[ 68%] Building C object src/px/CMakeFiles/pinterp.dir/pinterp.c.o
Linking C executable ../../bin/pinterp
[ 68%] Built target pinterp
Scanning dependencies of target pmblur2
[ 68%] Building C object src/px/CMakeFiles/pmblur2.dir/pmblur2.c.o
Linking C executable ../../bin/pmblur2
[ 68%] Built target pmblur2
Scanning dependencies of target protate
[ 68%] Building C object src/px/CMakeFiles/protate.dir/protate.c.o
Linking C executable ../../bin/protate
[ 68%] Built target protate
Scanning dependencies of target psign
[ 68%] Building C object src/px/CMakeFiles/psign.dir/psign.c.o
Linking C executable ../../bin/psign
[ 68%] Built target psign
Scanning dependencies of target psketch
[ 68%] Building C object src/px/CMakeFiles/psketch.dir/psketch.c.o
Linking C executable ../../bin/psketch
[ 68%] Built target psketch
Scanning dependencies of target pvalue
[ 68%] Building C object src/px/CMakeFiles/pvalue.dir/pvalue.c.o
Linking C executable ../../bin/pvalue
[ 68%] Built target pvalue
Scanning dependencies of target ra_bmp
[ 68%] Building C object src/px/CMakeFiles/ra_bmp.dir/ra_bmp.c.o
Linking C executable ../../bin/ra_bmp
[ 68%] Built target ra_bmp
Scanning dependencies of target ra_gif
[ 68%] Building C object src/px/CMakeFiles/ra_gif.dir/ra_gif.c.o
[ 68%] Building C object src/px/CMakeFiles/ra_gif.dir/clrtab.c.o
[ 68%] Building C object src/px/CMakeFiles/ra_gif.dir/neuclrtab.c.o
Linking C executable ../../bin/ra_gif
[ 68%] Built target ra_gif
Scanning dependencies of target ra_hexbit
[ 69%] Building C object src/px/CMakeFiles/ra_hexbit.dir/ra_hexbit.c.o
Linking C executable ../../bin/ra_hexbit
[ 69%] Built target ra_hexbit
Scanning dependencies of target ra_pict
[ 69%] Building C object src/px/CMakeFiles/ra_pict.dir/ra_pict.c.o
Linking C executable ../../bin/ra_pict
[ 69%] Built target ra_pict
Scanning dependencies of target ra_ppm
[ 69%] Building C object src/px/CMakeFiles/ra_ppm.dir/ra_ppm.c.o
Linking C executable ../../bin/ra_ppm
[ 69%] Built target ra_ppm
Scanning dependencies of target ra_ps
[ 69%] Building C object src/px/CMakeFiles/ra_ps.dir/ra_ps.c.o
Linking C executable ../../bin/ra_ps
[ 69%] Built target ra_ps
Scanning dependencies of target ra_rgbe
[ 69%] Building C object src/px/CMakeFiles/ra_rgbe.dir/ra_rgbe.c.o
Linking C executable ../../bin/ra_rgbe
[ 69%] Built target ra_rgbe
Scanning dependencies of target ra_t16
[ 69%] Building C object src/px/CMakeFiles/ra_t16.dir/ra_t16.c.o
Linking C executable ../../bin/ra_t16
[ 69%] Built target ra_t16
Scanning dependencies of target ra_t8
[ 70%] Building C object src/px/CMakeFiles/ra_t8.dir/ra_t8.c.o
[ 70%] Building C object src/px/CMakeFiles/ra_t8.dir/clrtab.c.o
[ 70%] Building C object src/px/CMakeFiles/ra_t8.dir/neuclrtab.c.o
Linking C executable ../../bin/ra_t8
[ 70%] Built target ra_t8
Scanning dependencies of target ra_xyze
[ 70%] Building C object src/px/CMakeFiles/ra_xyze.dir/ra_xyze.c.o
Linking C executable ../../bin/ra_xyze
[ 70%] Built target ra_xyze
Scanning dependencies of target ttyimage
[ 70%] Building C object src/px/CMakeFiles/ttyimage.dir/ttyimage.c.o
Linking C executable ../../bin/ttyimage
[ 70%] Built target ttyimage
Scanning dependencies of target ximage
[ 70%] Building C object src/px/CMakeFiles/ximage.dir/x11image.c.o
[ 70%] Building C object src/px/CMakeFiles/ximage.dir/x11raster.c.o
[ 70%] Building C object src/px/CMakeFiles/ximage.dir/clrtab.c.o
Linking C executable ../../bin/ximage
[ 70%] Built target ximage
Scanning dependencies of target xshowtrace
[ 70%] Building C object src/px/CMakeFiles/xshowtrace.dir/xshowtrace.c.o
[ 71%] Building C object src/px/CMakeFiles/xshowtrace.dir/__/common/x11findwind.c.o
Linking C executable ../../bin/xshowtrace
[ 71%] Built target xshowtrace
[ 71%] Building NVCC ptx file src/rt/cuda_compile_ptx_generated_triangle_mesh.cu.ptx
nvcc fatal   : Value 'sm_20' is not defined for option 'gpu-architecture'
CMake Error at cuda_compile_ptx_generated_triangle_mesh.cu.ptx.cmake:198 (message):
  Error generating
  /home/user/AcceleradBuild/src/rt/cuda_compile_ptx_generated_triangle_mesh.cu.ptx


src/rt/CMakeFiles/accelerad.dir/build.make:245: recipe for target 'src/rt/cuda_compile_ptx_generated_triangle_mesh.cu.ptx' failed
make[2]: * [src/rt/cuda_compile_ptx_generated_triangle_mesh.cu.ptx] Error 1
CMakeFiles/Makefile2:4900: recipe for target 'src/rt/CMakeFiles/accelerad.dir/all' failed
make[1]: * [src/rt/CMakeFiles/accelerad.dir/all] Error 2
Makefile:147: recipe for target 'all' failed
make: * [all] Error 2

Any advice for this?
Thank you in advance!

evaba...@gmail.com

unread,
Sep 25, 2018, 10:46:43 AM9/25/18
to Accelerad Users
Hello Nathaniel,
I achieved to improve the compiling by finding the .cu.ptx files in other files of my system and transfering them to the specific directories that are required. 
But for the compiling, the file cuda_compile_ptx_generated_disk2square.cu.ptx is required, and I cannot find it anywhere in my system.
How can I find this file, that is necessary for the compiling?

Thank you in advance!

Nathaniel Jones

unread,
Sep 25, 2018, 11:00:03 AM9/25/18
to Accelerad Users
Hi Eva,

I Googled your error message, and the very first result suggests that you change the architecture to a higher version, for instance sm_30. The architecture is specified in src/rt/CMakeLists.txt line 155.

Copying the .ptx files from a previous release may not work on your machine because the previous .ptx files were compiled with sm_20 architecture, which your computer apparently does not support. Furthermore, the latest source code version includes a number of changes that may make it incompatible with previous .ptx files, so you would need to check out the source code of version 0.6 beta in order to use the precompiled .ptx files.

The file cuda_compile_ptx_generated_disk2square.cu.ptx did not exist when version 0.6 beta was released. It is not necessary for compiling, but it is required for certain accelerad_rtfluxmtx operations.

Nathaniel

evaba...@gmail.com

unread,
Sep 26, 2018, 9:53:51 AM9/26/18
to Accelerad Users
Hello Nathaniel,
I am intersted in the rfluxmtx accelerad version, so I propably need the cuda_compile_ptx_generated_disk2square.cu.ptx file but I do not know where to find it.
I changed the architecture from sm_20 to higher and I have those errors now:

-- Could NOT find TIFF (missing:  TIFF_LIBRARY TIFF_INCLUDE_DIR) 
-- Could NOT find TIFF (missing:  TIFF_LIBRARY TIFF_INCLUDE_DIR) 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/AcceleradBuild
[ 71%] Building NVCC (Device) object src/rt/CMakeFiles/cuda_compile.dir/cuda_compile_generated_cuda_adaptive_seeding.cu.o
/home/user/Accelerad/src/rt/cuda_adaptive_seeding.cu(541): error: expected a ")"

/home/user/Accelerad/src/rt/cuda_adaptive_seeding.cu(615): error: expected a ")"

/home/user/Accelerad/src/rt/cuda_adaptive_seeding.cu(616): error: expected a ")"

/home/user/Accelerad/src/rt/cuda_adaptive_seeding.cu(619): error: expected a ")"

/home/user/Accelerad/src/rt/cuda_adaptive_seeding.cu(622): error: expected a ")"

/home/user/Accelerad/src/rt/cuda_adaptive_seeding.cu(625): error: expected a ")"

/home/user/Accelerad/src/rt/cuda_adaptive_seeding.cu(633): error: expected a ")"

/home/user/Accelerad/src/rt/cuda_adaptive_seeding.cu(634): error: expected a ")"

8 errors detected in the compilation of "/tmp/tmpxft_00002fa3_00000000-6_cuda_adaptive_seeding.cpp1.ii".
CMake Error at cuda_compile_generated_cuda_adaptive_seeding.cu.o.cmake:264 (message):
  Error generating file
  /home/user/AcceleradBuild/src/rt/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_cuda_adaptive_seeding.cu.o


src/rt/CMakeFiles/accelerad.dir/build.make:55: recipe for target 'src/rt/CMakeFiles/cuda_compile.dir/cuda_compile_generated_cuda_adaptive_seeding.cu.o' failed
make[2]: * [src/rt/CMakeFiles/cuda_compile.dir/cuda_compile_generated_cuda_adaptive_seeding.cu.o] Error 1
CMakeFiles/Makefile2:4900: recipe for target 'src/rt/CMakeFiles/accelerad.dir/all' failed
make[1]: * [src/rt/CMakeFiles/accelerad.dir/all] Error 2
Makefile:147: recipe for target 'all' failed
make: * [all] Error 2

It seems like again I have to put the .cu.ptx files in the directory but I do not find many of them and I do not know if I will solve it this way.
How can I check out the source code of version 0.6 beta in order to use the precompiled .ptx files?

Thank you in advance!

Nathaniel Jones

unread,
Sep 26, 2018, 10:29:45 AM9/26/18
to Accelerad Users
Hi Eva,

This error seems to occur at instances of the macro PRIu64. I see two possibilities here. One is that PRIu64 is not defined on your machine. Perhaps you have a version of the C compiler older than C99? You can fix this by adding the following macro to kmeans.h and potentially other header files:

#define PRIu64 "llu"

The other possibility is that your compiler does not understand C string concatenation. In that case, you will need to edit the strings at the lines indicated in the error messages so that (for instance):

"error %" PRIu64 " detected"

Becomes:

"error %llu detected"

Please let me know what the issue turns out to be so that I can update the code accordingly.

If you want cuda_compile_ptx_generated_disk2square.cu.ptx because you use disk2square.cal, you must compile it. Your current output indicates that you are compiling the .ptx files successfully, so I do not see any reason for you to use the version 0.6 beta source code. If you want to download it anyway, you can get it from the download page. However, the precompiled .ptx files are for sm_20, so they may not work with your system. Also, version 0.6 beta did not support disk2square.cal, so you wouldn't be able to use it with that version anyway.

Nathaniel

evaba...@gmail.com

unread,
Sep 27, 2018, 5:03:11 AM9/27/18
to Accelerad Users
Hello Nathaniel,
I edited the kmeans.h with #define PRIu64 "llu".
The compiling improved until 91% and I still do not have the rfluxmtx.
The errors are:


-- Could NOT find TIFF (missing:  TIFF_LIBRARY TIFF_INCLUDE_DIR) 
-- Could NOT find TIFF (missing:  TIFF_LIBRARY TIFF_INCLUDE_DIR) 
-- Configuring done
-- Generating done
-- Build files have been written to: /user/home/AcceleradBuild
[ 56%] Built target mtext
[ 57%] Built target pexpand
[ 58%] Built target plot4
[ 59%] Built target plotin
[ 60%] Built target psmeta
[ 61%] Built target psort
[ 62%] Built target x11meta
[ 63%] Built target getbbox
[ 63%] Built target obj2mesh
[ 64%] Built target oconv
[ 65%] Built target macbethcal
[ 65%] Built target pcomb
[ 66%] Built target pcompos
[ 66%] Built target pcond
[ 67%] Built target pcwarp
[ 67%] Built target pextrem
[ 68%] Built target pfilt
[ 68%] Built target pflip
[ 68%] Built target pinterp
[ 68%] Built target pmblur2
[ 68%] Built target protate
[ 68%] Built target psign
[ 68%] Built target psketch
[ 68%] Built target pvalue
[ 68%] Built target ra_bmp
[ 68%] Built target ra_gif
[ 69%] Built target ra_hexbit
[ 69%] Built target ra_pict
[ 69%] Built target ra_ppm
[ 69%] Built target ra_ps
[ 69%] Built target ra_rgbe
[ 69%] Built target ra_t16
[ 70%] Built target ra_t8
[ 70%] Built target ra_xyze
[ 70%] Built target ttyimage
[ 70%] Built target ximage
[ 71%] Built target xshowtrace
Linking CXX static library libaccelerad.a
[ 77%] Built target accelerad
[ 79%] Built target accelerad_callable
[ 79%] Built target lookamb
[ 79%] Built target mkpmap
[ 80%] Built target pmapdump
Linking CXX executable ../../bin/rcontrib
libradiance.a(pmapdata.c.o): In function `initPhotonHeap':
pmapdata.c:(.text+0x1bd0): warning: the use of `mktemp' is dangerous, better use `mkstemp'
[ 81%] Built target rcontrib
[ 84%] Built target rcontrib_callable
Linking CXX executable ../../bin/rpict
CMakeFiles/rpict.dir/rpict.c.o: In function `rpict':
rpict.c:(.text+0x433): warning: the use of `mktemp' is dangerous, better use `mkstemp'
[ 86%] Built target rpict
Linking CXX executable ../../bin/rtrace
CMakeFiles/rtrace.dir/duphead.c.o: In function `openheader':
duphead.c:(.text+0x53): warning: the use of `mktemp' is dangerous, better use `mkstemp'
[ 88%] Built target rtrace
[ 91%] Built target qtrvu
Linking CXX executable ../../bin/rvu
CMakeFiles/rvu.dir/x11.c.o: In function `std_comin':
x11.c:(.text+0xd6e): warning: the `gets' function is dangerous and should not be used.
libradiance.a(pmapdata.c.o): In function `initPhotonHeap':
pmapdata.c:(.text+0x1bd0): warning: the use of `mktemp' is dangerous, better use `mkstemp'
CMakeFiles/rvu.dir/rview.c.o: In function `rview':
rview.c:(.text+0x3a5): undefined reference to `qt_rvu_update_plot'
rview.c:(.text+0x3af): undefined reference to `qt_rvu_paint_image'
collect2: error: ld returned 1 exit status
src/rt/CMakeFiles/rvu.dir/build.make:790: recipe for target 'bin/rvu' failed
make[2]: * [bin/rvu] Error 1
CMakeFiles/Makefile2:5299: recipe for target 'src/rt/CMakeFiles/rvu.dir/all' failed
make[1]: * [src/rt/CMakeFiles/rvu.dir/all] Error 2

Nathaniel Jones

unread,
Sep 27, 2018, 9:37:14 AM9/27/18
to Accelerad Users
Hi Eva,

I'm not sure why PRIu64 was not defined on your system, but I will attempt to resolve this. Did you have to make the change anywhere else, or only in kmeans.h?

For the next error, I suggest to comment out the definition of ACCELERAD_RT on src/rt/accelerad.h line 11. This will cause the compiler to ignore the code sections with the undefined references.

Nathaniel

Nathaniel Jones

unread,
Oct 4, 2018, 3:01:52 AM10/4/18
to Accelerad Users
Hi Eva,

The latest HEAD version includes changes that should resolve the Linux compiling issues with PRIu64 and ACCELERAD_RT.

Nathaniel
Reply all
Reply to author
Forward
0 new messages