cuda problem

option, parallelism,...

Moderators: fgoudreault, mcote

Forum rules
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Locked
xecle
Posts: 11
Joined: Mon Mar 08, 2010 6:54 am
Location: Hangzhou , China

cuda problem

Post by xecle » Mon Mar 08, 2010 7:21 am

I compiled the abinit-6.0.2 on my computer with cuda , but there is something wrong about cuda .

config :
configure --prefix=/home/xecle --with-mpi-prefix=/home/xelce/mpich --enable-cuda=yes

make errors:

Code: Select all

make[3]: Leaving directory `/home/xecle/abinit-6.0.2/src/50_abitypes_defs'
Making all in 51_manage_cuda
make[3]: Entering directory `/home/xecle/abinit-6.0.2/src/51_manage_cuda'
I../../src/incs -I../../src/incs   -c dev_spec.cu
make[3]: I../../src/incs: Command not found
make[3]: [dev_spec.o] Error 127 (ignored)
/home/xecle/mpich/bin/mpif90 -DHAVE_CONFIG_H -I. -I../.. -I../../src/incs -I../../src/incs   -ffree-form -J/home/xecle/abinit-6.0.2/src/mods -O2 -g  -ffree-line-length-none  -c -o m_initcuda.o m_initcuda.F90
I../../src/incs -I../../src/incs   -c prt_utils_rec.cu
make[3]: I../../src/incs: Command not found
make[3]: [prt_utils_rec.o] Error 127 (ignored)
I../../src/incs -I../../src/incs   -c rec_dens_calc.cu
make[3]: I../../src/incs: Command not found
make[3]: [rec_dens_calc.o] Error 127 (ignored)
I../../src/incs -I../../src/incs   -c cuda_rec.cu
make[3]: I../../src/incs: Command not found
make[3]: [cuda_rec.o] Error 127 (ignored)
/home/xecle/mpich/bin/mpif90 -DHAVE_CONFIG_H -I. -I../.. -I../../src/incs -I../../src/incs   -ffree-form -J/home/xecle/abinit-6.0.2/src/mods -O2 -g  -ffree-line-length-none  -c -o interfaces_51_manage_cuda.o interfaces_51_manage_cuda.F90
rm -f lib51_manage_cuda.a
ar rc lib51_manage_cuda.a dev_spec.o m_initcuda.o prt_utils_rec.o rec_dens_calc.o cuda_rec.o interfaces_51_manage_cuda.o
ar: dev_spec.o: No such file or directory
make[3]: *** [lib51_manage_cuda.a] Error 1
make[3]: Leaving directory `/home/xecle/abinit-6.0.2/src/51_manage_cuda'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/xecle/abinit-6.0.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/xecle/abinit-6.0.2'
make: *** [all] Error 2


I had installed cudadriver-2.3 and cudatookit-2.3 on my computer . the display card of my computer is Quadro NVS 290 ,supporting cuda .

I can't fnd anything with google. so who can tell me what happend ?

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: cuda problem

Post by pouillon » Mon Mar 08, 2010 1:42 pm

Cuda support in Abinit is highly experimental and not yet functional. You should wait a few more months before trying it, at least.

Thank you in advance for your patience.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

xecle
Posts: 11
Joined: Mon Mar 08, 2010 6:54 am
Location: Hangzhou , China

Re: cuda problem

Post by xecle » Mon Mar 08, 2010 2:18 pm

Is there anyone had compiled abinit rightly with cuda ?

mancini
Posts: 40
Joined: Mon Nov 09, 2009 10:56 am

Re: cuda problem

Post by mancini » Tue Mar 09, 2010 9:21 am

Hi xecle,
As Pouillon said compiling Abinit with cuda is hightly experimental and specially in your version (abinit-6.0.2).
It works for now only with recursion method (see the ducumentation).
In this version, to compile you have to give explicitely your cuda path and flags.
I attach here a prototype of configuration file:


configurecuda.ac:

# Config file for ABINIT
# =====================================
FC="mpif90"
CC="gcc"
CPP="cpp"
CUDA_ROOT="/yourcudalocation" #ex. /usr/cuda
CUDA_SDK_ROOT="/yourSDKcudalocation" #ex. /usr/local/cuda/SDK
#note that depending on you cuda version, the location of the SDK varies: for exemple in cuda2.3 and later you have to put
#/usr/local/cuda/SDK/C/
NVCC="$CUDA_ROOT/bin/nvcc"
PWDloc=`echo $PWD`

FCFLAGS="-O2"
NVCC_CFLAGS="-O2 -arch sm_13 --use_fast_math \
--compiler-options -O3,-Wall,-fPIC,-g \
-I${CUDA_SDK_ROOT}/common/inc \
-I${CUDA_ROOT}/include \
-I${PWDloc}/../src/incs"



# Fortran optimization flags
# ==========================
with_fc_optflags="-O2 -m64 -ffree-line-length-none -fPIC"
with_cc_optflags="-m64 -msse2 -msse3 -mfpmath=sse -I/usr/include/python2.4 -O3"
enable_optim="yes"


with_cc_ld_optlibs=""
with_fc_ld_optlibs=""


enable_cuda="yes"
enable_mpi="yes"
#with_mpi_level="1"
#enable_mpi_io="yes"

with_cuda_libs="-L${CUDA_ROOT}/lib -lcufft -lcudart -lcublas"
with_cuda_includes="-I${CUDA_ROOT}/include -I${CUDA_SDK_ROOT}/common/inc"
#depending on your architecture your lib directory is: ${CUDA_ROOT}/lib or ${CUDA_ROOT}/lib64

#I don't use plugins to develop
enable_libxc="no"
enable_macroave="no"
enable_wannier90="no"
enable_bigdft="no"
enable_netcdf="no"
enable_etsf_io="no"
#with_plugins_tardir=/cea/home/abinit/abinit/PLUGINS/AbinitV6.0

# OPTIONAL ARGUMENTS:
# -------------------
#With MKL library:
#enable_linalg="yes"
#with_linalg_libs="-L/cea/home/abinit/abinit/UTILS/Intel/11.1/mkl/lib/em64t -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread"


# With GotoBlas library:
# with_linalg_libs="-L/cea/home/abinit/abinit/UTILS/GotoBLAS -lblas -lgoto"

# For use with debugger:
# enable_fc_wrapper="yes"
# enable_debug="no"

In your build directory you have to run :
sh ../configure --with-config-file=configurecuda.ac

good luck

marco
Marco Mancini

LUTH, Observatoire de Paris
5, place Jules Janssen
92190 MEUDON - FRANCE

xecle
Posts: 11
Joined: Mon Mar 08, 2010 6:54 am
Location: Hangzhou , China

Re: cuda problem

Post by xecle » Sun Mar 21, 2010 2:14 am

mancini wrote:Hi xecle,
As Pouillon said compiling Abinit with cuda is hightly experimental and specially in your version (abinit-6.0.2).
It works for now only with recursion method (see the ducumentation).
In this version, to compile you have to give explicitely your cuda path and flags.
I attach here a prototype of configuration file:


configurecuda.ac:

# Config file for ABINIT
# =====================================
FC="mpif90"
CC="gcc"
CPP="cpp"
CUDA_ROOT="/yourcudalocation" #ex. /usr/cuda
CUDA_SDK_ROOT="/yourSDKcudalocation" #ex. /usr/local/cuda/SDK
#note that depending on you cuda version, the location of the SDK varies: for exemple in cuda2.3 and later you have to put
#/usr/local/cuda/SDK/C/
NVCC="$CUDA_ROOT/bin/nvcc"
PWDloc=`echo $PWD`

FCFLAGS="-O2"
NVCC_CFLAGS="-O2 -arch sm_13 --use_fast_math \
--compiler-options -O3,-Wall,-fPIC,-g \
-I${CUDA_SDK_ROOT}/common/inc \
-I${CUDA_ROOT}/include \
-I${PWDloc}/../src/incs"



# Fortran optimization flags
# ==========================
with_fc_optflags="-O2 -m64 -ffree-line-length-none -fPIC"
with_cc_optflags="-m64 -msse2 -msse3 -mfpmath=sse -I/usr/include/python2.4 -O3"
enable_optim="yes"


with_cc_ld_optlibs=""
with_fc_ld_optlibs=""


enable_cuda="yes"
enable_mpi="yes"
#with_mpi_level="1"
#enable_mpi_io="yes"

with_cuda_libs="-L${CUDA_ROOT}/lib -lcufft -lcudart -lcublas"
with_cuda_includes="-I${CUDA_ROOT}/include -I${CUDA_SDK_ROOT}/common/inc"
#depending on your architecture your lib directory is: ${CUDA_ROOT}/lib or ${CUDA_ROOT}/lib64

#I don't use plugins to develop
enable_libxc="no"
enable_macroave="no"
enable_wannier90="no"
enable_bigdft="no"
enable_netcdf="no"
enable_etsf_io="no"
#with_plugins_tardir=/cea/home/abinit/abinit/PLUGINS/AbinitV6.0

# OPTIONAL ARGUMENTS:
# -------------------
#With MKL library:
#enable_linalg="yes"
#with_linalg_libs="-L/cea/home/abinit/abinit/UTILS/Intel/11.1/mkl/lib/em64t -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread"


# With GotoBlas library:
# with_linalg_libs="-L/cea/home/abinit/abinit/UTILS/GotoBLAS -lblas -lgoto"

# For use with debugger:
# enable_fc_wrapper="yes"
# enable_debug="no"

In your build directory you have to run :
sh ../configure --with-config-file=configurecuda.ac

good luck

marco


hi mancini,
thanks for your answers , but I'm not sure whether it's necessary to post so many paragrams to the config script.
I installed all the library code in the default path , so the config script could find them automaticly . And I can't understand what does the optimization flags do .so I use the default flags.
I wil use the ac file you gived to compiler again .

xecle
Posts: 11
Joined: Mon Mar 08, 2010 6:54 am
Location: Hangzhou , China

Re: cuda problem

Post by xecle » Sun Mar 21, 2010 4:03 pm

hi mancini,
I compiled the abinit-6.0.2 again , and posted all the paragrams about cuda to the config script , but I failed again.

the configurecuda.ac :

Code: Select all

#Config file for ABINIT
# =====================================
#FC="mpif90"
#CC="gcc"
#CPP="cpp"
CUDA_ROOT="/usr/local/cuda"
CUDA_SDK_ROOT="/home/xecle/NVIDIA_GPU_Computing_SDK/C"
#note that depending on you cuda version, the location of the SDK varies: for exemple in cuda2.3 and later you have to put
#/usr/local/cuda/SDK/C/
NVCC="$CUDA_ROOT/bin/nvcc"
PWDloc=`echo $PWD`

FCFLAGS="-O2"
NVCC_CFLAGS="-O2 -arch sm_10 --use_fast_math \
--compiler-options -O3,-Wall,-fPIC,-g \
-I${CUDA_SDK_ROOT}/common/inc \
-I${CUDA_ROOT}/include \
-I${PWDloc}/../src/incs"

# Fortran optimization flags
# ==========================
#with_fc_optflags="-O2 -m64 -ffree-line-length-none -fPIC"
#with_cc_optflags="-m64 -msse2 -msse3 -mfpmath=sse -I/usr/include/python2.4 -O3"
#enable_optim="yes"

#with_cc_ld_optlibs=""
#with_fc_ld_optlibs=""
enable_cuda="yes"
enable_mpi="yes"
#with_mpi_level="1"
enable_mpi_io="yes"
with_cuda_libs="-L${CUDA_ROOT}/lib -lcufft -lcudart -lcublas"
with_cuda_includes="-I${CUDA_ROOT}/include -I${CUDA_SDK_ROOT}/common/inc"


the error message :
/usr/local/cuda/bin/nvcc -I../../src/incs -I../../src/incs -O2 -arch sm_10 --use_fast_math --compiler-options -O3,-Wall,-fPIC,-g -I/home/xecle/NVIDIA_GPU_Computing_SDK/C/common/inc -I/usr/local/cuda/include -I/home/xecle/abinit-6.0.2/../src/incs -c dev_spec.cu
dev_spec.cu(19): warning: function "prt_dev_info" was declared but never referenced

dev_spec.cu(19): warning: function "prt_dev_info" was declared but never referenced

/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = char]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:100: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = signed char]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:111: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = unsigned char]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:118: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = char1]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:125: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = uchar1]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:132: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = char2]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:139: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = uchar2]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:146: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = char4]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:153: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = uchar4]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:160: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = short int]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:167: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = short unsigned int]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:174: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = short1]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:181: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = ushort1]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:188: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = short2]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:195: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = ushort2]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:202: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = short4]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:209: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = ushort4]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:216: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = int]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:223: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = unsigned int]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:230: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = int1]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:237: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = uint1]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:244: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = int2]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:251: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = uint2]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:258: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = int4]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:265: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = uint4]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:272: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = float]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:339: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = float1]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:346: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = float2]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:353: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/channel_descriptor.h: In function ‘cudaChannelFormatDesc cudaCreateChannelDesc() [with T = float4]’:
/usr/local/cuda/bin/../include/channel_descriptor.h:360: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/driver_functions.h: In function ‘cudaPitchedPtr make_cudaPitchedPtr(void*, size_t, size_t, size_t)’:
/usr/local/cuda/bin/../include/driver_functions.h:56: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/driver_functions.h: In function ‘cudaPos make_cudaPos(size_t, size_t, size_t)’:
/usr/local/cuda/bin/../include/driver_functions.h:68: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/driver_functions.h: In function ‘cudaExtent make_cudaExtent(size_t, size_t, size_t)’:
/usr/local/cuda/bin/../include/driver_functions.h:79: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘char1 make_char1(signed char)’:
/usr/local/cuda/bin/../include/vector_functions.h:56: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘uchar1 make_uchar1(unsigned char)’:
/usr/local/cuda/bin/../include/vector_functions.h:61: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘char2 make_char2(signed char, signed char)’:
/usr/local/cuda/bin/../include/vector_functions.h:66: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘uchar2 make_uchar2(unsigned char, unsigned char)’:
/usr/local/cuda/bin/../include/vector_functions.h:71: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘char3 make_char3(signed char, signed char, signed char)’:
/usr/local/cuda/bin/../include/vector_functions.h:76: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘uchar3 make_uchar3(unsigned char, unsigned char, unsigned char)’:
/usr/local/cuda/bin/../include/vector_functions.h:81: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘char4 make_char4(signed char, signed char, signed char, signed char)’:
/usr/local/cuda/bin/../include/vector_functions.h:86: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘uchar4 make_uchar4(unsigned char, unsigned char, unsigned char, unsigned char)’:
/usr/local/cuda/bin/../include/vector_functions.h:91: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘short1 make_short1(short int)’:
/usr/local/cuda/bin/../include/vector_functions.h:96: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘ushort1 make_ushort1(short unsigned int)’:
/usr/local/cuda/bin/../include/vector_functions.h:101: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘short2 make_short2(short int, short int)’:
/usr/local/cuda/bin/../include/vector_functions.h:106: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘ushort2 make_ushort2(short unsigned int, short unsigned int)’:
/usr/local/cuda/bin/../include/vector_functions.h:111: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘short3 make_short3(short int, short int, short int)’:
/usr/local/cuda/bin/../include/vector_functions.h:116: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘ushort3 make_ushort3(short unsigned int, short unsigned int, short unsigned int)’:
/usr/local/cuda/bin/../include/vector_functions.h:121: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘short4 make_short4(short int, short int, short int, short int)’:
/usr/local/cuda/bin/../include/vector_functions.h:126: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘ushort4 make_ushort4(short unsigned int, short unsigned int, short unsigned int, short unsigned int)’:
/usr/local/cuda/bin/../include/vector_functions.h:131: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘int1 make_int1(int)’:
/usr/local/cuda/bin/../include/vector_functions.h:136: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘uint1 make_uint1(unsigned int)’:
/usr/local/cuda/bin/../include/vector_functions.h:141: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘int2 make_int2(int, int)’:
/usr/local/cuda/bin/../include/vector_functions.h:146: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘uint2 make_uint2(unsigned int, unsigned int)’:
/usr/local/cuda/bin/../include/vector_functions.h:151: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘int3 make_int3(int, int, int)’:
/usr/local/cuda/bin/../include/vector_functions.h:156: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘uint3 make_uint3(unsigned int, unsigned int, unsigned int)’:
/usr/local/cuda/bin/../include/vector_functions.h:161: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘int4 make_int4(int, int, int, int)’:
/usr/local/cuda/bin/../include/vector_functions.h:166: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘uint4 make_uint4(unsigned int, unsigned int, unsigned int, unsigned int)’:
/usr/local/cuda/bin/../include/vector_functions.h:171: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘long1 make_long1(long int)’:
/usr/local/cuda/bin/../include/vector_functions.h:176: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘ulong1 make_ulong1(long unsigned int)’:
/usr/local/cuda/bin/../include/vector_functions.h:181: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘long2 make_long2(long int, long int)’:
/usr/local/cuda/bin/../include/vector_functions.h:186: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘ulong2 make_ulong2(long unsigned int, long unsigned int)’:
/usr/local/cuda/bin/../include/vector_functions.h:191: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘float1 make_float1(float)’:
/usr/local/cuda/bin/../include/vector_functions.h:220: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘float2 make_float2(float, float)’:
/usr/local/cuda/bin/../include/vector_functions.h:225: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘float3 make_float3(float, float, float)’:
/usr/local/cuda/bin/../include/vector_functions.h:230: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘float4 make_float4(float, float, float, float)’:
/usr/local/cuda/bin/../include/vector_functions.h:235: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘longlong1 make_longlong1(long long int)’:
/usr/local/cuda/bin/../include/vector_functions.h:240: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘ulonglong1 make_ulonglong1(long long unsigned int)’:
/usr/local/cuda/bin/../include/vector_functions.h:245: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘longlong2 make_longlong2(long long int, long long int)’:
/usr/local/cuda/bin/../include/vector_functions.h:250: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘ulonglong2 make_ulonglong2(long long unsigned int, long long unsigned int)’:
/usr/local/cuda/bin/../include/vector_functions.h:255: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘double1 make_double1(double)’:
/usr/local/cuda/bin/../include/vector_functions.h:260: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/vector_functions.h: In function ‘double2 make_double2(double, double)’:
/usr/local/cuda/bin/../include/vector_functions.h:265: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/math_functions.h: At global scope:
/usr/local/cuda/bin/../include/math_functions.h:412: error: inline function ‘int __signbit(double)’ cannot be declared weak
/usr/local/cuda/bin/../include/math_functions.h:417: error: inline function ‘int __signbitf(float)’ cannot be declared weak
/usr/include/bits/mathcalls.h:350: error: inline function ‘int __signbit(double)’ cannot be declared weak
/usr/include/bits/mathcalls.h:350: error: inline function ‘int __signbitf(float)’ cannot be declared weak
/usr/include/bits/mathcalls.h:350: error: inline function ‘int __signbitl(long double)’ cannot be declared weak
/usr/include/bits/mathinline.h:36: error: inline function ‘int __signbitf(float)’ cannot be declared weak
/usr/include/bits/mathinline.h:42: error: inline function ‘int __signbit(double)’ cannot be declared weak
/usr/include/bits/mathinline.h:48: error: inline function ‘int __signbitl(long double)’ cannot be declared weak

/usr/local/cuda/bin/../include/math_functions.h:442: error: inline function ‘int __signbitl(long double)’ cannot be declared weak

/usr/local/cuda/bin/../include/cuda_runtime.h: In function ‘cudaError_t cudaBindTextureToArray(const texture<T, dim, readMode>&, const cudaArray*)’:
/usr/local/cuda/bin/../include/cuda_runtime.h:588: warning: ‘auto’ will change meaning in C++0x; please remove it
/usr/local/cuda/bin/../include/cuda_runtime.h:589: warning: ‘auto’ will change meaning in C++0x; please remove it
dev_spec.cu: In function ‘void prt_dev_info()’:
dev_spec.cu:21: warning: ‘auto’ will change meaning in C++0x; please remove it
dev_spec.cu:25: warning: ‘auto’ will change meaning in C++0x; please remove it
dev_spec.cu: In function ‘int get_ndev_dev()’:
dev_spec.cu:54: warning: ‘auto’ will change meaning in C++0x; please remove it
dev_spec.cu: In function ‘float get_max_mem_dev(int)’:
dev_spec.cu:62: warning: ‘auto’ will change meaning in C++0x; please remove it
dev_spec.cu:64: warning: ‘auto’ will change meaning in C++0x; please remove it
dev_spec.cu: In function ‘int emul_dev(int)’:
dev_spec.cu:71: warning: ‘auto’ will change meaning in C++0x; please remove it
dev_spec.cu:73: warning: ‘auto’ will change meaning in C++0x; please remove it
dev_spec.cu: In function ‘int set_dev(int)’:
dev_spec.cu:81: warning: ‘auto’ will change meaning in C++0x; please remove it
dev_spec.cu:82: warning: ‘auto’ will change meaning in C++0x; please remove it
dev_spec.cu: In function ‘void get_gpu_ndevice_(int*)’:
dev_spec.cu:117: warning: ‘auto’ will change meaning in C++0x; please remove it
dev_spec.cu: In function ‘void get_gpu_max_mem_(int*, float*)’:
dev_spec.cu:127: warning: ‘auto’ will change meaning in C++0x; please remove it
dev_spec.cu: In function ‘void emulation_dev_(int*, int*)’:
dev_spec.cu:136: warning: ‘auto’ will change meaning in C++0x; please remove it
dev_spec.cu: In function ‘void get_dev_info_(int*, char*, int*, int*, float*, float*, int*, int*, int*, int*)’:
dev_spec.cu:171: warning: ‘auto’ will change meaning in C++0x; please remove it
In file included from dev_spec.cu:186:
dev_spec.cu: At global scope:
dev_spec.cu:19: warning: ‘void prt_dev_info()’ defined but not used
make[3]: *** [dev_spec.o] Error 255
make[3]: Leaving directory `/home/xecle/abinit-6.0.2/src/51_manage_cuda'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/xecle/abinit-6.0.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/xecle/abinit-6.0.2'
make: *** [all] Error 2


I can't understand why these errors happened . Is it the version difference of the gcc I used to compile the cuda and the kernel that caused these errors?
what's more , could you give me your email address to contact you ?

mancini
Posts: 40
Joined: Mon Nov 09, 2009 10:56 am

Re: cuda problem

Post by mancini » Sun Mar 21, 2010 7:37 pm

Hi,
yes I think that your problem could be matter of gcc version, but I'm not sure, I never had such as errors.
CUDA does not support gcc-4.4, so in this case you have to install gcc-4.3 and to make a symbolic link to it.
(you can see here http://moelhave.dk/2009/12/nvidia-cuda- ... mic-koala/).
I realised that you would use ABINIT+CUDA on your laptop.
I don't know if will work.
The way as RECURSION with CUDA is coded, it makes intensive use of graphic card so normally you need 2 graphic card:
the first for normal display and the second one for calculation.
This is because the most of the calculation is made on the GPU, avoid copy and trasfert of data between CPU and GPU
but this give a problem when the card is used also for display.

Courteously,
Marco
Marco Mancini

LUTH, Observatoire de Paris
5, place Jules Janssen
92190 MEUDON - FRANCE

xecle
Posts: 11
Joined: Mon Mar 08, 2010 6:54 am
Location: Hangzhou , China

Re: cuda problem

Post by xecle » Mon Mar 22, 2010 2:28 am

hi mancini,
thanks for your answers .
I compile the ABINIT+CUDA on my desktop . the graphics card is nVidia Corporation G86 [Quadro NVS 290] . it also has a Onboard graphics card .
I found a solution on google to comment out the error line in the include file (math_functions.h) and pass these errors .

but some new errors :
Making all in 51_manage_cuda
make[3]: Entering directory `/home/xecle/abinit-6.0.2/src/51_manage_cuda'
/usr/local/cuda/bin/nvcc -I../../src/incs -I../../src/incs -O2 -arch sm_13 --use_fast_math --compiler-options -O3,-Wall,-fPIC,-g -I/home/xecle/NVIDIA_GPU_Computing_SDK/C/common/inc -I/usr/local/cuda/include -I/home/xecle/abinit-6.0.2/../src/incs -c prt_utils_rec.cu
prt_utils_rec.cu:13:25: error: cuda_header.h: No such file or directory
prt_utils_rec.cu:14:27: error: cuda_rec_head.h: No such file or directory
/usr/local/cuda/bin/nvcc -I../../src/incs -I../../src/incs -O2 -arch sm_13 --use_fast_math --compiler-options -O3,-Wall,-fPIC,-g -I/home/xecle/NVIDIA_GPU_Computing_SDK/C/common/inc -I/usr/local/cuda/include -I/home/xecle/abinit-6.0.2/../src/incs -c rec_dens_calc.cu
rec_dens_calc.cu:21:27: error: cuda_rec_head.h: No such file or directory
/usr/local/cuda/bin/nvcc -I../../src/incs -I../../src/incs -O2 -arch sm_13 --use_fast_math --compiler-options -O3,-Wall,-fPIC,-g -I/home/xecle/NVIDIA_GPU_Computing_SDK/C/common/inc -I/usr/local/cuda/include -I/home/xecle/abinit-6.0.2/../src/incs -c cuda_rec.cu
cuda_rec.cu:13:25: error: cuda_header.h: No such file or directory
cuda_rec.cu:14:27: error: cuda_rec_head.h: No such file or directory
rm -f lib51_manage_cuda.a
ar rc lib51_manage_cuda.a dev_spec.o m_initcuda.o prt_utils_rec.o rec_dens_calc.o cuda_rec.o interfaces_51_manage_cuda.o
ar: prt_utils_rec.o: No such file or directory
make[3]: *** [lib51_manage_cuda.a] Error 1
make[3]: Leaving directory `/home/xecle/abinit-6.0.2/src/51_manage_cuda'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/xecle/abinit-6.0.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/xecle/abinit-6.0.2'
make: *** [all] Error 2


Could you list the compiling enviroment and the hardware you used for me ?

xecle
Posts: 11
Joined: Mon Mar 08, 2010 6:54 am
Location: Hangzhou , China

Re: cuda problem

Post by xecle » Thu Mar 25, 2010 4:33 pm

some files to mancini.
Attachments
tT.in
.in file
(1.43 KiB) Downloaded 507 times
T4.log
log file
(45.49 KiB) Downloaded 460 times
tT4.out
output file
(35.35 KiB) Downloaded 438 times

xecle
Posts: 11
Joined: Mon Mar 08, 2010 6:54 am
Location: Hangzhou , China

Re: cuda problem

Post by xecle » Thu Mar 25, 2010 4:44 pm

3 more files to mancini.
Attachments
tT-2.in
(1.43 KiB) Downloaded 460 times
T4-2.log
(44.59 KiB) Downloaded 462 times
tT4-2.out
(35.47 KiB) Downloaded 459 times

mancini
Posts: 40
Joined: Mon Nov 09, 2009 10:56 am

Re: cuda problem

Post by mancini » Thu Mar 25, 2010 5:13 pm

ok,
You was running RECURSION using CUDA.
1) In your version many parameters of recursion are not permitted with CUDA.
2) In the second test you put ngfft 3*8 which is very small and in that version is possible to have some bug in this case.
in more recent versions ngfft have to be >16 to use CUDA (below this value you don't have any speed-up with cuda)
bye
marco
Marco Mancini

LUTH, Observatoire de Paris
5, place Jules Janssen
92190 MEUDON - FRANCE

xecle
Posts: 11
Joined: Mon Mar 08, 2010 6:54 am
Location: Hangzhou , China

Re: cuda problem

Post by xecle » Fri Mar 26, 2010 6:48 am

thanks .

c00jsh00
Posts: 5
Joined: Wed Apr 21, 2010 6:56 am

Re: cuda problem

Post by c00jsh00 » Thu Apr 22, 2010 3:04 am

Hi,

I just tried to compile abinit-6.0.3 with cuda 3.0 and 2.3, and I got the following
error message during the compilation of 51_manage_cuda:
/opt/cuda/bin/nvcc -I../../../src/incs -I/opt/cuda/include -I/opt/cuda/sdk/C/common/inc -g -O3 -c ../../../src/51_manage_cuda/prt_utils_rec.cu
../../../src/51_manage_cuda/prt_utils_rec.cu:13:25: error: cuda_header.h: No such file or directory
../../../src/51_manage_cuda/prt_utils_rec.cu:14:27: error: cuda_rec_head.h: No such file or directory
make[3]: *** [prt_utils_rec.o] Error 1
make[3]: Leaving directory `/pkg/chem/workdir/abinit-6.0.1/tmp/src/51_manage_cuda'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/pkg/chem/workdir/abinit-6.0.1/tmp/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/pkg/chem/workdir/abinit-6.0.1/tmp'
make: *** [all] Error 2

Both files cuda_header.h and cuda_rec_head.h are missing, did I forget something?


Jyh-Shyong Ho

mancini
Posts: 40
Joined: Mon Nov 09, 2009 10:56 am

Re: cuda problem

Post by mancini » Thu Apr 22, 2010 9:53 am

Hi xecle,
I see your out,log,in files.
In the last series you used ngfft 3*14
it is not a good choice because ABINIT changes this value automatically to 8
(reading the log file this is because the third dimension of ngfft, so 14, has to be a multiple of npfft).
So for ngfft 3*8 the spatial grid is very coarse and you results are incorrect.

I ran your test using ngfft 3*16 with the last version (in development) of abinit 6.12.
In this version I put a little test which permits to decide (in parallel) is to run on gpu or not.
This is useful when you have small ngfft grid, in fact for sizes of the grid there is not advantage to use GPU
with respect to CPU.
Furthermore this test permits to change the work load on the different CPU-GPU. So if the test find that GPU calculation is
10 times faster than CPU then the load will be rebalanced to have the 10 times of work on GPU.

I also enable devices with capability >1.0. In fact for these tests I used my laptop (GTX260M).
How you will see, the test T4-16_4proc.log does not use GPU for calculation. This is because the test was negative and ABINIT decided
to work on CPU only.

I do not put here the out file of T4-16_4proc.log because of the file limit on the blog but you have all on the log file.
bye Marco
Attachments
tT4-16.out
ngfft=16 test cuda on 1proc LOG
(33.7 KiB) Downloaded 486 times
T4-16.log
ngfft=16 test cuda on 1proc OUT
(53.44 KiB) Downloaded 486 times
T4-16_4proc.log
ngfft=16 test cuda on 4proc GPU is not used LOG
(53.39 KiB) Downloaded 509 times
Marco Mancini

LUTH, Observatoire de Paris
5, place Jules Janssen
92190 MEUDON - FRANCE

mancini
Posts: 40
Joined: Mon Nov 09, 2009 10:56 am

Re: cuda problem

Post by mancini » Thu Apr 22, 2010 11:27 am

Hi Jyh-Shyong Ho,

Effectively in abinit-6.0.3.tar.gz these header files are missing.
Here the two files which you have to put in ~/abinitdir/src/51_manage_cuda/
by
Marco

/* cuda_header.h */

/*
* Copyright (C) 2008-2010 ABINIT Group (MMancini)
*
* This file is part of the ABINIT software package. For license information,
* please see the COPYING file in the top-level directory of the ABINIT source
* distribution.
*
*/

#ifndef CUDA_HEADER_H
#define CUDA_HEADER_H



#include <cublas.h>
#include <time.h>
#include <cutil.h>
#include <stdlib.h>
#include <unistd.h>
#include <cufft.h>
#include "cuda_common.h"


#ifdef HAVE_CUDA_DP
typedef double cureal;
typedef cufftDoubleComplex cucmplx;
#else
typedef float cureal;
typedef cufftComplex cucmplx;
#define rsqrt(a) rsqrtf(a)
#endif

typedef unsigned int uint;


#endif


/* cuda_rec_head.h */

/*
* Copyright (C) 2008-2010 ABINIT Group (MMancini)
*
* This file is part of the ABINIT software package. For license information,
* please see the COPYING file in the top-level directory of the ABINIT source
* distribution.
*
*/

#ifndef CUDA_REC_HEAD_H
#define CUDA_REC_HEAD_H

#include "cuda_header.h"





#ifdef DBG_CUDA_TM
#define DEBUGLEN 8
#define CUTIMESTART(a) CUT_SAFE_CALL( cutStartTimer(a) )
#define CUTIMESTOP(a) CUT_SAFE_CALL( cutStopTimer(a) )
#define CUDA_SAFE_CALL(a) a
#define CUFFT_SAFE_CALL(a) a

#else
#define DEBUGLEN 0
#define CUDA_SAFE_CALL(a) a
#define CUFFT_SAFE_CALL(a) a
#define CUT_SAFE_CALL(a) a
#define CUTIMESTART(a) CUT_SAFE_CALL( cutStartTimer(a) )
#define CUTIMESTOP(a) CUT_SAFE_CALL( cutStopTimer(a) )
#define cutGetTimerValue(a) 0
#define cutStopTimer(a)
#define cutStartTimer(a)
#define cutDeleteTimer(a)
#define cutCreateTimer(a)
#define cutDeleteTimer(a)
#define cutDeleteTimer(a)

#endif


//Setted tollerance for recursion
#ifdef HAVE_CUDA_DP
#define CUDA_TOL 1.e-12
#else
#define CUDA_TOL 1.e-07
#endif

#define BLOCK_X 256 // CUDA block sizes

#define IMUL(a, b) __mul24(a, b)



//interfaces
void prt_dbg_arr(cureal* v_h,cureal* v_d,size_t size,int num,int pos,char bo[20]);
void prt_mem_use(size_t un_pitch,size_t hauteur,size_t size );
void prt_device_timing(unsigned int timer, unsigned int timerFFT,cureal allocat_time, unsigned int* deb_timer);
float get_max_mem_dev(int device);
cucmplx mul(cucmplx a,cucmplx b );
cucmplx add(cucmplx a,cucmplx b );
cucmplx div(cucmplx a,cucmplx b );
void density_calc(const cureal betafermie,const cureal mult,const cureal tolrec,
const int irec, const int trotter, const int ntrache,
const int loctranc,
const int delta_coor, int *contrec,
cureal* bn2_irec, cureal* an_irec, cureal* erreur, cureal* prod_b2,
cucmplx* acc_rho, cucmplx* ND, cucmplx* NDold,
cucmplx* NDnew);

void check_err( );
#endif
Marco Mancini

LUTH, Observatoire de Paris
5, place Jules Janssen
92190 MEUDON - FRANCE

c00jsh00
Posts: 5
Joined: Wed Apr 21, 2010 6:56 am

Re: cuda problem

Post by c00jsh00 » Fri Apr 23, 2010 4:21 am

Thanks, I included these two header files and tried again, here is the new error message:
...
/opt/cuda/bin/nvcc -I../../src/incs -I../../../src/incs -I/opt/cuda/include -I/opt/cuda/sdk/C/common/inc -g -O3 -arch sm_13 --use_fast_math --compiler-options -O3,-Wall,-fPIC -c ../../../src/51_manage_cuda/rec_dens_calc.cu
../../../src/51_manage_cuda/rec_dens_calc.cu(44): warning: function "sub" was declared but never referenced

../../../src/51_manage_cuda/rec_dens_calc.cu(61): warning: function "scal" was declared but never referenced

../../../src/51_manage_cuda/rec_dens_calc.cu(44): warning: function "sub" was declared but never referenced

../../../src/51_manage_cuda/rec_dens_calc.cu(61): warning: function "scal" was declared but never referenced

../../../src/51_manage_cuda/rec_dens_calc.cu: In function ‘cucmplx mul(cucmplx, cucmplx)’:
../../../src/51_manage_cuda/rec_dens_calc.cu:28: error: ‘cucmplx mul(cucmplx, cucmplx)’ was declared ‘extern’ and later ‘static’
../../../src/51_manage_cuda/cuda_rec_head.h:64: error: previous declaration of ‘cucmplx mul(cucmplx, cucmplx)’
../../../src/51_manage_cuda/rec_dens_calc.cu: In function ‘cucmplx add(cucmplx, cucmplx)’:
../../../src/51_manage_cuda/rec_dens_calc.cu:36: error: ‘cucmplx add(cucmplx, cucmplx)’ was declared ‘extern’ and later ‘static’
../../../src/51_manage_cuda/cuda_rec_head.h:65: error: previous declaration of ‘cucmplx add(cucmplx, cucmplx)’
../../../src/51_manage_cuda/rec_dens_calc.cu: In function ‘cucmplx div(cucmplx, cucmplx)’:
../../../src/51_manage_cuda/rec_dens_calc.cu:52: error: ‘cucmplx div(cucmplx, cucmplx)’ was declared ‘extern’ and later ‘static’
../../../src/51_manage_cuda/cuda_rec_head.h:66: error: previous declaration of ‘cucmplx div(cucmplx, cucmplx)’
../../../src/51_manage_cuda/rec_dens_calc.cu: In function ‘void density_calc(cureal, cureal, cureal, int, int, int, int, int, int*, cureal*, cureal*, cureal*, cureal*, cucmplx*, cucmplx*, cucmplx*, cucmplx*)’:
../../../src/51_manage_cuda/rec_dens_calc.cu:92: warning: division by zero in ‘1.0e+0 / 0.’
make[3]: *** [rec_dens_calc.o] Error 1
make[3]: Leaving directory `/pkg/chem/workdir/abinit-6.0.3/tmp/src/51_manage_cuda'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/pkg/chem/workdir/abinit-6.0.3/tmp/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/pkg/chem/workdir/abinit-6.0.3/tmp'
make: *** [all] Error 2

Jyh-Shyong Ho

c00jsh00
Posts: 5
Joined: Wed Apr 21, 2010 6:56 am

Re: cuda problem

Post by c00jsh00 » Fri Apr 23, 2010 6:29 am

Sorry, please discard my previous message. After changing the compiler to gfortran/gcc/g++, the compilation is now completed without error message.

Jyh-Shyong Ho

xecle
Posts: 11
Joined: Mon Mar 08, 2010 6:54 am
Location: Hangzhou , China

Re: cuda problem

Post by xecle » Sat Apr 24, 2010 7:47 am

Hi , mancini,
Thanks for your news, but I can do nothing about this any more.
I don't have a GPU cluster , and the GPU cluster I used to finished the previous work was borrowed .
I'm sorry to tell you that I can't test this .

xecle

c00jsh00
Posts: 5
Joined: Wed Apr 21, 2010 6:56 am

Re: cuda problem

Post by c00jsh00 » Sat Apr 24, 2010 11:03 am

Hi Mancini,

We have a GPU cluster, and I just built abinit-6.0.3 with mpi and cuda enabled. Would you please provide me an input file for testing?
Some nodes of our GPU cluster have 2 C1070 Tesla cards, others have 4, and all are connected with infiniband interconnects.

Where is the input file should I specify the number of GPUs on each node to use? Thank you.

Jyh-Shyong Ho

mancini
Posts: 40
Joined: Mon Nov 09, 2009 10:56 am

Re: cuda problem

Post by mancini » Sat Apr 24, 2010 2:32 pm

Hi Jyh-Shyong Ho,

I recently tested 6.1.2 (which the development version) on a 192 tesla cluster and it works fine.
Cuda in version 6.0.3 is very experimental so I'm not sure of the stability in a GPU cluster.
In particular in this version:
1- there is not work load balancing (which is not a problem if "number of gpu"="number of cpu").
2- the cuda kernel are not optimized
But I think that also with version 6.0.3 you can have good speed-up.
ask me if you have problems.
Here a simple input file to test:
to have some advantages with GPU you should increase the ngfft parameter:
(24,36,48,....)
for the other parameters you can see http://www.abinit.org/documentation/helpfiles/for-v6.0/input_variables/keyhr.html
bye,

Marco


acell 3*7.128759292410183 #compression 4
ngfft 3*24 #need to be defined for recursion
tsmear 3.1668297
mditemp 1000000
recptrott 10 #trotter parameter
occopt 3
enunit 2 #All units on output
nline 5 #defaut +1
nstep 1 #only an iteration, no self consistent cycle (for test GPU)

timopt -1 #time analysis (debugging option)
prtvol -7
#recursion variables

ecut 5 #no ecut needed
nsym 1 #no symetries for recursion method
chkprim 0 #need a cubic cell (not primitive)
boxcutmin 1.0d0 #link between ecut <> ngfft
nkpt 1 #recursion doesn't work with more
toldfe 1.e-20 #not the exit criteria for recursion

tfkinfunc 2 #recursion method
recgratio 1 #grid ratio for double grid
recnrec 10 #maximum recursion order
recnpath 100 #discretisation path integral
rectolden 1.0d-2 #convergence criterium for the density

# recrcut 2.d0 #Truncation radius (net used in the test)
# recefermi #initial guess for fermi energy

#ions
znucl 2
natom 4 #cubic cell for recursion method
typat 4*1

rprim #cubic cell for recursion method for 4 ions
1 0 0
0 1 0
0 0 1

xred #CFC for 4 ions
3*0.0d0
0.5 0.5 0.0
0.5 0.0 0.5
0.0 0.5 0.5

kptopt 0



#Parallelization variables
wfoptalg 4
nloalg 4
fftalg 401
iprcch 0
intxc 0
istwfk 1
fft_opt_lob 2
paral_kgb 1

#molecular dynamic
ionmov 12
dtion 50
#ntime 2


#more paralellization variables
nband 8 (2*ncpu)
npband 4 (number of cpu)
npfft 1
npkpt 1
# accesswff 0 # Only for testing purposes
Marco Mancini

LUTH, Observatoire de Paris
5, place Jules Janssen
92190 MEUDON - FRANCE

c00jsh00
Posts: 5
Joined: Wed Apr 21, 2010 6:56 am

Re: cuda problem

Post by c00jsh00 » Sun Apr 25, 2010 1:28 am

Hi Mancini,

Thanks, I'll try it.
When will the version 6.1.2 or the production version 6.2.0 be available?

Jyh-Shyong Ho

mancini
Posts: 40
Joined: Mon Nov 09, 2009 10:56 am

Re: cuda problem

Post by mancini » Sun Apr 25, 2010 8:45 am

Hi Jyh-Shyong Ho,
I have no idea, (a month ?).
As I told you, a little practice wit 6.0.3 will be very useful.
bye Marco
Marco Mancini

LUTH, Observatoire de Paris
5, place Jules Janssen
92190 MEUDON - FRANCE

gonze
Posts: 412
Joined: Fri Aug 14, 2009 8:29 pm

Re: cuda problem

Post by gonze » Mon Apr 26, 2010 5:06 pm


mancini
Posts: 40
Joined: Mon Nov 09, 2009 10:56 am

Re: cuda problem

Post by mancini » Mon Apr 26, 2010 5:23 pm

Marco Mancini

LUTH, Observatoire de Paris
5, place Jules Janssen
92190 MEUDON - FRANCE

Locked