driver_cuda.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2009, 2010, 2011-2012 Université de Bordeaux 1
  4. * Copyright (C) 2010 Mehdi Juhoor <mjuhoor@gmail.com>
  5. * Copyright (C) 2010, 2011, 2012 Centre National de la Recherche Scientifique
  6. * Copyright (C) 2011 Télécom-SudParis
  7. * Copyright (C) 2011, 2012 INRIA
  8. *
  9. * StarPU is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU Lesser General Public License as published by
  11. * the Free Software Foundation; either version 2.1 of the License, or (at
  12. * your option) any later version.
  13. *
  14. * StarPU is distributed in the hope that it will be useful, but
  15. * WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  17. *
  18. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  19. */
  20. #include <starpu.h>
  21. #include <starpu_cuda.h>
  22. #include <starpu_profiling.h>
  23. #include <common/utils.h>
  24. #include <common/config.h>
  25. #include <core/debug.h>
  26. #include <core/sched_ctx.h>
  27. #include <drivers/driver_common/driver_common.h>
  28. #include "driver_cuda.h"
  29. #include <core/sched_policy.h>
  30. #ifdef HAVE_CUDA_GL_INTEROP_H
  31. #include <cuda_gl_interop.h>
  32. #endif
  33. /* the number of CUDA devices */
  34. static int ncudagpus;
  35. static cudaStream_t streams[STARPU_NMAXWORKERS];
  36. static cudaStream_t transfer_streams[STARPU_NMAXWORKERS];
  37. static struct cudaDeviceProp props[STARPU_MAXCUDADEVS];
  38. /* In case we want to cap the amount of memory available on the GPUs by the
  39. * mean of the STARPU_LIMIT_GPU_MEM, we allocate a big buffer when the driver
  40. * is launched. */
  41. static char *wasted_memory[STARPU_NMAXWORKERS];
  42. static void limit_gpu_mem_if_needed(int devid)
  43. {
  44. cudaError_t cures;
  45. int limit = starpu_get_env_number("STARPU_LIMIT_GPU_MEM");
  46. if (limit == -1)
  47. {
  48. wasted_memory[devid] = NULL;
  49. return;
  50. }
  51. /* Find the size of the memory on the device */
  52. size_t totalGlobalMem = props[devid].totalGlobalMem;
  53. /* How much memory to waste ? */
  54. size_t to_waste = totalGlobalMem - (size_t)limit*1024*1024;
  55. props[devid].totalGlobalMem -= to_waste;
  56. _STARPU_DEBUG("CUDA device %d: Wasting %ld MB / Limit %ld MB / Total %ld MB / Remains %ld MB\n",
  57. devid, (size_t)to_waste/(1024*1024), (size_t)limit, (size_t)totalGlobalMem/(1024*1024),
  58. (size_t)(totalGlobalMem - to_waste)/(1024*1024));
  59. /* Allocate a large buffer to waste memory and constraint the amount of available memory. */
  60. cures = cudaMalloc((void **)&wasted_memory[devid], to_waste);
  61. if (STARPU_UNLIKELY(cures))
  62. STARPU_CUDA_REPORT_ERROR(cures);
  63. }
  64. static void unlimit_gpu_mem_if_needed(int devid)
  65. {
  66. cudaError_t cures;
  67. if (wasted_memory[devid])
  68. {
  69. cures = cudaFree(wasted_memory[devid]);
  70. if (STARPU_UNLIKELY(cures))
  71. STARPU_CUDA_REPORT_ERROR(cures);
  72. wasted_memory[devid] = NULL;
  73. }
  74. }
  75. size_t starpu_cuda_get_global_mem_size(int devid)
  76. {
  77. return (size_t)props[devid].totalGlobalMem;
  78. }
  79. cudaStream_t starpu_cuda_get_local_transfer_stream(void)
  80. {
  81. int worker = starpu_worker_get_id();
  82. return transfer_streams[worker];
  83. }
  84. cudaStream_t starpu_cuda_get_local_stream(void)
  85. {
  86. int worker = starpu_worker_get_id();
  87. return streams[worker];
  88. }
  89. const struct cudaDeviceProp *starpu_cuda_get_device_properties(unsigned workerid)
  90. {
  91. struct _starpu_machine_config *config = _starpu_get_machine_config();
  92. unsigned devid = config->workers[workerid].devid;
  93. return &props[devid];
  94. }
  95. void starpu_cuda_set_device(int devid)
  96. {
  97. cudaError_t cures;
  98. struct starpu_conf *conf = _starpu_get_machine_config()->conf;
  99. #if !defined(HAVE_CUDA_MEMCPY_PEER) && defined(HAVE_CUDA_GL_INTEROP_H)
  100. unsigned i;
  101. #endif
  102. #ifdef HAVE_CUDA_MEMCPY_PEER
  103. if (conf->n_cuda_opengl_interoperability) {
  104. fprintf(stderr, "OpenGL interoperability was requested, but StarPU was built with multithread GPU control support, please reconfigure with --disable-cuda-memcpy-peer but that will disable the memcpy-peer optimizations\n");
  105. STARPU_ABORT();
  106. }
  107. #elif !defined(HAVE_CUDA_GL_INTEROP_H)
  108. if (conf->n_cuda_opengl_interoperability) {
  109. fprintf(stderr,"OpenGL interoperability was requested, but cuda_gl_interop.h could not be compiled, please make sure that OpenGL headers were available before ./configure run.");
  110. STARPU_ABORT();
  111. }
  112. #else
  113. for (i = 0; i < conf->n_cuda_opengl_interoperability; i++)
  114. if (conf->cuda_opengl_interoperability[i] == devid) {
  115. cures = cudaGLSetGLDevice(devid);
  116. goto done;
  117. }
  118. #endif
  119. cures = cudaSetDevice(devid);
  120. #if !defined(HAVE_CUDA_MEMCPY_PEER) && defined(HAVE_CUDA_GL_INTEROP_H)
  121. done:
  122. #endif
  123. if (STARPU_UNLIKELY(cures))
  124. STARPU_CUDA_REPORT_ERROR(cures);
  125. }
  126. static void init_context(int devid)
  127. {
  128. cudaError_t cures;
  129. int workerid;
  130. starpu_cuda_set_device(devid);
  131. #ifdef HAVE_CUDA_MEMCPY_PEER
  132. int nworkers = starpu_worker_get_count();
  133. for (workerid = 0; workerid < nworkers; workerid++) {
  134. struct _starpu_worker *worker = _starpu_get_worker_struct(workerid);
  135. if (worker->arch == STARPU_CUDA_WORKER && worker->devid != devid) {
  136. int can;
  137. cures = cudaDeviceCanAccessPeer(&can, devid, worker->devid);
  138. if (!cures && can) {
  139. cures = cudaDeviceEnablePeerAccess(worker->devid, 0);
  140. if (cures)
  141. _STARPU_DEBUG("GPU-Direct %d -> %d\n", worker->devid, devid);
  142. }
  143. }
  144. }
  145. #endif
  146. /* force CUDA to initialize the context for real */
  147. cures = cudaFree(0);
  148. if (STARPU_UNLIKELY(cures)) {
  149. if (cures == cudaErrorDevicesUnavailable) {
  150. fprintf(stderr,"All CUDA-capable devices are busy or unavailable\n");
  151. exit(77);
  152. }
  153. STARPU_CUDA_REPORT_ERROR(cures);
  154. }
  155. cures = cudaGetDeviceProperties(&props[devid], devid);
  156. if (STARPU_UNLIKELY(cures))
  157. STARPU_CUDA_REPORT_ERROR(cures);
  158. #ifdef HAVE_CUDA_MEMCPY_PEER
  159. if (props[devid].computeMode == cudaComputeModeExclusive) {
  160. fprintf(stderr, "CUDA is in EXCLUSIVE-THREAD mode, but StarPU was built with multithread GPU control support, please either ask your administrator to use EXCLUSIVE-PROCESS mode (which should really be fine), or reconfigure with --disable-cuda-memcpy-peer but that will disable the memcpy-peer optimizations\n");
  161. STARPU_ASSERT(0);
  162. }
  163. #endif
  164. limit_gpu_mem_if_needed(devid);
  165. workerid = starpu_worker_get_id();
  166. cures = cudaStreamCreate(&streams[workerid]);
  167. if (STARPU_UNLIKELY(cures))
  168. STARPU_CUDA_REPORT_ERROR(cures);
  169. cures = cudaStreamCreate(&transfer_streams[workerid]);
  170. if (STARPU_UNLIKELY(cures))
  171. STARPU_CUDA_REPORT_ERROR(cures);
  172. }
  173. static void deinit_context(int workerid, int devid)
  174. {
  175. cudaError_t cures;
  176. cudaStreamDestroy(streams[workerid]);
  177. cudaStreamDestroy(transfer_streams[workerid]);
  178. unlimit_gpu_mem_if_needed(devid);
  179. /* cleanup the runtime API internal stuffs (which CUBLAS is using) */
  180. cures = cudaThreadExit();
  181. if (cures)
  182. STARPU_CUDA_REPORT_ERROR(cures);
  183. }
  184. /* Return the number of devices usable in the system.
  185. * The value returned cannot be greater than MAXCUDADEVS */
  186. unsigned _starpu_get_cuda_device_count(void)
  187. {
  188. int cnt;
  189. cudaError_t cures;
  190. cures = cudaGetDeviceCount(&cnt);
  191. if (STARPU_UNLIKELY(cures))
  192. return 0;
  193. if (cnt > STARPU_MAXCUDADEVS)
  194. {
  195. fprintf(stderr, "# Warning: %d CUDA devices available. Only %d enabled. Use configure option --enable-maxcudadev=xxx to update the maximum value of supported CUDA devices.\n", cnt, STARPU_MAXCUDADEVS);
  196. cnt = STARPU_MAXCUDADEVS;
  197. }
  198. return (unsigned)cnt;
  199. }
  200. void _starpu_init_cuda(void)
  201. {
  202. ncudagpus = _starpu_get_cuda_device_count();
  203. STARPU_ASSERT(ncudagpus <= STARPU_MAXCUDADEVS);
  204. }
  205. static int execute_job_on_cuda(struct _starpu_job *j, struct _starpu_worker *args)
  206. {
  207. int ret;
  208. uint32_t mask = 0;
  209. cudaError_t cures;
  210. STARPU_ASSERT(j);
  211. struct starpu_task *task = j->task;
  212. struct timespec codelet_start, codelet_end;
  213. int profiling = starpu_profiling_status_get();
  214. unsigned calibrate_model = 0;
  215. STARPU_ASSERT(task);
  216. struct starpu_codelet *cl = task->cl;
  217. STARPU_ASSERT(cl);
  218. if (cl->model && cl->model->benchmarking)
  219. calibrate_model = 1;
  220. ret = _starpu_fetch_task_input(j, mask);
  221. if (ret != 0)
  222. {
  223. /* there was not enough memory, so the input of
  224. * the codelet cannot be fetched ... put the
  225. * codelet back, and try it later */
  226. return -EAGAIN;
  227. }
  228. if (calibrate_model)
  229. {
  230. cures = cudaStreamSynchronize(starpu_cuda_get_local_transfer_stream());
  231. if (STARPU_UNLIKELY(cures))
  232. STARPU_CUDA_REPORT_ERROR(cures);
  233. }
  234. _starpu_driver_start_job(args, j, &codelet_start, 0, profiling);
  235. #ifdef HAVE_CUDA_MEMCPY_PEER
  236. /* We make sure we do manipulate the proper device */
  237. starpu_cuda_set_device(args->devid);
  238. #endif
  239. starpu_cuda_func_t func = _starpu_task_get_cuda_nth_implementation(cl, j->nimpl);
  240. STARPU_ASSERT(func);
  241. func(task->interfaces, task->cl_arg);
  242. _starpu_driver_end_job(args, j, args->perf_arch, &codelet_end, 0, profiling);
  243. _starpu_driver_update_job_feedback(j, args, args->perf_arch, &codelet_start, &codelet_end, profiling);
  244. _starpu_push_task_output(j, mask);
  245. return 0;
  246. }
  247. static struct _starpu_worker*
  248. _starpu_get_worker_from_driver(struct starpu_driver *d)
  249. {
  250. unsigned nworkers = starpu_worker_get_count();
  251. unsigned workerid;
  252. for (workerid = 0; workerid < nworkers; workerid++)
  253. {
  254. if (starpu_worker_get_type(workerid) == d->type)
  255. {
  256. struct _starpu_worker *worker;
  257. worker = _starpu_get_worker_struct(workerid);
  258. if (worker->devid == d->id.cuda_id)
  259. return worker;
  260. }
  261. }
  262. return NULL;
  263. }
  264. /* XXX Should this be merged with _starpu_init_cuda ? */
  265. int _starpu_cuda_driver_init(struct starpu_driver *d)
  266. {
  267. struct _starpu_worker* args = _starpu_get_worker_from_driver(d);
  268. STARPU_ASSERT(args);
  269. int devid = args->devid;
  270. unsigned memory_node = args->memory_node;
  271. #ifdef STARPU_USE_FXT
  272. _starpu_fxt_register_thread(args->bindid);
  273. #endif
  274. _STARPU_TRACE_WORKER_INIT_START(_STARPU_FUT_CUDA_KEY, devid, memory_node);
  275. _starpu_bind_thread_on_cpu(args->config, args->bindid);
  276. _starpu_set_local_memory_node_key(&args->memory_node);
  277. _starpu_set_local_worker_key(args);
  278. init_context(devid);
  279. /* one more time to avoid hacks from third party lib :) */
  280. _starpu_bind_thread_on_cpu(args->config, args->bindid);
  281. args->status = STATUS_UNKNOWN;
  282. /* get the device's name */
  283. char devname[128];
  284. strncpy(devname, props[devid].name, 128);
  285. float size = (float) props[devid].totalGlobalMem / (1<<30);
  286. #ifdef STARPU_HAVE_BUSID
  287. #ifdef STARPU_HAVE_DOMAINID
  288. if (props[devid].pciDomainID)
  289. snprintf(args->name, sizeof(args->name), "CUDA %d (%s %.1f GiB %04x:%02x:%02x.0)", args->devid, devname, size, props[devid].pciDomainID, props[devid].pciBusID, props[devid].pciDeviceID);
  290. else
  291. #endif
  292. snprintf(args->name, sizeof(args->name), "CUDA %d (%s %.1f GiB %02x:%02x.0)", args->devid, devname, size, props[devid].pciBusID, props[devid].pciDeviceID);
  293. #else
  294. snprintf(args->name, sizeof(args->name), "CUDA %d (%s %.1f GiB)", args->devid, devname, size);
  295. #endif
  296. snprintf(args->short_name, sizeof(args->short_name), "CUDA %d", args->devid);
  297. _STARPU_DEBUG("cuda (%s) dev id %d thread is ready to run on CPU %d !\n", devname, devid, args->bindid);
  298. _STARPU_TRACE_WORKER_INIT_END
  299. /* tell the main thread that this one is ready */
  300. _STARPU_PTHREAD_MUTEX_LOCK(&args->mutex);
  301. args->worker_is_initialized = 1;
  302. _STARPU_PTHREAD_COND_SIGNAL(&args->ready_cond);
  303. _STARPU_PTHREAD_MUTEX_UNLOCK(&args->mutex);
  304. return 0;
  305. }
  306. int _starpu_cuda_driver_run_once(struct starpu_driver *d)
  307. {
  308. struct _starpu_worker* args = _starpu_get_worker_from_driver(d);
  309. STARPU_ASSERT(args);
  310. unsigned memnode = args->memory_node;
  311. int workerid = args->workerid;
  312. struct timespec start_time, end_time;
  313. unsigned idle = 0;
  314. _STARPU_TRACE_START_PROGRESS(memnode);
  315. _starpu_datawizard_progress(memnode, 1);
  316. _STARPU_TRACE_END_PROGRESS(memnode);
  317. pthread_cond_t *sched_cond = &args->sched_cond;
  318. pthread_mutex_t *sched_mutex = &args->sched_mutex;
  319. struct starpu_task *task = _starpu_pop_task(args);
  320. struct _starpu_job *j = NULL;
  321. if (task == NULL)
  322. {
  323. _STARPU_PTHREAD_MUTEX_LOCK(sched_mutex);
  324. if (_starpu_worker_can_block(memnode))
  325. _starpu_block_worker(workerid, sched_cond, sched_mutex);
  326. else
  327. {
  328. _starpu_clock_gettime(&start_time);
  329. _starpu_worker_register_sleeping_start_date(workerid, &start_time);
  330. idle = 1;
  331. }
  332. _STARPU_PTHREAD_MUTEX_UNLOCK(sched_mutex);
  333. return 0;
  334. }
  335. if(idle)
  336. {
  337. _starpu_clock_gettime(&end_time);
  338. int profiling = starpu_profiling_status_get();
  339. if (profiling)
  340. {
  341. struct timespec sleeping_time;
  342. starpu_timespec_sub(&end_time, &start_time, &sleeping_time);
  343. _starpu_worker_update_profiling_info_sleeping(workerid, &start_time, &end_time);
  344. }
  345. idle = 0;
  346. }
  347. STARPU_ASSERT(task);
  348. j = _starpu_get_job_associated_to_task(task);
  349. /* can CUDA do that task ? */
  350. if (!_STARPU_CUDA_MAY_PERFORM(j))
  351. {
  352. /* this is neither a cuda or a cublas task */
  353. _starpu_push_task(j);
  354. return 0;
  355. }
  356. _starpu_set_current_task(task);
  357. args->current_task = j->task;
  358. int res = execute_job_on_cuda(j, args);
  359. _starpu_set_current_task(NULL);
  360. args->current_task = NULL;
  361. if (res)
  362. {
  363. switch (res)
  364. {
  365. case -EAGAIN:
  366. _STARPU_DISP("ouch, put the codelet %p back ... \n", j);
  367. _starpu_push_task(j);
  368. STARPU_ABORT();
  369. default:
  370. STARPU_ABORT();
  371. }
  372. }
  373. _starpu_handle_job_termination(j, workerid);
  374. return 0;
  375. }
  376. int _starpu_cuda_driver_deinit(struct starpu_driver *d)
  377. {
  378. struct _starpu_worker* args = _starpu_get_worker_from_driver(d);
  379. STARPU_ASSERT(args);
  380. unsigned memnode = args->memory_node;
  381. _STARPU_TRACE_WORKER_DEINIT_START
  382. _starpu_handle_all_pending_node_data_requests(memnode);
  383. /* In case there remains some memory that was automatically
  384. * allocated by StarPU, we release it now. Note that data
  385. * coherency is not maintained anymore at that point ! */
  386. _starpu_free_all_automatically_allocated_buffers(memnode);
  387. deinit_context(args->workerid, args->devid);
  388. _STARPU_TRACE_WORKER_DEINIT_END(_STARPU_FUT_CUDA_KEY);
  389. return 0;
  390. }
  391. void *_starpu_cuda_worker(void *arg)
  392. {
  393. struct _starpu_worker* args = arg;
  394. struct starpu_driver d = {
  395. .type = STARPU_CUDA_WORKER,
  396. .id.cuda_id = args->devid
  397. };
  398. _starpu_cuda_driver_init(&d);
  399. while (_starpu_machine_is_running())
  400. _starpu_cuda_driver_run_once(&d);
  401. _starpu_cuda_driver_deinit(&d);
  402. return NULL;
  403. }
  404. void starpu_cublas_report_error(const char *func, const char *file, int line, cublasStatus status)
  405. {
  406. char *errormsg;
  407. switch (status)
  408. {
  409. case CUBLAS_STATUS_SUCCESS:
  410. errormsg = "success";
  411. break;
  412. case CUBLAS_STATUS_NOT_INITIALIZED:
  413. errormsg = "not initialized";
  414. break;
  415. case CUBLAS_STATUS_ALLOC_FAILED:
  416. errormsg = "alloc failed";
  417. break;
  418. case CUBLAS_STATUS_INVALID_VALUE:
  419. errormsg = "invalid value";
  420. break;
  421. case CUBLAS_STATUS_ARCH_MISMATCH:
  422. errormsg = "arch mismatch";
  423. break;
  424. case CUBLAS_STATUS_EXECUTION_FAILED:
  425. errormsg = "execution failed";
  426. break;
  427. case CUBLAS_STATUS_INTERNAL_ERROR:
  428. errormsg = "internal error";
  429. break;
  430. default:
  431. errormsg = "unknown error";
  432. break;
  433. }
  434. fprintf(stderr, "oops in %s (%s:%u)... %d: %s \n", func, file, line, status, errormsg);
  435. STARPU_ASSERT(0);
  436. }
  437. void starpu_cuda_report_error(const char *func, const char *file, int line, cudaError_t status)
  438. {
  439. const char *errormsg = cudaGetErrorString(status);
  440. printf("oops in %s (%s:%u)... %d: %s \n", func, file, line, status, errormsg);
  441. STARPU_ASSERT(0);
  442. }
  443. int starpu_cuda_copy_async_sync(void *src_ptr, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *dst_ptr, unsigned dst_node STARPU_ATTRIBUTE_UNUSED, size_t ssize, cudaStream_t stream, enum cudaMemcpyKind kind)
  444. {
  445. cudaError_t cures = 0;
  446. if (stream)
  447. {
  448. _STARPU_TRACE_START_DRIVER_COPY_ASYNC(src_node, dst_node);
  449. cures = cudaMemcpyAsync((char *)dst_ptr, (char *)src_ptr, ssize, kind, stream);
  450. _STARPU_TRACE_END_DRIVER_COPY_ASYNC(src_node, dst_node);
  451. }
  452. /* Test if the asynchronous copy has failed or if the caller only asked for a synchronous copy */
  453. if (stream == NULL || cures)
  454. {
  455. /* do it in a synchronous fashion */
  456. cures = cudaMemcpy((char *)dst_ptr, (char *)src_ptr, ssize, kind);
  457. if (STARPU_UNLIKELY(cures))
  458. STARPU_CUDA_REPORT_ERROR(cures);
  459. return 0;
  460. }
  461. return -EAGAIN;
  462. }
  463. int _starpu_run_cuda(struct starpu_driver *d)
  464. {
  465. STARPU_ASSERT(d && d->type == STARPU_CUDA_WORKER);
  466. int workers[d->id.cuda_id + 1];
  467. int nworkers;
  468. nworkers = starpu_worker_get_ids_by_type(STARPU_CUDA_WORKER, workers, d->id.cuda_id+1);
  469. if (nworkers >= 0 && (unsigned) nworkers < d->id.cuda_id)
  470. return -ENODEV;
  471. _STARPU_DEBUG("Running cuda %d from the application\n", d->id.cuda_id);
  472. struct _starpu_worker *workerarg = _starpu_get_worker_struct(workers[d->id.cuda_id]);
  473. workerarg->set = NULL;
  474. workerarg->worker_is_initialized = 0;
  475. /* Let's go ! */
  476. _starpu_cuda_worker(workerarg);
  477. /* XXX: Should we wait for the driver to be ready, as it is done when
  478. * launching it the usual way ? Cf. the end of _starpu_launch_drivers()
  479. */
  480. return 0;
  481. }