It occurred when I did not wait GPU process finishes.
#include <stdio.h>
#include <cuda_runtime.h>
__global__
void my_kernel(int val, int *A, int N)
{
int i = threadIdx.x;
#!/usr/bin/env bash | |
PROGNAME=$(basename $0) | |
function usage() { | |
echo "Usage: $PROGNAME [-c MAX_RETRY] [-s INTERVAL_SEC] -- COMMAND" 1>&2 | |
echo " Retry a command if failed" 1>&2 | |
echo "" 1>&2 | |
echo "Options:" 1>&2 | |
echo " -h, --help Show this message" 1>&2 |
It occurred when I did not wait GPU process finishes.
#include <stdio.h>
#include <cuda_runtime.h>
__global__
void my_kernel(int val, int *A, int N)
{
int i = threadIdx.x;
メモリ使用量が増え続ける
最初の山: ruby 2.1.1 + fluentd v0.10.43 + cool.io v1.1.1 + msgpack v0.5.8 # ruby バージョンアップして、他の gem は安定稼働している本番と同じにした(同じ Gemfile.lock を使った)
2つ目の山: ruby 2.1.1 + fluentd v0.10.43 + cool.io v1.1.1 + msgpack v0.5.5 => 安定したかと一瞬思ったが "can't modify frozen String" 例外が出て何も処理できていなかっただけっぽい. v0.5.6 で修正された https://github.com/msgpack/msgpack-ruby/blob/master/ChangeLog
3つ目の山: ruby 2.1.1 + fluentd v0.10.43 + cool.io v1.1.1 + msgpack v0.5.6
$ brew install openblas
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS provides BLAS and LAPACK in the Accelerate framework.
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/openblas/lib
CPPFLAGS: -I/usr/local/opt/openblas/include
For pkg-config to find this software you may need to set:
https://github.com/sonots/ruby/compare/chunked?expand=1
config.ru
class Streamer
include Rack::Utils
def initialize(sleep=0.05)
@sleep = sleep
#include <sys/time.h> | |
#include <cuda_runtime.h> | |
#include <stdio.h> | |
void test(int size) | |
{ | |
float *d1, *d2; | |
cudaMalloc(&d1, size); | |
cudaMalloc(&d2, size); |
controller で適当に例外おこして追って行く | |
From: /home/seo.naotoshi/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_controller/metal/rescue.rb @ line 31 ActionController::Rescue#process_action: | |
28: def process_action(*args) | |
29: super | |
30: rescue Exception => exception | |
=> 31: request.env['action_dispatch.show_detailed_exceptions'] ||= show_detailed_exceptions? | |
32: rescue_with_handler(exception) || raise(exception) | |
33: end |
ためしてないけど、こんなかんじでできるのでは。
/etc/sysconfig/td-agent
export BUNDLE_BIN_PATH=/opt/td-agent/embedded/bin/bundle
export BUNDLE_GEMFILE=/etc/td-agent/Gemfile
export RUBYOPT=-rbundler/setup
# fluent.conf
<source>
type dummydata_producer
tag dummy.data
rate 500
dummydata0 {\"type\":\"sample\",\"code\":50,\"format\":\"json string allowed\"}
dummydata1 {\"message\":\"other format needed?\"}
dummydata2 {\"comment\":\"N of dummydataN is number and not limited\"}
@label @raw
$ nvcc simpleCallback.cu -O2 -o simpleCallback
$ nvprof -f -o simpleCallback.nvvp ./simpleCallback | grep elapsed
No callback: elapsed time = 1.534s
One callback: elapsed time = 1.498s
Two callback: elapsed time = 3.718s
Four callback: elapsed time = 5.194s
As increasing callbacks, it becomes slow...