[sac-user] SaC + cuda

Clemens Grelck c.grelck at uva.nl
Sun Mar 18 23:30:07 CET 2018


Dear Jonathan,

Welcome to the world of SAC.

Have you declared your functions euler and relprime as "inline"?
We don't have an inline heuristics, and the cuda backend does not
like function calls in with-loop bodies.

This goes as follows:
   inline int foo( int a) { return a;}

Apart from that it might indeed be useful to see your complete
source code, assuming it's not exactly gigantic. ;-)

Cheers,
   Clemens


On 3/18/18 12:21 AM, Meyer, Jonathan C wrote:
>
> Dear all,
>
>
> First, I am a total beginner to SaC and functional programming in general.
>
> I would therefore greatly appreciate any help :)
>
>
> I have managed to write some code that works fine using target 
> "mt_pth", with working parallelization.
>
> However, despite my desperate tries, SaC can't make it work on GPUs -> 
> "Body of With-Loop to complex => no cudarization!".
>
>
> The loops are :
>
>     - [In main()]
>     a = with{
>                     ([0,0] <= [i,j] < [15,1000]) : euler(i*1000+j+1);
>     }:fold(+, 0);
>
>
>     - [In euler()]
>     a = with {
>                     ([1] <= [i] <= [n]) : relprime(n,i);
>
>      }:fold(+, 0);
>
> For reference, the goal is to compute the sum of totient in a given 
> range of integers.
> If needed, I attached my source code.
>
> Thank you for your help !
>
> Best regards,
> Jonathan
> Untitled Document
> ------------------------------------------------------------------------
>
> */Heriot-Watt University is The Times & The Sunday Times International 
> University of the Year 2018/*
>
> Founded in 1821, Heriot-Watt is a leader in ideas and solutions. With 
> campuses and students across the entire globe we span the world, 
> delivering innovation and educational excellence in business, 
> engineering, design and the physical, social and life sciences.
>
> This email is generated from the Heriot-Watt University Group, which 
> includes:
>
>  1. Heriot-Watt University, a Scottish charity registered under number
>     SC000278
>  2. Edinburgh Business School a Charity Registered in Scotland,
>     SC026900. Edinburgh Business School is a company limited by
>     guarantee, registered in Scotland with registered number SC173556
>     and registered office at Heriot-Watt University Finance Office,
>     Riccarton, Currie, Midlothian, EH14 4AS
>  3. Heriot- Watt Services Limited (Oriam), Scotland's national
>     performance centre for sport. Heriot-Watt Services Limited is a
>     private limited company registered is Scotland with registered
>     number SC271030 and registered office at Research & Enterprise
>     Services Heriot-Watt University, Riccarton, Edinburgh, EH14 4AS.
>
> The contents (including any attachments) are confidential. If you are 
> not the intended recipient of this e-mail, any disclosure, copying, 
> distribution or use of its contents is strictly prohibited, and you 
> should please notify the sender immediately and then delete it 
> (including any attachments) from your system.
>
>
>
> _______________________________________________
> sac-user mailing list
> sac-user at sac-home.org
> http://lists.sac-home.org/mailman/listinfo/sac-user


-- 
----------------------------------------------------------------------
Dr Clemens Grelck                                     Science Park 904
University Lecturer                                   1098XH Amsterdam
Programme Director Software Engineering                    Netherlands

University of Amsterdam
Institute for Informatics                        T +31 (0) 20 525 8683
System and Network Engineering Lab               F +31 (0) 20 525 7490

Office C3.109                             staff.fnwi.uva.nl/c.u.grelck
----------------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sac-home.org/pipermail/sac-user/attachments/20180318/e5ecacba/attachment.html>


More information about the sac-user mailing list