Shonan challenge repo on github

101 views
Skip to first unread message

Ashish Agarwal

unread,
May 23, 2012, 12:25:36 PM5/23/12
to stag...@googlegroups.com
Hi all,

I also created a git repo for the challenges. You may want to add your code there, so we'll have everything one place. The URL is:


GitHub supports two collaboration models:

1) You fork the above repo, and send pull requests. That would require me to merge every change, and will likely slow down contributions.

2) You can be added as a collaborator to the above repo, and thus push directly to it.

I prefer the 2nd option. If you send me your github name, I can add you.

Note this repo lives under a github group named StagedHPC. We can thus add more repos under this organization if we feel the above one grows too big.

-Ashish



On Wed, May 23, 2012 at 9:43 AM, Tiark Rompf <tiark...@epfl.ch> wrote:
Hi all,

and thanks Kenichi for getting the ball rolling.

Here is a straightforward Scala port (using plain LMS without Delite):

         def sparse_mv_prod(a: Array[Array[Int]], v: Rep[Array[Int]]) = {
           val v1 = NewArray[Int](n)
           for (i <- 0 until n: Range) {
             if ((a(i) filter (_ != 0)).length < 3) {
               for (j <- 0 until n: Range) {
                 if (a(i)(j) != 0)
                   v1(i) = v1(i) + a(i)(j) * v(j)
               }
             } else {
               for (j <- 0 until n: Rep[Range]) {
                 v1(i) = v1(i) + (staticData(a(i)) apply j) * v(j)
               }
             }
           }
           v1
         }

If we add a a few helper methods and rewrites we can also write it like this:

         def sparse_mv_prod(a: Array[Array[Int]], v: Rep[Array[Int]]) = {
           val v1 = NewArray[Int](n)
           for (i <- 0 until n: Range) {
             for (j <- unrollIf(0 until n)((a(i) filter (_ != 0)).length < 3)) {
               v1(i) = v1(i) + (staticData(a(i)) apply j) * v(j)
             }
           }
           v1
         }

In the end I think the input should just be this:

       val a = MixedSparseDenseMatrix(.... data ...)

       val v1 = a * v

This should not be too hard with Delite because matrix and vector operations are already implemented for OptiLA/OptiML but I don't have the time to try it right now.

The full code is here:
https://github.com/TiarkRompf/virtualization-lms-core/blob/delite-develop2/test-src/epfl/test11-shonan/TestHMM.scala

It produces this output:
https://github.com/TiarkRompf/virtualization-lms-core/blob/delite-develop2/test-out/epfl/test11-hmm1.check
https://github.com/TiarkRompf/virtualization-lms-core/blob/delite-develop2/test-out/epfl/test11-hmm2.check

Cheers,
- Tiark


On May 23, 2012, at 8:28 AM, Kenichi Asai wrote:

> Dear all,
>
> I have created a temporary web page that describes the (simplified)
> hidden Markov model (if I understand it correctly) and its possible
> solution in MetaOCaml.
>
> http://pllab.is.ocha.ac.jp/~asai/StagedHPC/1.html
>
> The point here is that it specifies two things clearly:
>
> - the input program (that HPC people are OK to write), and
> - the output program(s) (that HPC people want to obtain).
>
> If these two are explicit, it is also OK to add various background
> information to it.  I also wrote possible solutions in MetaOCaml.
> Solutions should include:
>
> - what kind of hack we need,
> - the staged program that generates code, and
> - produced code.
>
> HPC people can then say whether the hack is understandable and whether
> the produced code is good enough.  (In case the hack is not
> understandable, it would be a good research topic for staging people how
> to remove such a hack.  In case the produced code is not good enough,
> HPC people can say why it is bad (and possibly make a new challenge to
> overcome the deficiency) and we could go forward to solve the problem.
>
> Does this seem to be OK?  Any comments are welcome, both on the format
> and the contents.  I would think the above works fine for small
> problems.  If it looks fine, I will create a web page for a few more
> challenges from Reiji (whose solutions I do not know).  Meanwhile,
>
> - How should I write this kind of things in a shared place (Git-hub)?
>  It would be very nice if someone could make a template document
>  at an appropriate directory containing the skeleton (section names) of
>  the challenge.
>
> - Could you also write your challenges?
>
> - Could you start writing a sample challenge for middle-sized problems,
>  i.e., libraries?  I am not sure if the current template works well for
>  libraries, too.  It would be nice to write one and see if it is
>  feasible.
>
> Sincerely,
>
> --
> Kenichi Asai


Takayuki Muranushi

unread,
May 23, 2012, 8:50:54 PM5/23/12
to stag...@googlegroups.com
Hi Ashish,

Thank you for organizing the github. Will you add me as a
collaborator, so that I can try push my problems?
My github acconut is
https://github.com/nushio3

And thank you for introducing me to the staged bio-info world.
Best,

Takayuki

2012/5/24 Ashish Agarwal <agarw...@gmail.com>:

Ashish Agarwal

unread,
May 23, 2012, 9:30:53 PM5/23/12
to stag...@googlegroups.com
Hi Takayuki,

You should have pull/push access now. Let me know if it doesn't work.

For those who care about github internals: I created a team "shonan-challenge-dev", and gave that team rights to push/pull from the shonan-challenge repo. Now I can simply add people to this team.

Best,
Ashish

Takayuki Muranushi

unread,
May 24, 2012, 11:06:25 AM5/24/12
to stag...@googlegroups.com
Dear Ashish,

I've uploaded some file for just some test.I'll update it as a formal
problem html in a few days. Thanks!
--
MURANUSHI Takayuki
The Hakubi Center for Advanced Research, Kyoto University
http://www.hakubi.kyoto-u.ac.jp/02_mem/h22/muranushi.html

Albert Cohen

unread,
May 27, 2012, 8:00:52 PM5/27/12
to stag...@googlegroups.com
Dear Ashish,

I'll be glad to join in. My user name is albertcohen

Thanks a lot for setting this up!

Albert

Peter Thiemann

unread,
May 28, 2012, 1:33:12 PM5/28/12
to stag...@googlegroups.com, Ashish Agarwal
Hi Ashish,

can you please add me as a collaborator?
I'm peterthiemann

-Peter

Ashish Agarwal

unread,
May 28, 2012, 8:00:51 PM5/28/12
to stag...@googlegroups.com
You've been added.

Reiji Suda

unread,
Jun 7, 2012, 10:56:07 AM6/7/12
to stag...@googlegroups.com
Dear Ashish,

Finally I have got some time to learn how to use git and github.
I am not fully sure with them, but at least I understand what this
mail means.

This time, I added my files via a fork. (complexNumber)

I will upload my files with option 2 from the next time.
My name is reijiS.

Reiji

Ashish Agarwal

unread,
Jun 7, 2012, 11:32:03 AM6/7/12
to stag...@googlegroups.com
Hi Reiji,

Couple of recommendations:

* The pdf file has the same content as the docx file. No need to add both. In general, you add only raw source files (for code or documentation) into repo, and you do not add anything that can be automatically generated.

* You also generally add only plain text files. Binary files are okay in rare circumstances. In this case, the content of your docx could easily be written in a plain text file, so that will be preferable.

FYI, a great book on git is freely available here:

-Ashish

Reiji Suda

unread,
Jun 7, 2012, 7:43:29 PM6/7/12
to stag...@googlegroups.com
Dear Ashish,

Thank you very much! I will upload my files as text.

best regards,

Reiji Suda

unread,
Jun 8, 2012, 2:40:20 AM6/8/12
to stag...@googlegroups.com
Dear Ashish and everyone,

Sorry for bothering you.

1) I removed docx and pdf files of ComplexNumber.
2) I found a bug in the original ComplexNumber, and fixed.
3) I recast the problem into one in the form of code optimization,
in the file ComplexNumber2.txt.

I am afraid it may be not a problem of staging, but anyway it must
be a problem of programming language and compilers.

Reiji

Yukiyoshi Kameyama

unread,
May 26, 2014, 10:19:46 AM5/26/14
to stag...@googlegroups.com
This is just a test for checking if this group is still alive. -- Yukiyoshi


Ashish Agarwal

unread,
May 26, 2014, 10:31:09 AM5/26/14
to stag...@googlegroups.com
Yes, this list is still functional. You can see archives at:
On Mon, May 26, 2014 at 10:19 AM, Yukiyoshi Kameyama <yukiyoshi...@gmail.com> wrote:
This is just a test for checking if this group is still alive. -- Yukiyoshi


--
You received this message because you are subscribed to the Google Groups "StagedHPC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stagedhpc+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yukiyoshi Kameyama

unread,
May 28, 2014, 9:19:17 AM5/28/14
to stag...@googlegroups.com
Thanks, Ashish.  We will be talking tomorrow (in Japan time) the next Shonan Challenge problems.
If you have suggestions, please let me (or Oleg) know. Thanks.  -- Yukiyoshi


亀山幸義

Takayuki Muranushi

unread,
May 28, 2014, 9:37:58 AM5/28/14
to stag...@googlegroups.com
Hi everyone, I've added my challenge to the repository.
https://github.com/StagedHPC/shonan-challenge/tree/master/problems/staggered-mesh

Takayuki Muranushi

unread,
May 29, 2014, 9:35:47 AM5/29/14
to stag...@googlegroups.com, rrne...@indiana.edu
Hi all,

I've added my Paraiso autotuning slide to the Shonan-challenge repo as
a new challenge proposal.
https://github.com/StagedHPC/shonan-challenge/tree/master/problems/autotuning
Reply all
Reply to author
Forward
0 new messages