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

bug in ctest macro #435

Open
tclune opened this issue Aug 11, 2023 · 1 comment
Open

bug in ctest macro #435

tclune opened this issue Aug 11, 2023 · 1 comment
Assignees

Comments

@tclune
Copy link
Member

tclune commented Aug 11, 2023

Reported by user:

One quick sanity check with add_pfunit_ctest.cmake though.

Line 137-140

It does a check on:
If (NOT MPIEXEC_NUMPROC_FLAG)

And then

If (PFUNIT_MPI_USE_MPIEXEC)
Set(MPIEXEC_EXECUTABLE ${PFUNIT_MPI_USE_MPIEXEC})

Should that “set” instead be

Set(MPIEXEC_NUMPROC_FLAG ${PFUNIT_MPI_USE_MPIEXEC_ NUMPROC_FLAG })

To match the else() just below on 141?

Else() # best guess
Set(MPIEXEC_NUMPROC_FLAG “-np”)

@mathomp4
Copy link
Collaborator

Yeah, this:

    if (NOT MPIEXEC_NUMPROC_FLAG)
      if (PFUNIT_MPI_USE_MPIEXEC)
        set(MPIEXEC_EXECUTABLE ${PFUNIT_MPI_USE_MPIEXEC})
      else() # best guess
        set(MPIEXEC_NUMPROC_FLAG "-np")
      endif()
    endif()

does look a bit wonky.

Probably should be:

    if (NOT MPIEXEC_NUMPROC_FLAG)
      if (PFUNIT_MPI_MPIEXEC_NUMPROC_FLAG)
        set(MPIEXEC_NUMPROC_FLAG ${PFUNIT_MPI_MPIEXEC_NUMPROC_FLAG})
      else() # best guess
        set(MPIEXEC_NUMPROC_FLAG "-np")
      endif()
    endif()

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

No branches or pull requests

2 participants