Giter VIP home page Giter VIP logo

moose-core's Introduction

moose-core's People

Contributors

hrani avatar upibhalla avatar asiaszmek avatar dilawar avatar subhacom avatar keszybz avatar aviralg avatar malav4994 avatar vdharmateja avatar bitdeli-chef avatar physicalist avatar

Watchers

 avatar James Cloos avatar

moose-core's Issues

Error Handling in CUDA

Right now, cuda calls are bare and don't give any notification if it is not successful. They have to wrapped appropriately.

Unifying advanceCalcium kernel.

In this method also, there is a choice to use WPT(work per thread) or CSRMV(matrix vector multiplication). It is observed that load per thread is less and load balance is minimum. Time can be saved by unifying kernels and using WPT approach.

Advance channel memory optimization

  • Store gates in a rowPtr fashion instead of 3*#channels. This will decrease memory storage.
  • Get rid of compressing step.
  • Decrease work in calculate channel currents.

Hines matrix construction.

How to generate hines matrix from a swc file ?
How to fill hines matrix using conductance values of compartments ?

Experiments

  • 3-way overlap experiment on updateMatrix method.

Techniques to try.

  • Concurrent kernel execution in advanceChannels.
  • Hiding memory transfers using streams and async calls.
  • Shared memory optimizations ?
  • Gauss elimination on GPU.
  • Heterogeneous computing.
  • Coalesce data access pattern in update matrix.
  • Using structureOfArrays instead of arrayOfStructue.

Relocation related error

/usr/bin/ld: hsolve/libhsolve_cuda.a(cuda_compile_generated_AdvanceChannel.cu.o): relocation R_X86_64_32S against .bss' can not be used when making a shared object; recompile with -fPIC hsolve/libhsolve_cuda.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status make[2]: *** [libmoose.so] Error 1 make[1]: *** [CMakeFiles/libmoose.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... /usr/bin/ld: hsolve/libhsolve_cuda.a(cuda_compile_generated_AdvanceChannel.cu.o): relocation R_X86_64_32S against.bss' can not be used when making a shared object; recompile with -fPIC
hsolve/libhsolve_cuda.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [python/moose/_moose.so] Error 1
make[1]: *** [CMakeFiles/_moose.dir/all] Error 2
make: *** [all] Error 2

Write optimized version of updateMatrix.

  • Right now matrix information is stored in a vector, which cannot be pinned. Store it in an array form and assign pinned memory.
  • Vector is of size 4_nCompt. Only 2_nCompt of that array is required to be transferred from GPU to CPU. Let code view 2*N portion as a row major format.

Write a version of pervasive flow which takes care of above.

Unifying updamatrix kernels.

Previous approach
It was a two step process. First step is to accumulate currents of channels in a compartment. Second step is to update the matrix data.

It is observed that having multiple kernels results in more simulation time. So unify these two steps, when using work per thread approach.

Compilation error .

[ 71%] Building NVCC (Device) object hsolve/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_AdvanceChannel.cu.o
In file included from /usr/include/c++/4.8/random:35:0,
from /home1/teja/Work/moose-core/randnum/RNG.h:33,
from /home1/teja/Work/moose-core/hsolve/../basecode/global.h:27,
from /home1/teja/Work/moose-core/hsolve/HSolveUtils.h:14,
from /home1/teja/Work/moose-core/hsolve/HSolveActive.h:23,
from /home1/teja/Work/moose-core/hsolve/AdvanceChannel.cu:9:
/usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the
^
CMake Error at cuda_compile_generated_AdvanceChannel.cu.o.cmake:206 (message):
Error generating
/home1/teja/Work/moose-core/_build/hsolve/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_AdvanceChannel.cu.o

make[2]: *** [hsolve/CMakeFiles/cuda_compile.dir/./cuda_compile_generated_AdvanceChannel.cu.o] Error 1
make[1]: *** [hsolve/CMakeFiles/hsolve_cuda.dir/all] Error 2
make: *** [all] Error 2

Failed to build gpu branch

Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00001351_00000000-7_AdvanceChannel.cpp1.ii".
Compilation terminated.
CMake Error at cuda_compile_generated_AdvanceChannel.cu.o.cmake:264 (message):
Error generating file
~/Work/ncbs/moose-core/build/hsolve/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_AdvanceChannel.cu.o

Dynamic choice of approaches in updatematrix method.

Problem : Input is a set of sets and output is a set where each element is the cumulative sum of a set in input. One can assign each thread to take care or map it to SPMV.
In hsolve, the pattern of communication remains same for each time-step. One can do some dry runs and determine which is faster and use it in the simulation.

Choose advance calcium approach in runtime.

One can either use WPT(work per thread) approach or SPMV(sparse matrix vector multiplication) approach to compute advanceCalcium method. No one approach is better than other in all use cases. Do some pre-runs and decide before starting simulation.

Compilation error .

[ 71%] Building NVCC (Device) object hsolve/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_AdvanceChannel.cu.o
In file included from /usr/include/c++/4.8/random:35:0,
from /home1/teja/Work/moose-core/randnum/RNG.h:33,
from /home1/teja/Work/moose-core/hsolve/../basecode/global.h:27,
from /home1/teja/Work/moose-core/hsolve/HSolveUtils.h:14,
from /home1/teja/Work/moose-core/hsolve/HSolveActive.h:23,
from /home1/teja/Work/moose-core/hsolve/AdvanceChannel.cu:9:
/usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the
^
CMake Error at cuda_compile_generated_AdvanceChannel.cu.o.cmake:206 (message):
Error generating
/home1/teja/Work/moose-core/_build/hsolve/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_AdvanceChannel.cu.o

make[2]: *** [hsolve/CMakeFiles/cuda_compile.dir/./cuda_compile_generated_AdvanceChannel.cu.o] Error 1
make[1]: *** [hsolve/CMakeFiles/hsolve_cuda.dir/all] Error 2
make: *** [all] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.