computablee / DotMP

A collection of powerful abstractions for parallel programming in .NET with an OpenMP-like API.
https://computablee.github.io/DotMP/
GNU Lesser General Public License v2.1
29 stars 7 forks source link

Bug fix/validation for parameters #92

Closed Kaybangz closed 1 year ago

Kaybangz commented 1 year ago

Which issue are you addressing?

51

How have you addressed the issue?

  1. Removed Barrier() from Parallel.Ordered method
  2. Moved the body of the If statements in ValidateParameters() method to a new indented line
  3. In Exception.cs, added a space before the : tokens
  4. Used ValidateParameters() only at the top of the internal For handler
  5. Removed the spaces on line 250 in Parallel.cs
  6. Added a descriptive message to the custom NotInForException
Kaybangz commented 1 year ago

Hey @computablee, do you seem to have any idea why compilation is failing and how I can go about fixing?

I would also like to know how to run tests on my end, to ensure that everything works before making a PR.

I apologize for the inconvenience

computablee commented 1 year ago

It looks like you have mismatched names in your added function (e.g., you accept chunkSize as a parameter, but later reference a chunk_size variable... this is the case with numerous variables).

If you have the dotnet CLI installed, you can navigate to the DotMP-Tests/ directory and run dotnet test --verbose in your command line—this will ensure not only that everything compiles, but that some 40-ish other integration tests pass.

I also recommend reading the new CONTRIBUTING.md in the main branch I updated tonight—it outlines several important things about opening a PR, such as things that are grounds for immediate rejection, code formatting and styling, and testing. These will be enforced moving forward.

computablee commented 1 year ago

Also, I noticed that the linting check failed on the dotnet-format pass. This can be solved by navigating to the DotMP/ folder and running dotnet format. This tool will automatically resolve any formatting issues. Make sure to do that before you open the PR.

Kaybangz commented 1 year ago

Alright, noted.

Kaybangz commented 1 year ago

I keep getting this error Failed to read environment variables [DOTNET_STARTUP_HOOK], HRESULT: 0X800700CB when I try to run the dotnet test --verbose, dotnet format or dotnet build.

Can I push my changes without testing, since I have made all necessary changes or is there any other suggestion you have for rectifying this problem?

Build_error_1 Build_error_2 Build_error_3

computablee commented 1 year ago

Hey @Kaybangz, sorry for the late response. I have recently adopted a cat and have not even had time to open GitHub.

I would recommend asking around in the C# Discord to see if they can fix your problem. Unfortunately, I cannot help diagnose issues with the dotnet CLI—I merely maintain a .NET project which uses it.

Kaybangz commented 1 year ago

Congrats on adopting a cat😊

I'll be sure to check out the Discord group

computablee commented 1 year ago

In order to expedite this issue to get the next major release out, I am closing this PR and self-assigning #51.