Skip to content

oshmem/fortran: fix warning mesages #1883

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

Merged
merged 1 commit into from
Jul 22, 2016

Conversation

karasevb
Copy link
Member

@karasevb karasevb commented Jul 19, 2016

fix warning:

pshmem_put_f.c: In function 'shmem_put_f':
pshmem_put_f.c:36:5: warning: passing argument 2 of 'mca_spml.spml_put' makes integer from pointer without a cast [enabled by default]
     MCA_SPML_CALL(put(FPTR_2_VOID_PTR(target),
     ^
pshmem_put_f.c:36:5: note: expected 'size_t' but argument is of type 'void *'
pshmem_put_f.c:36:5: warning: passing argument 3 of 'mca_spml.spml_put' makes pointer from integer
without a cast [enabled by default]
pshmem_put_f.c:36:5: note: expected 'void *' but argument is of type 'int'

Please review this PR

@jsquyres
Copy link
Member

@karasevb Github pro tip: enclose multi-line verbatim blocks with 3 tick marks. E.g.:

pshmem_put_f.c: In function 'shmem_put_f':
pshmem_put_f.c:36:5: warning: passing argument 2 of 'mca_spml.spml_put' makes integer from pointer without a cast [enabled by default]
MCA_SPML_CALL(put(FPTR_2_VOID_PTR(target),
^
pshmem_put_f.c:36:5: note: expected 'size_t' but argument is of type 'void *'
pshmem_put_f.c:36:5: warning: passing argument 3 of 'mca_spml.spml_put' makes pointer from integer without a cast [enabled by default]
pshmem_put_f.c:36:5: note: expected 'void *' but argument is of type 'int'

If you're putting code in the verbatim block, you can even tell Github to do syntax hilighting -- see https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code-and-syntax-highlighting.

@artpol84
Copy link
Contributor

artpol84 commented Jul 20, 2016

@rhc54 please check

@karasevb
Copy link
Member Author

Problem was introduced in #1867

@karasevb karasevb force-pushed the fix_mca_spml_call branch 2 times, most recently from 930f404 to 30a704e Compare July 20, 2016 10:11
@karasevb
Copy link
Member Author

@jladd-mlnx @miked-mellanox @hpcraink please, review.

@lanl-ompi
Copy link
Contributor

Test FAILed.

@jsquyres
Copy link
Member

What is the *8 for?

@Di0gen
Copy link

Di0gen commented Jul 20, 2016

bot:mellanox:retest

1 similar comment
@Di0gen
Copy link

Di0gen commented Jul 20, 2016

bot:mellanox:retest

@karasevb karasevb force-pushed the fix_mca_spml_call branch from 30a704e to cf6fe0b Compare July 20, 2016 11:36
@lanl-ompi
Copy link
Contributor

Test FAILed.

@karasevb
Copy link
Member Author

@jsquyres
shmem_put considers 64-bit values and the size calculation is performed transparently.
MCA_SPML_CALL assumes that you provide the size in bytes so you need to x8 here like in shmem_put64_f:
https://github.com/open-mpi/ompi/blob/master/oshmem/shmem/fortran/shmem_put64_f.c#L38

@lanl-ompi
Copy link
Contributor

Test FAILed.

@hppritcha
Copy link
Member

Is this targeting 2.0.1 release?

@artpol84
Copy link
Contributor

Depends on whether #1867 was PR'd to release or not. I'll check later.

@jsquyres
Copy link
Member

@karasevb Cool; thanks for the explanation.

@artpol84
Copy link
Contributor

@hppritcha as it is for now #1867 wasn't cherry-picked to release:
https://github.com/open-mpi/ompi-release/blob/v2.x/oshmem/shmem/fortran/shmem_put_f.c#L35

I didn't found the PR pending. If we do want that @karasevb can take care of that for both PR's. I guess we want that for consistency. @jladd-mlnx @miked-mellanox what do you think?

@artpol84
Copy link
Contributor

bot:mellanox:retest

@mike-dubman
Copy link
Member

@artpol84 - agree, better have in sync for consistency.

@artpol84
Copy link
Contributor

Ok @karasevb will PR both of them once this is merged.

@artpol84
Copy link
Contributor

bot:mellanox:retest

@hppritcha
Copy link
Member

checking the lanl bot
bot:lanl:retest

@artpol84
Copy link
Contributor

bot:mellanox:retest

@artpol84
Copy link
Contributor

Bot:retest

@karasevb karasevb force-pushed the fix_mca_spml_call branch from cf6fe0b to 6237d04 Compare July 22, 2016 05:50
@karasevb
Copy link
Member Author

@igor-ivanov please review

@igor-ivanov
Copy link
Member

shmem_put() and shmem_get() are part of old API that is supported to avoid issue with old applications.
All old function can be found at https://github.com/open-mpi/ompi/blob/master/oshmem/include/shmem-compat.h

both functions should operate with long type.

Change looks reasonable. Please consider correct formatting (you need to use spaces instead of tab).

@artpol84
Copy link
Contributor

@igor-ivanov thank you!
@karasevb fix tabs please!

@karasevb karasevb force-pushed the fix_mca_spml_call branch from 6237d04 to fa448c3 Compare July 22, 2016 08:37
@karasevb karasevb force-pushed the fix_mca_spml_call branch 2 times, most recently from 1dab61d to 033b2ca Compare July 22, 2016 09:53
@karasevb karasevb force-pushed the fix_mca_spml_call branch from 033b2ca to 49b6709 Compare July 22, 2016 09:54
@artpol84
Copy link
Contributor

@karasevb thank you!
Please PR to release along with @hpcraink PR

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.

8 participants