<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:14px"><div class="" style="">Dear all,</div><div class="" style="">compiling BLAS with -fPIC (as shared library by modifying "make.inc" <span style="font-size: 13px;">"</span><span style="font-size: 13px;">OPTS = -shared -O2 -fPIC"</span>) resulted in successful compilation of QE-GPU without any errors. It was an exciting experience.</div><div class="" style=""><span style="background-color: transparent;" class=""><br class="" style=""></span></div><div style="color: rgb(0, 0, 0); font-size: 14px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><span style="background-color: transparent;" class="">Additionally I had to give nvcc binding to g++ in .bashrc, (alias nvcc='nvcc -ccbin=/usr/bin/g++')
 without this it was giving error:"-ccbin not found"  I think these issues may be system specific, may depend on OS and CUDA.</span><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 14px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><span style="background-color: transparent;" class=""><br class="" style=""></span></div><div style="color: rgb(0, 0, 0); font-size: 14px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><span style="background-color: transparent;" class="">Thanking you</span></div><div style="color: rgb(0, 0, 0); font-size: 14px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><span
 style="background-color: transparent;" class=""><br class="" style=""></span></div><div style="color: rgb(0, 0, 0); font-size: 14px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><span style="background-color: transparent;" class="">with respectful regards</span></div><div style="color: rgb(0, 0, 0); font-size: 14px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><span style="background-color: transparent;" class=""><br class="" style=""></span></div><div style="color: rgb(0, 0, 0); font-size: 14px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><span style="background-color: transparent;" class="">Janardhan H L</span></div> <div
 class="" style="">Poornaprajna Institute of Scientific Research<br class="" style="">Bagalore, India<br class="" style="">www.ppisr.res.in</div><div class="" style=""><br class="" style=""></div><div class="" style=""><br class="" style=""><br class="" style=""></div><div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 14px;" class=""> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 12pt;" class=""> <div dir="ltr" class="" style=""> <font size="2" face="Arial" class="" style=""> On Wednesday, 24 September 2014 8:25 AM, janardhan H.L. <janardhanhl@yahoo.com> wrote:<br class="" style=""> </font> </div>  <br class="" style=""><br class="" style=""> <div class="" style=""><div id="yiv1445952213" class="" style=""><div class="" style=""><div
 style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:14px;" class=""><div style="" class="" id="yiv1445952213"><div style="" class=""><div class="" style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:14px;"><div style="" class="" id="yiv1445952213"><div style="" class="" id="yiv1445952213yui_3_16_0_1_1411525035400_19588"><div id="yiv1445952213yui_3_16_0_1_1411525035400_19587" class="" style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:14px;"><div style="" class="" id="yiv1445952213"><div style="" class="" id="yiv1445952213yui_3_16_0_1_1411525035400_15850"><div id="yiv1445952213yui_3_16_0_1_1411525035400_15849" class="" style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue,
 Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:14px;">Dear respected,<br style="" class=""><br style="" class="">I have experinced the same problem while compiling QE-GPU.<br style="" class=""><font style="" class="" size="1">cc -O3 -fopenmp -fPIC -z muldefs -shared -o libphigemm.so.2.0 phigemm_auxiliary.o phigemm_env.o phigemm_dgemm.o phigemm_zgemm.o phigemm_dgemm_specialK.o phigemm_zgemm_specialK.o phigemm_cgemm.o phigemm_sgemm.o -L/usr/local/cuda/lib64 -lcublas  -lcufft -lcudart /home/mool/espresso-GPU/GPU/..//phiGEMM/lib/libphigemm.a  /home/mool/espresso-GPU/GPU/..//BLAS/blas.a -L/usr/local/cuda/lib64 -lcublas  -lcufft -lcudart <br style="" class="">/usr/bin/ld: /home/mool/espresso-GPU/GPU/..//BLAS/blas.a(sgemm.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC<br style="" class="">/home/mool/espresso-GPU/GPU/..//BLAS/blas.a: error adding symbols: Bad value<br style=""
 class="">collect2: error: ld returned 1 exit status<br style="" class="">make[3]: *** [shared] Error 1<br style="" class="">make[3]: Leaving directory `/home/mool/espresso-GPU/phiGEMM/src'<br style="" class="">make[2]: *** [phigemm] Error 2<br style="" class="">make[2]: Leaving directory `/home/mool/espresso-GPU/phiGEMM'<br style="" class="">make[1]: *** [libphiGEMM] Error 2<br style="" class="">make[1]: Leaving directory `/home/mool/espresso-GPU/GPU/install'<br style="" class="">make: *** [libphiGEMM] Error 2</font><br style="" class=""><br style="" class=""> My system variables
 are as follows<br style="" class="">intel xenon processors with Tesla C1060 / M1060, OS: Ubuntu 14.04, gnu compiliers are of V4.8.2 , Cuda compilation tools are, release 6.5, V6.5.12, QE 5.1, QE-GPU 14.06<br style="" class=""><br style="" class=""> I have tried with "./configure --with-fPIC" but it didnt help. As I am interested to compile GPU version of QE can you please share how to compile BLAS with -fPIC. What does -fPIC mean?<br style="" class=""><br style="" class="">thak you for your kind support <br style="" class=""><br style="" class="">with respectful regards <br class="" style=""><br class="" style="">Janardhan H L<br class="" style="">Poornaprajna Institute of Scientific Research<br class="" style="">Bagalore, India<br class="" style="">www.ppisr.res.in<br style="" class=""><br style="" class=""><div style="" class="" id="yiv1445952213"><div style="" class=""><div class=""
 style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:14px;"><div style="" class="" id="yiv1445952213"><div style="" class=""><div class="" style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:14px;"><div style="" class="" id="yiv1445952213"><div style="" class=""><div class="" style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:14px;"><div style="" class="" id="yiv1445952213yui_3_16_0_1_1411525035400_2892"></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br class="" style=""><br class="" style=""></div>  </div> </div>  </div> </div></body></html>