Skip to content

Implement Connectivity.java example using Java bindings #13201

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vdhyasani17
Copy link

@vdhyasani17 vdhyasani17 commented Apr 18, 2025

[WIP] This adds a Java version of the connectivity example using Open MPI's Java bindings. It demonstrates basic point-to-point communication and serves as a reference for Java-based MPI applications. The functionality will be the same as connectivity_c.c.

Copy link

Hello! The Git Commit Checker CI bot found a few problems with this PR:

a46c371: Create Connectivity.java and be able to compile/ru...

  • check_signed_off: does not contain a valid Signed-off-by line

Please fix these problems and, if necessary, force-push new commits back up to the PR branch. Thanks!

2 similar comments
Copy link

Hello! The Git Commit Checker CI bot found a few problems with this PR:

a46c371: Create Connectivity.java and be able to compile/ru...

  • check_signed_off: does not contain a valid Signed-off-by line

Please fix these problems and, if necessary, force-push new commits back up to the PR branch. Thanks!

Copy link

Hello! The Git Commit Checker CI bot found a few problems with this PR:

a46c371: Create Connectivity.java and be able to compile/ru...

  • check_signed_off: does not contain a valid Signed-off-by line

Please fix these problems and, if necessary, force-push new commits back up to the PR branch. Thanks!

@vdhyasani17 vdhyasani17 force-pushed the java-connectivity-example branch from dad9cfe to 448388b Compare April 19, 2025 00:02
@jsquyres jsquyres marked this pull request as draft April 21, 2025 12:41
@vdhyasani17 vdhyasani17 marked this pull request as ready for review April 30, 2025 15:57
@vdhyasani17
Copy link
Author

Hi @jsquyres, can you review my PR when you have the chance? Thank you!

Copy link
Member

@jsquyres jsquyres left a comment

Choose a reason for hiding this comment

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

I'm not quite sure how the extra mpi.h.in / python changes came into this PR. Can you rebase to the current tip of main and avoid including Howard's commit here?

@vdhyasani17 vdhyasani17 force-pushed the java-connectivity-example branch from af303de to 64badb5 Compare May 1, 2025 16:11
@vdhyasani17
Copy link
Author

Sorry, I had some issues with rebasing, so all of my commits are now underneath the comments.

@jsquyres
Copy link
Member

jsquyres commented May 2, 2025

Sorry, I had some issues with rebasing, so all of my commits are now underneath the comments.

Rebasing is no problem -- I slice and dice my commits via interactive rebasing all the time. 😄

@jsquyres
Copy link
Member

jsquyres commented May 2, 2025

Go ahead and resolve the github conversations that you have addressed -- makes it easier to see what has been done.

Also, can you squash your Java commits down to a single commit? When we merge this PR, we probably only need to see a single commit in the final git history showing the addition of this example. Thanks!

@vdhyasani17 vdhyasani17 force-pushed the java-connectivity-example branch 2 times, most recently from 1dff421 to 75ceda4 Compare May 2, 2025 14:49
Signed-off-by: vdhyasani17 <vasi.dhyasani@gmail.com>

Implement the code for Connectivity.java

Add comments to explain the functionality

Signed-off-by: vdhyasani17 <vasi.dhyasani@gmail.com>

Make communication non-blocking by using iSend and iRecv

Fix comment semantics and structure

Add -v verbose check

Signed-off-by: vdhyasani17 <vasi.dhyasani@gmail.com>

Change nonblocking iSend/iRecv to sendRecv operation

Signed-off-by: vdhyasani17 <vasi.dhyasani@gmail.com>
@vdhyasani17 vdhyasani17 force-pushed the java-connectivity-example branch from 6133195 to b39015a Compare May 2, 2025 14:59
@jsquyres
Copy link
Member

jsquyres commented May 2, 2025

You might want to edit your commit message -- it's currently showing as 3 commit messages in one.

It also shows that Luke was the author..? I don't think you want that.

There's also unrelated changes in the commit. Did you end up squashing Luke's commits into yours?

@vdhyasani17
Copy link
Author

Ok, by showing three commit messages, do you mean that it's showing 'signoff: Vasista Dhyasani' three times?

@jsquyres
Copy link
Member

jsquyres commented May 2, 2025

It also shows that Luke was the author..? I don't think you want that.

There's also unrelated changes in the commit. Did you end up squashing Luke's commits into yours?

In the commit message, yes.

But it also shows that Luke was the author..? I don't think you want that.

There's also unrelated changes in the commit. Did you end up squashing Luke's commits into yours?

@jsquyres
Copy link
Member

jsquyres commented May 2, 2025

To be clear: your commit message currently shows this:

Create Connectivity.java and be able to compile/run java files

Signed-off-by: vdhyasani17 vasi.dhyasani@gmail.com

Implement the code for Connectivity.java

Add comments to explain the functionality

Signed-off-by: vdhyasani17 vasi.dhyasani@gmail.com

Make communication non-blocking by using iSend and iRecv

Fix comment semantics and structure

Add -v verbose check

Signed-off-by: vdhyasani17 vasi.dhyasani@gmail.com

Change nonblocking iSend/iRecv to sendRecv operation

Signed-off-by: vdhyasani17 vasi.dhyasani@gmail.com

The commit also contains changes for coll/han and coll/tuned. I think that those changes were included by mistake, and somehow squashed into your commit.

Your commit should just for for this Java change, and the commit message can be just a single description of your Java example program.

@vdhyasani17
Copy link
Author

Ok, so I should just have one commit message (not a combination of commits) that summarizes what I've been doing, and change the author to me?

@jsquyres
Copy link
Member

jsquyres commented May 2, 2025

Ok, so I should just have one commit message (not a combination of commits) that summarizes what I've been doing, and change the author to me?

Correct -- and make sure to remove the coll/tuned coll/han changes; this commit should just be the Java example. Squashing it down to one commit means that there's just one message for the git history; so you can just describe the end state of that commit (i.e., adding this Java example program).

Oh, I just realized: you need to add this example to the examples/Makefile, too, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants