Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions libmpdata++-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ if(HDF5_FOUND)
if (status EQUAL 0)
message(FATAL_ERROR "${pfx}: compilation failed\n status: ${status}\n copy file error: ${copy_error}\n output: ${error}")
endif()
message(STATUS "${msg} - compilation OK")
message(STATUS "${msg}: compilation OK, status: ${status}")
# message(STATUS "${msg} - compilation OK")
Comment on lines +264 to +265
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

try_compile() sets the result variable to a boolean (e.g., TRUE/FALSE), so printing status here is likely not very informative and may confuse users expecting an exit code. Consider either omitting status from the success message or printing more useful details (e.g., compiler output only on failure) while keeping status as a boolean check.

Suggested change
message(STATUS "${msg}: compilation OK, status: ${status}")
# message(STATUS "${msg} - compilation OK")
message(STATUS "${msg} - compilation OK")
# message(STATUS "${msg}: compilation OK, status: ${status}")

Copilot uses AI. Check for mistakes.

execute_process(
COMMAND "mpiexec" "-np" "1" "./test_hdf5_mpi"
Expand All @@ -287,9 +288,10 @@ if(HDF5_FOUND)
ERROR_VARIABLE error
)
if (NOT status EQUAL 0)
message(FATAL_ERROR "TODO: ${status}\n ${error}")
message(WARNING "mpirun --np 2 failed, this could be normal e.g. if compilation is done in a job that has only 1 process allocated: ${status}\n ${error}")
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

The warning message hard-codes mpirun --np 2, but the command being executed is ${libmpdataxx_MPIRUN} -np 2 .... To avoid misleading diagnostics (and the --np vs -np mismatch), include ${libmpdataxx_MPIRUN} and the actual args in the warning text.

Suggested change
message(WARNING "mpirun --np 2 failed, this could be normal e.g. if compilation is done in a job that has only 1 process allocated: ${status}\n ${error}")
message(WARNING "${libmpdataxx_MPIRUN} -np 2 ./test_hdf5_mpi failed, this could be normal e.g. if compilation is done in a job that has only 1 process allocated: ${status}\n ${error}")

Copilot uses AI. Check for mistakes.
else()
message(STATUS "${msg} - mpirun execution OK")
endif()
message(STATUS "${msg} - mpirun execution OK")

unset(status)
unset(pfx)
Expand Down
Loading