Skip to content

Conversation

@jsquyres
Copy link
Member

@jsquyres jsquyres commented Jan 9, 2019

Valgrind warns that *newtype is uninitialized when calling from
Fortran as e.g.

    use mpi
    integer :: t, err
    call MPI_Type_create_f90_integer(5, t, err)

Since newtype is intent(out), this should not happen. There is
no reason to convert the type using PMPI_Type_f2c, only to over-
write it immediately afterwards. The other type_create_* functions
did not convert newtype.

The valgrind warnings:

==28441== Conditional jump or move depends on uninitialised value(s)
==28441==    at 0x581B555: PMPI_Type_f2c (in [...]/lib/libmpi.so.0.0.0)
==28441==    by 0x4E87AB7: MPI_TYPE_CREATE_F90_INTEGER (in [...]/lib/libmpi_mpifh.so.0.0.0)
==28441==    by 0x400BA1: MAIN__ (in [...])
==28441==    by 0x400C46: main (in [...])
==28441==
==28441== Conditional jump or move depends on uninitialised value(s)
==28441==    at 0x581B563: PMPI_Type_f2c (in [...]/lib/libmpi.so.0.0.0)
==28441==    by 0x4E87AB7: MPI_TYPE_CREATE_F90_INTEGER (in [...]/lib/libmpi_mpifh.so.0.0.0)
==28441==    by 0x400BA1: MAIN__ (in [..])
==28441==    by 0x400C46: main (in [...])
==28441==
==28441== Use of uninitialised value of size 8
==28441==    at 0x581B577: PMPI_Type_f2c (in [...]/lib/libmpi.so.0.0.0)
==28441==    by 0x4E87AB7: MPI_TYPE_CREATE_F90_INTEGER (in [...]/lib/libmpi_mpifh.so.0.0.0)
==28441==    by 0x400BA1: MAIN__ (in [...])
==28441==    by 0x400C46: main (in [...])
==28441==

Signed-off-by: Risto Toijala risto.toijala@gmail.com
(cherry picked from commit f14a0f4)

Refs #6254

Valgrind warns that *newtype is uninitialized when calling from
Fortran as e.g.
    use mpi
    integer :: t, err
    call MPI_Type_create_f90_integer(5, t, err)

Since newtype is intent(out), this should not happen. There is
no reason to convert the type using PMPI_Type_f2c, only to over-
write it immediately afterwards. The other type_create_* functions
did not convert newtype.

The valgrind warnings:
==28441== Conditional jump or move depends on uninitialised value(s)
==28441==    at 0x581B555: PMPI_Type_f2c (in [...]/lib/libmpi.so.0.0.0)
==28441==    by 0x4E87AB7: MPI_TYPE_CREATE_F90_INTEGER (in [...]/lib/libmpi_mpifh.so.0.0.0)
==28441==    by 0x400BA1: MAIN__ (in [...])
==28441==    by 0x400C46: main (in [...])
==28441==
==28441== Conditional jump or move depends on uninitialised value(s)
==28441==    at 0x581B563: PMPI_Type_f2c (in [...]/lib/libmpi.so.0.0.0)
==28441==    by 0x4E87AB7: MPI_TYPE_CREATE_F90_INTEGER (in [...]/lib/libmpi_mpifh.so.0.0.0)
==28441==    by 0x400BA1: MAIN__ (in [..])
==28441==    by 0x400C46: main (in [...])
==28441==
==28441== Use of uninitialised value of size 8
==28441==    at 0x581B577: PMPI_Type_f2c (in [...]/lib/libmpi.so.0.0.0)
==28441==    by 0x4E87AB7: MPI_TYPE_CREATE_F90_INTEGER (in [...]/lib/libmpi_mpifh.so.0.0.0)
==28441==    by 0x400BA1: MAIN__ (in [...])
==28441==    by 0x400C46: main (in [...])
==28441==

Signed-off-by: Risto Toijala <risto.toijala@gmail.com>
(cherry picked from commit f14a0f4)
@jsquyres jsquyres added this to the v4.0.1 milestone Jan 9, 2019
@jsquyres jsquyres requested review from gpaulsen and hppritcha January 9, 2019 15:25
@jsquyres
Copy link
Member Author

jsquyres commented Jan 9, 2019

@hppritcha @gpaulsen This patch was submitted by @rtoijala; I reviewed it and created the PR, so github won't let me mark it as reviewed.

Copy link
Member

@bosilca bosilca left a comment

Choose a reason for hiding this comment

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

Indeed, looking for the f2c translation on a not-yet-created datatype is begging for troubles.

@jsquyres
Copy link
Member Author

jsquyres commented Jan 9, 2019

Thanks @bosilca -- can you approve #6262 and #6261? (the v3.1.x and v3.0.x versions of this same PR)

@ibm-ompi
Copy link

ibm-ompi commented Jan 9, 2019

The IBM CI (GNU Compiler) build failed! Please review the log, linked below.

Gist: https://gist.github.com/ibm-ompi/88b480fb98dfd2bdac939f023e1f8fe6

@ibm-ompi
Copy link

ibm-ompi commented Jan 9, 2019

The IBM CI (XL Compiler) build failed! Please review the log, linked below.

Gist: https://gist.github.com/ibm-ompi/88b480fb98dfd2bdac939f023e1f8fe6

@hppritcha
Copy link
Member

bot:ibm:retest

probably futile but worth a shot

@hppritcha
Copy link
Member

@jjhursey could you check what's going on with IBM CI? Thanks.

@hppritcha hppritcha added the NEWS label Jan 13, 2019
@hppritcha hppritcha merged commit c9764f6 into open-mpi:v4.0.x Jan 13, 2019
@jsquyres jsquyres deleted the pr/v4.0.x/minor-fortran-valgrind-fix branch September 25, 2019 19:12
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.

5 participants