Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update code to work with Chapel 2.0, quiet some linter warnings #25

Merged
merged 15 commits into from
Nov 18, 2024

Conversation

DanilaFe
Copy link
Contributor

This PR is best reviewed commit-by-commit.

The main goal was to fix the Chapel code in the examples that no longer works under Chapel 2.0. Some notable changes fixed by this PR:

  • Tuple indexing used to be 1-based, but is now 0-based, necessitating a change to vararg function demonstration
  • The dmapped keyword now requires new, and the distributions are called blockDist and cyclicDist instead of Block and Cyclic
  • The isfull() method on sync variables is now isFull (a property)
  • imode is now ioMode
  • Using exp requires use Math
  • direct atomic real >= real comparison is no longer supported, so use .read()

This PR also fixes a number of small typos and bugs (omitted variables, incorrect names (T vs temp), etc.

The most significant linter-specific change is that do is not necessary in loops with {: do is for single-statement loops, { is for loops with multiple statements.

Also, some of the output seems to expect non-25 boundary conditions, whereas it sets up with 25 boundary conditions. This PR changes the boundaries to 0 for that portion of the code, so that the output of the program matches the expected output.

The delta is used in this section, and tmp is used
in the next section.

Signed-off-by: Danila Fedorin <[email protected]>
The output in the examples seems to assume 0-based boundaries,
so this change makes the boundaries zero.

Signed-off-by: Danila Fedorin <[email protected]>
Copy link

🆗 Pre-flight checks passed 😃

This pull request has been checked and contains no modified workflow files or spoofing.

It should be safe to Approve and Run the workflows that need maintainer approval.

@razoumov razoumov self-assigned this Nov 15, 2024
@razoumov
Copy link
Member

Thank you, Daniel! Please give me a couple of days to review this.

Copy link
Member

@razoumov razoumov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @DanilaFe -- all looks good, after a couple of very small corrections. Merging into the main branch.

@razoumov razoumov merged commit 2f919b9 into hpc-carpentry:main Nov 18, 2024
1 check passed
github-actions bot pushed a commit that referenced this pull request Nov 18, 2024
Auto-generated via `{sandpaper}`
Source  : 2f919b9
Branch  : main
Author  : Alex Razoumov <[email protected]>
Time    : 2024-11-18 19:44:12 +0000
Message : Merge pull request #25 from DanilaFe/update-for-new-chapel

Update code to work with Chapel 2.0, quiet some linter warnings
github-actions bot pushed a commit that referenced this pull request Nov 18, 2024
Auto-generated via `{sandpaper}`
Source  : c4c051d
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-11-18 19:45:44 +0000
Message : markdown source builds

Auto-generated via `{sandpaper}`
Source  : 2f919b9
Branch  : main
Author  : Alex Razoumov <[email protected]>
Time    : 2024-11-18 19:44:12 +0000
Message : Merge pull request #25 from DanilaFe/update-for-new-chapel

Update code to work with Chapel 2.0, quiet some linter warnings
github-actions bot pushed a commit that referenced this pull request Nov 19, 2024
Auto-generated via `{sandpaper}`
Source  : c4c051d
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-11-18 19:45:44 +0000
Message : markdown source builds

Auto-generated via `{sandpaper}`
Source  : 2f919b9
Branch  : main
Author  : Alex Razoumov <[email protected]>
Time    : 2024-11-18 19:44:12 +0000
Message : Merge pull request #25 from DanilaFe/update-for-new-chapel

Update code to work with Chapel 2.0, quiet some linter warnings
github-actions bot pushed a commit that referenced this pull request Nov 20, 2024
Auto-generated via `{sandpaper}`
Source  : c4c051d
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-11-18 19:45:44 +0000
Message : markdown source builds

Auto-generated via `{sandpaper}`
Source  : 2f919b9
Branch  : main
Author  : Alex Razoumov <[email protected]>
Time    : 2024-11-18 19:44:12 +0000
Message : Merge pull request #25 from DanilaFe/update-for-new-chapel

Update code to work with Chapel 2.0, quiet some linter warnings
github-actions bot pushed a commit that referenced this pull request Nov 26, 2024
Auto-generated via `{sandpaper}`
Source  : c4c051d
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-11-18 19:45:44 +0000
Message : markdown source builds

Auto-generated via `{sandpaper}`
Source  : 2f919b9
Branch  : main
Author  : Alex Razoumov <[email protected]>
Time    : 2024-11-18 19:44:12 +0000
Message : Merge pull request #25 from DanilaFe/update-for-new-chapel

Update code to work with Chapel 2.0, quiet some linter warnings
github-actions bot pushed a commit that referenced this pull request Dec 3, 2024
Auto-generated via `{sandpaper}`
Source  : c4c051d
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-11-18 19:45:44 +0000
Message : markdown source builds

Auto-generated via `{sandpaper}`
Source  : 2f919b9
Branch  : main
Author  : Alex Razoumov <[email protected]>
Time    : 2024-11-18 19:44:12 +0000
Message : Merge pull request #25 from DanilaFe/update-for-new-chapel

Update code to work with Chapel 2.0, quiet some linter warnings
github-actions bot pushed a commit that referenced this pull request Dec 10, 2024
Auto-generated via `{sandpaper}`
Source  : c4c051d
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-11-18 19:45:44 +0000
Message : markdown source builds

Auto-generated via `{sandpaper}`
Source  : 2f919b9
Branch  : main
Author  : Alex Razoumov <[email protected]>
Time    : 2024-11-18 19:44:12 +0000
Message : Merge pull request #25 from DanilaFe/update-for-new-chapel

Update code to work with Chapel 2.0, quiet some linter warnings
github-actions bot pushed a commit that referenced this pull request Dec 17, 2024
Auto-generated via `{sandpaper}`
Source  : c4c051d
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-11-18 19:45:44 +0000
Message : markdown source builds

Auto-generated via `{sandpaper}`
Source  : 2f919b9
Branch  : main
Author  : Alex Razoumov <[email protected]>
Time    : 2024-11-18 19:44:12 +0000
Message : Merge pull request #25 from DanilaFe/update-for-new-chapel

Update code to work with Chapel 2.0, quiet some linter warnings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants