Dear all,

I'm wondering how to configure CTest to run a memory analysis with
valgrind for parallel tests (distributed memory - MPI).

Context is the following:
- CMake/CTest 2.8.0
- Parallel execution of test is given in CMakeLists:
    add_test(${TName} ${submit_test_command} ${submit_test_args}
             ${TEST_INPUT_FILE})
    where:
        - TName is test name
        - submit_test_command is mpirun
        - submit_test_args is e.g.: '-np 4 executable_name'
        - TEST_INPUT_FILE is the data_filename
- In ctest script launched with ctest -S:
    - set(CTEST_MEMORYCHECK_COMMAND "/usr/bin/valgrind")
    - set(CTEST_MEMORYCHECK_COMMAND_OPTIONS
            "--log-file=vlogs --leak-check=full --xml=yes")
    - In CTEST_COMMAND, there is a 'qsub -sync y submit_ctest_nightly.job'
- In submit_ctest_nightly.job':
    - SGE configuration commands + 'ctest -D NightlyMemoryCheck'

Problem is that the final command call should be of the form:
mpirun -np 4 ${set(CTEST_MEMORYCHECK_COMMAND}
${set(CTEST_MEMORYCHECK_COMMAND_OPTIONS} executable_name ${TEST_INPUT_FILE}

and not:
${set(CTEST_MEMORYCHECK_COMMAND}
${set(CTEST_MEMORYCHECK_COMMAND_OPTIONS} mpirun -np 4 executable_name
${TEST_INPUT_FILE}

Is this feasible ?

Thank you very much for your help,

Olivier

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to