Simone Pellegrini | 8 May 15:11 2012
Picon

CLOMP: OpenMP frontend for Clang (and much more)

Dear all,
I worked for some time on an OpenMP frontend based on Clang. This is not just an OpenMP frontend but a more comprehensive framework to handle user defined pragmas. OpenMP is implemented just to test its functionalities. This was implemented as part of a bigger project called insieme which is developed at the university of Innsbruck ( http://insieme-compiler.org/). Several people asked me to release this code since long time and I finally took some time to isolate the pragma handling mechanism from the rest of the project and open source it. This is only the frontend part, there is no backend. Therefore, if you happen to have an OpenMP backend for LLVM and you need a frontend then you just found your soul mate :)

I host this code in the following repository: https://github.com/motonacciu/clomp

This project contains the infrastructure for pragma handling and the OpenMP frontend. It doesn't work on the current SVN release on clang. It requires LLVM/Clang 3.0 and additionally a small patch has to be applied to Clang in order for the all thing to work. However the patch can be easily updated to work with the latest clang. The project contains a couple of examples that show how it is meant to be used.

In order to compile the project you need to do 2 things. First of all install the patched version of LLVM/Clang. This can be done by running the llvm-3.0-installer.sh script stored in the script folder. Clomp is built with cmake. Specify the LLVM_HOME=/path/to/patched-llvm env variable when you run CMAKE. It is required to set up some internal paths. (I will add installation instruction in the project web page soon)

It would be nice to have the code in Clang (so that I don't have to update the patch every time a new release of clang comes along) but I really have no time to rewrite everything to conform with the coding style of LLVM. I use C++11 a lot and templates as well and I know LLVM how people here feel about those things. :) Also the code was first written more than 1 year ago and I suppose in the meantime several things have changed in Clang and probably there is an easier way to do some of the things. If someone is interested in taking over the effort of going through a code review and port it into clang I can help, just contact me. The code is well tested and functional. It can handle several OpenMP benchmark codes like the NAS Parallel Benchmarks and Rodinia benchmarks.

Everyone can use it. If you do so, please cite. I am open to research collaborations.

cheers, Simone


_______________________________________________
cfe-dev mailing list
cfe-dev@...
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Hal Finkel | 8 May 20:08 2012

Re: CLOMP: OpenMP frontend for Clang (and much more)

Simone,

Thank you for taking the time to extract this from your codebase. For
any of this code to be directly usable in clang, it will need to be
relicensed (most of the files seem to be under the GPL currently). Once
that is done, I will certainly help with the rebasing, coding-standards
changes, etc.

Sincerely,
Hal

On Tue, 08 May 2012 15:11:39 +0200
Simone Pellegrini <spellegrini@...> wrote:

> Dear all,
> I worked for some time on an OpenMP frontend based on Clang. This is
> not just an OpenMP frontend but a more comprehensive framework to
> handle user defined pragmas. OpenMP is implemented just to test its 
> functionalities. This was implemented as part of a bigger project
> called insieme which is developed at the university of Innsbruck ( 
> http://insieme-compiler.org/). Several people asked me to release
> this code since long time and I finally took some time to isolate the
> pragma handling mechanism from the rest of the project and open
> source it. This is only the frontend part, there is no backend.
> Therefore, if you happen to have an OpenMP backend for LLVM and you
> need a frontend then you just found your soul mate :)
> 
> I host this code in the following repository: 
> https://github.com/motonacciu/clomp
> 
> This project contains the infrastructure for pragma handling and the 
> OpenMP frontend. It doesn't work on the current SVN release on clang.
> It requires LLVM/Clang 3.0 and additionally a small patch has to be
> applied to Clang in order for the all thing to work. However the
> patch can be easily updated to work with the latest clang. The
> project contains a couple of examples that show how it is meant to be
> used.
> 
> In order to compile the project you need to do 2 things. First of all 
> install the patched version of LLVM/Clang. This can be done by
> running the llvm-3.0-installer.sh script stored in the script folder.
> Clomp is built with cmake. Specify the
> LLVM_HOME=/path/to/patched-llvm env variable when you run CMAKE. It
> is required to set up some internal paths. (I will add installation
> instruction in the project web page soon)
> 
> It would be nice to have the code in Clang (so that I don't have to 
> update the patch every time a new release of clang comes along) but I 
> really have no time to rewrite everything to conform with the coding 
> style of LLVM. I use C++11 a lot and templates as well and I know
> LLVM how people here feel about those things. :) Also the code was
> first written more than 1 year ago and I suppose in the meantime
> several things have changed in Clang and probably there is an easier
> way to do some of the things. If someone is interested in taking over
> the effort of going through a code review and port it into clang I
> can help, just contact me. The code is well tested and functional. It
> can handle several OpenMP benchmark codes like the NAS Parallel
> Benchmarks and Rodinia benchmarks.
> 
> Everyone can use it. If you do so, please cite. I am open to research 
> collaborations.
> 
> cheers, Simone
> 
> 

--

-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory
Simone Pellegrini | 8 May 22:02 2012
Picon

Re: CLOMP: OpenMP frontend for Clang (and much more)

On Tue 08 May 2012 08:08:53 PM CEST, Hal Finkel wrote:
> Simone,
>
> Thank you for taking the time to extract this from your codebase. For
> any of this code to be directly usable in clang, it will need to be
> relicensed (most of the files seem to be under the GPL currently). Once
> that is done, I will certainly help with the rebasing, coding-standards
> changes, etc.

The GPL is not an issue, I can relax it. However I need to know what 
kind of license you need, I am not allowed to release the code without 
any license.

cheers, Simone

>
> Sincerely,
> Hal
>
> On Tue, 08 May 2012 15:11:39 +0200
> Simone Pellegrini<spellegrini@...>  wrote:
>
>> Dear all,
>> I worked for some time on an OpenMP frontend based on Clang. This is
>> not just an OpenMP frontend but a more comprehensive framework to
>> handle user defined pragmas. OpenMP is implemented just to test its
>> functionalities. This was implemented as part of a bigger project
>> called insieme which is developed at the university of Innsbruck (
>> http://insieme-compiler.org/). Several people asked me to release
>> this code since long time and I finally took some time to isolate the
>> pragma handling mechanism from the rest of the project and open
>> source it. This is only the frontend part, there is no backend.
>> Therefore, if you happen to have an OpenMP backend for LLVM and you
>> need a frontend then you just found your soul mate :)
>>
>> I host this code in the following repository:
>> https://github.com/motonacciu/clomp
>>
>> This project contains the infrastructure for pragma handling and the
>> OpenMP frontend. It doesn't work on the current SVN release on clang.
>> It requires LLVM/Clang 3.0 and additionally a small patch has to be
>> applied to Clang in order for the all thing to work. However the
>> patch can be easily updated to work with the latest clang. The
>> project contains a couple of examples that show how it is meant to be
>> used.
>>
>> In order to compile the project you need to do 2 things. First of all
>> install the patched version of LLVM/Clang. This can be done by
>> running the llvm-3.0-installer.sh script stored in the script folder.
>> Clomp is built with cmake. Specify the
>> LLVM_HOME=/path/to/patched-llvm env variable when you run CMAKE. It
>> is required to set up some internal paths. (I will add installation
>> instruction in the project web page soon)
>>
>> It would be nice to have the code in Clang (so that I don't have to
>> update the patch every time a new release of clang comes along) but I
>> really have no time to rewrite everything to conform with the coding
>> style of LLVM. I use C++11 a lot and templates as well and I know
>> LLVM how people here feel about those things. :) Also the code was
>> first written more than 1 year ago and I suppose in the meantime
>> several things have changed in Clang and probably there is an easier
>> way to do some of the things. If someone is interested in taking over
>> the effort of going through a code review and port it into clang I
>> can help, just contact me. The code is well tested and functional. It
>> can handle several OpenMP benchmark codes like the NAS Parallel
>> Benchmarks and Rodinia benchmarks.
>>
>> Everyone can use it. If you do so, please cite. I am open to research
>> collaborations.
>>
>> cheers, Simone
>>
>>
>
>
>
Hal Finkel | 8 May 22:35 2012

Re: CLOMP: OpenMP frontend for Clang (and much more)

On Tue, 08 May 2012 22:02:29 +0200
Simone Pellegrini <spellegrini@...> wrote:

> On Tue 08 May 2012 08:08:53 PM CEST, Hal Finkel wrote:
> > Simone,
> >
> > Thank you for taking the time to extract this from your codebase.
> > For any of this code to be directly usable in clang, it will need
> > to be relicensed (most of the files seem to be under the GPL
> > currently). Once that is done, I will certainly help with the
> > rebasing, coding-standards changes, etc.
> 
> The GPL is not an issue, I can relax it. However I need to know what 
> kind of license you need, I am not allowed to release the code
> without any license.

Fair enough. Can you release it under LLVM's license? That is certainly
the easiest from an integration perspective.

Thanks again,
Hal

> 
> cheers, Simone
> 
> >
> > Sincerely,
> > Hal
> >
> > On Tue, 08 May 2012 15:11:39 +0200
> > Simone Pellegrini<spellegrini@...>  wrote:
> >
> >> Dear all,
> >> I worked for some time on an OpenMP frontend based on Clang. This
> >> is not just an OpenMP frontend but a more comprehensive framework
> >> to handle user defined pragmas. OpenMP is implemented just to test
> >> its functionalities. This was implemented as part of a bigger
> >> project called insieme which is developed at the university of
> >> Innsbruck ( http://insieme-compiler.org/). Several people asked me
> >> to release this code since long time and I finally took some time
> >> to isolate the pragma handling mechanism from the rest of the
> >> project and open source it. This is only the frontend part, there
> >> is no backend. Therefore, if you happen to have an OpenMP backend
> >> for LLVM and you need a frontend then you just found your soul
> >> mate :)
> >>
> >> I host this code in the following repository:
> >> https://github.com/motonacciu/clomp
> >>
> >> This project contains the infrastructure for pragma handling and
> >> the OpenMP frontend. It doesn't work on the current SVN release on
> >> clang. It requires LLVM/Clang 3.0 and additionally a small patch
> >> has to be applied to Clang in order for the all thing to work.
> >> However the patch can be easily updated to work with the latest
> >> clang. The project contains a couple of examples that show how it
> >> is meant to be used.
> >>
> >> In order to compile the project you need to do 2 things. First of
> >> all install the patched version of LLVM/Clang. This can be done by
> >> running the llvm-3.0-installer.sh script stored in the script
> >> folder. Clomp is built with cmake. Specify the
> >> LLVM_HOME=/path/to/patched-llvm env variable when you run CMAKE. It
> >> is required to set up some internal paths. (I will add installation
> >> instruction in the project web page soon)
> >>
> >> It would be nice to have the code in Clang (so that I don't have to
> >> update the patch every time a new release of clang comes along)
> >> but I really have no time to rewrite everything to conform with
> >> the coding style of LLVM. I use C++11 a lot and templates as well
> >> and I know LLVM how people here feel about those things. :) Also
> >> the code was first written more than 1 year ago and I suppose in
> >> the meantime several things have changed in Clang and probably
> >> there is an easier way to do some of the things. If someone is
> >> interested in taking over the effort of going through a code
> >> review and port it into clang I can help, just contact me. The
> >> code is well tested and functional. It can handle several OpenMP
> >> benchmark codes like the NAS Parallel Benchmarks and Rodinia
> >> benchmarks.
> >>
> >> Everyone can use it. If you do so, please cite. I am open to
> >> research collaborations.
> >>
> >> cheers, Simone
> >>
> >>
> >
> >
> >
> 
> 

--

-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory
Chris Lattner | 9 May 03:08 2012
Picon

Re: CLOMP: OpenMP frontend for Clang (and much more)


On May 8, 2012, at 1:35 PM, Hal Finkel wrote:

> On Tue, 08 May 2012 22:02:29 +0200
> Simone Pellegrini <spellegrini@...> wrote:
> 
>> On Tue 08 May 2012 08:08:53 PM CEST, Hal Finkel wrote:
>>> Simone,
>>> 
>>> Thank you for taking the time to extract this from your codebase.
>>> For any of this code to be directly usable in clang, it will need
>>> to be relicensed (most of the files seem to be under the GPL
>>> currently). Once that is done, I will certainly help with the
>>> rebasing, coding-standards changes, etc.
>> 
>> The GPL is not an issue, I can relax it. However I need to know what 
>> kind of license you need, I am not allowed to release the code
>> without any license.
> 
> Fair enough. Can you release it under LLVM's license? That is certainly
> the easiest from an integration perspective.

We would need for the code to be released under the UIUC license used by the rest of LLVM.  FYI, the project's
policies are laid out here:
http://llvm.org/docs/DeveloperPolicy.html

-Chris
Simone Pellegrini | 9 May 10:54 2012
Picon

Re: CLOMP: OpenMP frontend for Clang (and much more)


Clomp is now under the University of Illinois/NCSA Open Source License.

cheers, Simone

On Wed 09 May 2012 03:08:02 AM CEST, Chris Lattner wrote:
>
> On May 8, 2012, at 1:35 PM, Hal Finkel wrote:
>
>> On Tue, 08 May 2012 22:02:29 +0200
>> Simone Pellegrini<spellegrini@...>  wrote:
>>
>>> On Tue 08 May 2012 08:08:53 PM CEST, Hal Finkel wrote:
>>>> Simone,
>>>>
>>>> Thank you for taking the time to extract this from your codebase.
>>>> For any of this code to be directly usable in clang, it will need
>>>> to be relicensed (most of the files seem to be under the GPL
>>>> currently). Once that is done, I will certainly help with the
>>>> rebasing, coding-standards changes, etc.
>>>
>>> The GPL is not an issue, I can relax it. However I need to know what
>>> kind of license you need, I am not allowed to release the code
>>> without any license.
>>
>> Fair enough. Can you release it under LLVM's license? That is certainly
>> the easiest from an integration perspective.
>
> We would need for the code to be released under the UIUC license used by the rest of LLVM.  FYI, the project's
policies are laid out here:
> http://llvm.org/docs/DeveloperPolicy.html
>
> -Chris
Hal Finkel | 10 May 14:56 2012

Re: CLOMP: OpenMP frontend for Clang (and much more)

Simone,

Great! I think that the best way to proceed is to also create a
separate github repo which mirrors clang trunk where we can work on
merging in the OpenMP parsing and semantic-analysis code (and adding
the necessary driver changes and regression tests).

 -Hal

On Wed, 09 May 2012 10:54:37 +0200
Simone Pellegrini <spellegrini@...> wrote:

> 
> Clomp is now under the University of Illinois/NCSA Open Source
> License.
> 
> cheers, Simone
> 
> On Wed 09 May 2012 03:08:02 AM CEST, Chris Lattner wrote:
> >
> > On May 8, 2012, at 1:35 PM, Hal Finkel wrote:
> >
> >> On Tue, 08 May 2012 22:02:29 +0200
> >> Simone Pellegrini<spellegrini@...>  wrote:
> >>
> >>> On Tue 08 May 2012 08:08:53 PM CEST, Hal Finkel wrote:
> >>>> Simone,
> >>>>
> >>>> Thank you for taking the time to extract this from your codebase.
> >>>> For any of this code to be directly usable in clang, it will need
> >>>> to be relicensed (most of the files seem to be under the GPL
> >>>> currently). Once that is done, I will certainly help with the
> >>>> rebasing, coding-standards changes, etc.
> >>>
> >>> The GPL is not an issue, I can relax it. However I need to know
> >>> what kind of license you need, I am not allowed to release the
> >>> code without any license.
> >>
> >> Fair enough. Can you release it under LLVM's license? That is
> >> certainly the easiest from an integration perspective.
> >
> > We would need for the code to be released under the UIUC license
> > used by the rest of LLVM.  FYI, the project's policies are laid out
> > here: http://llvm.org/docs/DeveloperPolicy.html
> >
> > -Chris
> 
> 

--

-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory

Gmane