[Pw_forum] question about compiling espresso-4.3.2-GPU

Filippo Spiga spiga.filippo at gmail.com
Sun Jul 15 07:17:17 CEST 2012


Dear Chengyang Li,

I thought a bit  and there is a way to workaround the ISO_C_BINDING dependency. The ISO_C_BINDING dependency is mainly related to pinned memory allocations. Most of the time I suggest to do not turn on pinned allocations because, despite better data transfer between GPU and CPU,  the overall calculation usually slow down.

So, I managed to remove all the ISO_C_BINDING dependencies in the code where __CUDA_PINNED is not defined. This workaround also exclude  MAGMA because in order to efficiently use it some data structure has to be pinned (so the code need ISO_C_BINDING so you need to upgrade GFORTRAN). Since you are using GPU with compute capability 1.3, in the README.GPU I already suggested to disable MAGMA on cc1.3.

I rebuild the package for you (build8_alpha). The new code is here:
http://www.fislab.disco.unimib.it/~filippo/qe-builds/espresso-5.0-GPU-build8_alpha.tar.gz

Please You can try to compile this build in this way
$ ./configure --enable-phigemm --disable-magma --prefix=/opt/qe432 --enable-parallel --enable-cuda --with-cuda-dir=/opt/cuda --with-gpu-arch=13 --enable-openmp

I did a test on a workstation and it failed. It failed because GFORTRAN 4.1 is not able to compile a file called sum_band.f90 (standard CPU code, no GPU code inside it). This is the version:
$ gfortran -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)


I suggest you to upgrade GCC/GFORTRAn to 4.4 (not  version 4.5 because GNU 4.5 are not compatible with CUDA 4.0 or 4.1). Since you do not have Intel MKL library, instead of using the internal BLAS/LAPACK you can use GotoBLAS. The compilation of GotoBLAS is very easy and it supports multi-threading (by define GOTO_NUM_THREADS=XXX). Moreover phiGEMM and MAGMA are compatible with it. You can find the source code here:
http://www.fislab.disco.unimib.it/~filippo/qe-builds/GotoBLAS2-1.13.tar.gz
or here:
http://www.tacc.utexas.edu/tacc-projects/gotoblas2/

Hope this help. I look forward to receiving a feedback from you.

Cheers
F

On Jul 14, 2012, at 10:41 PM, Filippo Spiga wrote:
> Dear Chengyang Li,
> 
> the problem that I can see is the GFORTRAN version. GFORTRAN 4.1 does not have iso_c_binding extensions (as far as I know, I will double-check this). So you need a newer version of GCC/GFORTRAN and I suggest you the GCC 4.4. There is no way to workaround this issue, you should upgrade your GNU compilers. However, think about to compile the code using Intel compiler (if available).  Moreover I do not understand why you want to link FFTW in that way (especially the library with MPI support). If OpenMP is enable, leave the code to use its internal FFTW library. 
> 
> I see you want to target GPU with (only) compute capability 1.3. What kind of GPU system do you have?
> 
> There is a specific ML for the GPU stuff. I monitor constantly that one instead of this general one that is more related to the entire QE. The address is  q-e-gpgpu at qe-forge.org and you can subscribe directly here: http://qe-forge.org/mailman/listinfo/q-e-gpgpu
> 
> Regards,
> Filippo

-- 
Mr. Filippo SPIGA (穗安駒), HPC and GPU Technologist <spiga.filippo_at_gmail.com>
website: http://filippospiga.me  ~  skype: filippo.spiga

«Nobody will drive us out of Cantor's paradise.» ~ David Hilbert

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20120715/467823f0/attachment.html>


More information about the users mailing list