I am interested on working on a DotMP-Builder program that is capable of turning pragma-based C# programs parallelized with DotMP into programs that can actually be compiled by the .NET C# compiler.
It would be intended to resemble the pragma-based approach of C and C++ OpenMP as close as possible. For instance:
#pragma dmp parallel for num_threads(8) schedule(static) chunk_size(128)
for (int i = 0; i < 1_000_000; i++)
{
y[i] += a * x[i];
}
would be transformed into:
DotMP.Parallel.ParallelFor(
0, 1_000_000,
num_threads: 8,
schedule: DotMP.Schedule.Static,
chunk_size: 128,
action: i =>
{
y[i] += a * x[i];
});
Furthermore, it would work as a command line application that would fully replace the dotnet CLI package. In essence, if you had a .NET Core solution with C# code resembling this pragma-based paradigm, you could call:
mpbuild run -c Release arg1 arg2 arg3
and mpbuild would take the following steps:
Read the contents of the current directory
Copy the contents into a .mptemp subdirectory
Parse all of the *.cs files, replacing pragmas with DotMP function calls
Run dotnet run -c Release arg1 arg2 arg3
This would allow the user to replace their workflow with mpbuild instead of dotnet to seamlessly implement pragma-based parallel programming in C#.
This issue serves for now as a way for me to gather interest and potential collaborators. Since this would involve a fair bit of parsing C# source code, and since I am not a compilers expert, I would love to see if anyone actually cares about this or would want to help before pouring tons of effort into this.
I am interested on working on a
DotMP-Builder
program that is capable of turning pragma-based C# programs parallelized with DotMP into programs that can actually be compiled by the .NET C# compiler.It would be intended to resemble the pragma-based approach of C and C++ OpenMP as close as possible. For instance:
would be transformed into:
Furthermore, it would work as a command line application that would fully replace the
dotnet
CLI package. In essence, if you had a .NET Core solution with C# code resembling this pragma-based paradigm, you could call:and
mpbuild
would take the following steps:.mptemp
subdirectory*.cs
files, replacing pragmas withDotMP
function callsdotnet run -c Release arg1 arg2 arg3
This would allow the user to replace their workflow with
mpbuild
instead ofdotnet
to seamlessly implement pragma-based parallel programming in C#.This issue serves for now as a way for me to gather interest and potential collaborators. Since this would involve a fair bit of parsing C# source code, and since I am not a compilers expert, I would love to see if anyone actually cares about this or would want to help before pouring tons of effort into this.