Installation of accull 0.3.1 on Linux Mint x64 (OpenCl SDK DIR trouble)

42 views
Skip to first unread message

compown...@gmail.com

unread,
Mar 18, 2014, 3:09:28 PM3/18/14
to acc...@googlegroups.com
Hello accULL Team!

I am having trouble either understanding or linking the proper OpenCL lib directory.

A quick view of my test rig:
Fresh Linux Mint 16 x64 installation
AMD E450 APU
accull 0.3.1

My steps thus far:
Installed prerequisites (minus any acceleration SDK's)
Installed AMD-APP-SDK-2.8.1.0-lnx64

Run with errors: build-accull.sh

Reason(?):
after setting env-parameters.sh line 7 to: export OCLSDKDIR=/opt/AMDAPP/lib/x86_64
$home/accull/frangollo/config.log says: LDFLAGS='-L/opt/AMDAPP/lib/x86_64/lib -L/usr/local/cuda/lib '
but the directory: /opt/AMDAPP/lib/x86_64/lib
does not exist.

More detailed installation notes as I went along:
http://pastie.org/8948372

And my $home/accull/frangollo/config.log
http://pastie.org/8948389


Any Advice? Thanks in advance..
Brett

Ruymán Reyes

unread,
Mar 19, 2014, 6:10:53 AM3/19/14
to acc...@googlegroups.com
Hi Brett,

Thank you for trying out accULL !

It seems that the problem is in the last line of the env-parameters.sh script

https://bitbucket.org/ruyman/accull/src/7d3fbcb3b2d6218ae0ae2ebb3c23f64906c98a99/env-parameters.sh?at=default


The line add an extra "lib" to $OCLSDKDIR:

export LDFLAGS="-L$OCLSDKDIR/lib -L$CUDADIR/lib "$LDFLAGS

This is not working for the current AMDAPPSDK , which has lib/x86 and lib/x86_64

If you edit manually that line and remove the extra "lib" you should be able to use it with the latest parameter you used.

Cheers!



--
Ruymán Reyes Castro


--
You received this message because you are subscribed to the Google Groups "accULL Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to accull+un...@googlegroups.com.
To post to this group, send email to acc...@googlegroups.com.
Visit this group at http://groups.google.com/group/accull.
For more options, visit https://groups.google.com/d/optout.

compown...@gmail.com

unread,
Mar 20, 2014, 2:43:09 PM3/20/14
to acc...@googlegroups.com
Thanks for the feedback!

Unfortunately that only seems to solve part of the linking problems...

Upon delving into your ./build-accull.sh and ./frangollo/configure scripts
I edited lines 7,8,38-42 in ./build-accull.sh further to reflect directories that don't exist on my system.
Which now look like:
lines(7-8):
export OCLSDKDIR=/opt/AMDAPP/include
export OCLcustomlibDIR=/opt/AMDAPP/lib/x86_64

lines(38-42):
export PATH=$ACCULLBASE/:$OCLSDKDIR/:$CUDADIR/bin/:$PATH
export LD_LIBRARY_PATH=$=$OCLSDKDIR/:$CUDADIR/lib:$CUDADIR/lib64:$CUDADIR/lib:$LD_LIBRARY_PATH
export C_INCLUDE_PATH=$OCLSDKDIR'/':$CUDADIR'/include/':$FRANGOLLODIR'/src/interface/':$C_INCLUDE_PATH
export CPPFLAGS="-I$OCLSDKDIR -I$OCLcustomlibDIR -I$CUDADIR/include"$CPPFLAGS
export LDFLAGS="-L$OCLSDKDIR -L$CUDADIR/lib "$LDFLAGS


however ./build-accull.sh
(actually it is ./frangollo/configure which is throwing the errors)
still is not finding some dependencies.

Here is the summery of what I have done:
http://pastie.org/8954094

Here is the step by step tracing of errors:
http://pastie.org/8954084

Here is my ./frangollo/config.log at this point in time:
http://pastie.org/8954100

Unfortunately stlib.h does not seem to exist on my system...?
I manually searched myself through the entire drive structure.
Installing:
   gcc
   build-essentials
   libc6-dev
intltool
should have taken care of this? Correct?
See related post: http://ubuntuforums.org/showthread.php?t=441404
See related post: http://forums.linuxmint.com/viewtopic.php?f=47&t=23901&start=0
Which seems to confirm that I should have it...
but after double checking the installation of the packages mentioned
./build-accull.sh gives the same result.


As a side note:
It would be nice to point to /opt/AMDAPP in
line 7 of ./env-parameters.sh then the script would
search for the DIR(s) inside that are needed.
That would remove confusion from linking OpenCL SDK from Intel vs AMD
or any changes between sdk versions out of your control.


Thanks for your assistance!
Brett Reich

compown...@gmail.com

unread,
Jul 1, 2014, 5:04:06 PM7/1/14
to acc...@googlegroups.com
I recently got a break with normal work and was able to check back and was thrilled to see a v0.4 update in some scripts.
The new v0.4 scripts were setup with x64 OpenCL AMD SDK, but there were still some (solved!) problems.

It was found that some of the environmental options in the "env-parameters.sh" were not picked up in certain places of "build-accull.sh" and "accull" and caused linking problems.

Two notable edits were made:
One which replaced a environmental variable with hard-coded values for the particular OpenCL system (line 44 in "accull"),
It used {AMDOCLDIR}/lib/ when it could have used LD_LIBRARY_PATH created in the "env-parameters.sh" file.
(yes it might need some manipulation to properly insert -L after each directory... but importing a variable of some-sort might be nice here.)
The other edited the final compilation by gcc to read the .c files instead of the .o files.
I don't understand why the last edit (.o => .c) would make a difference under OpenCL vs CUDA, but it was the solution that was found after some googling:
http://stackoverflow.com/questions/20323842/compile-build-opencl-program-using-amd-app-sdk-on-linux

The details of the step by step OpenCL setup and configuration used, along with the necessary script edits is in the pastie:
http://pastie.org/9344816

It is also noted that while the compiled "example" folder code worked, it compiled with warnings.
However when compiling directly with the command:
gcc -I/opt/AMDAPP/include -L/opt/AMDAPP/lib/x86_64 pi.acc.c -lOpenCL
there was no such problem (and the program ran just the same).

(I will post a reply with the warnings because I forgot to copy them.. and I am on different machine at the moment.)

Other usage notes on the v0.4 update:
The interactive improvements in the v0.4 build script were nice, thank you:)
The rest of the test programs were not completed yet... It seems other edits may be needed since they didn't even though the "example" folder's pi generator program was working.

Thanks for the great effort!
Brett

Jose Lucas Grillo Lorenzo

unread,
Jul 3, 2014, 5:30:19 AM7/3/14
to acc...@googlegroups.com
Hi Brett,

Many thanks for your feedback and your suggestions! Although accull v0.4 has not been releaset yet, we are happy to have users testing the code in the meantime.

We are still working on improvements, and v0.4 will incorporate deep changes in both frangollo and yacf modules, affecting the reduction clause.

We'll make the announcement of the next release when all the tests are passing, so that users can rely on a working compiler.
 
Thank you again for your feedback: It is really appreciated.

Sincerely,

     J. Lucas Grillo


--

compown...@gmail.com

unread,
Jul 3, 2014, 5:29:41 PM7/3/14
to acc...@googlegroups.com
Just in case it helps anyone I found a typo in the previous pastie...
It should be instead:
from: FLAGS=$FLAGS" -L${AMDOCLDIR}/lib/ -lOpenCL -lrt -lm"
to:   FLAGS=$FLAGS" -L$/opt/AMDAPP/lib/x86_64 -lOpenCL -lrt -lm"
NOTE: the ${AMDOCLDIR} variable was note working here!! (so replaced with hard-coded value)

And if it is helpful, here is the (OpenCL configured) output and warnings from the 0.3.1 and 0.4 versions when pi.acc.c is compiled (0.3.1 and 0.4 was freshly re-downloaded before posting):

0.3.1: http://pastie.org/9351598
0.4:    http://pastie.org/9351603

Brett
Reply all
Reply to author
Forward
0 new messages