Missing vtkmdiympi_nompi.dll

Hello, since this is quite a different issue then my build issues I wanted to open a new topic for this.

When I compile VTK (newest master branch and updated submodule vtkm) with VTK_GROUP_ENABLE_Qt, VTK_MODULE_ENABLE_VTK_AcceleratorsVTKmCore and VTK_MODULE_ENABLE_VTK_AcceleratorsVTKmFilters enabled I can successfully install, but I can’t execute the most simple programs. Note that I didn’t change any other options in CMake, especially not any MPI features.

This is the error im getting:
grafik

This roughly translates to “Code execution cannot be continued, because vtkmdiympi_nompi.dll was not found.” Note

Minimal example:
CMakeLists.txt:

cmake_minimum_required(VERSION 3.15)

set(PROJECT_NAME minimal)
project(${PROJECT_NAME} LANGUAGES CXX)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(VTK REQUIRED)

include_directories(${VTK_INCLUDE_DIRS})

add_executable(${PROJECT_NAME} main.cpp)
target_link_libraries(${PROJECT_NAME} ${VTK_LIBRARIES})

main.cpp:

#include <vtkImageData.h>
#include <vtkMetaImageReader.h>
#include <vtkNew.h>
#include <vtkmContour.h>

int main(int argc, char* argv[]) {
    vtkNew<vtkMetaImageReader> reader;
    reader->SetFileName("D:/Studium/Abschlussarbeit/minimal/Lobster_u8_301_324_56_LE.mhd");
    reader->Update();

    vtkNew<vtkmContour> contour; // When I remove this line (the include can stay) I don't get the error.

    return 0;
}

Note the comment which indicated the critical line. Will I have to manually convert to vtkm, execute the contour algorithm and then back? Or is there a known solution to this bug? When building of of the release branches (especially vtk-m) this is not a issue anymore. However I depend on some fixes from the newes commits.

Thankful for any help.
Best regards,
David

Hello, David,

CMake doesn’t configure any runtime environment automatically. You need to add, for example, the directory where the missing DLLs are to the PATH environment variable (Windows). You can also create a deploy directory and throw the EXE and all the required DLLs there and run your program from there. Also, if you don’t want (or can’t) to make changes to your environment, you can create a .BAT file with a set local statement to define a local, one-shot PATH variable.

regards,

Paulo

I fixed this a few weeks ago. DIY did not have proper control over the build and install location of the library in question. It is now placed in the right place automatically.