Compiling and Running the gmy tool
Hello, I recently found out about this project and I would like to say thank you for the great work! Some background I'm currently trying to get the GPU HemeLB project going with my own stl files. I got everything setup and I'm currently trying to setup the geometry tool to convert my stl files to gmy files, but I'm stuck.
Issue:
- I tried following the steps from the geometry tool's documentation (i.e. I set up the gmy-tool environment) but when running
pip install '.[gui]'
I got the following issue:
- Since vmtk is already in my package list I just commented out the vmtk requirement in setup.py
- After compiling and running hlb-gmy-gui I get this mystical OpenGL VTK issue and segmentation fault:
- Might also be useful to say that I haven't compiled the hemelb project since I have the HemePureGPU already compiled and I'm currently only compiling the geometry tool I hope you can help me out here and thank you in advance
Is the VMTK package visible to pip? Sometimes conda installed packages do not show up there. Do a pip list to check. If it's not showing, you can bodge this with the following bash function (make_dist_info vmtk in this case)
function make_dist_info() {
NAME=$1
if pip list --format json | jq -e ".[] | select (.name == \"$NAME\" )" > /dev/null; then
echo "pip already knows about $NAME"
return 0
fi
VERSION=$(conda list --json $NAME | jq -r -e '.[].version')
if [ $? -ne 0 ]; then
echo "Couldn't get version for $NAME"
exit 1
fi
SITE_PACKAGES_DIR=$(python -c 'import sysconfig; print(sysconfig.get_path("platlib"))')
if [ ! -d $SITE_PACKAGES_DIR/$NAME ]; then
echo "No package dir '$SITE_PACKAGES_DIR/$NAME'"
exit 1
fi
distinfo=$SITE_PACKAGES_DIR/$NAME-$VERSION.dist-info
mkdir -p $distinfo
cat > $distinfo/METADATA <<EOF
Metadata-Version: 2.1
Name: $NAME
Version: $VERSION
EOF
}
Regarding the segfault, it looks like you are maybe missing some open gl package(s) that VTK is expecting? Was your VTK installed by conda? If so, I suggest asking there. Perhaps you can install OS packages that provide the missing modules in the error? Which OS etc are you using?
Hello, Were you able to resolve the issue @amroabuzer? I am having the same error, I have tried uninstalling and reinstalling the VTK and installed the OS packages but still get the following error:
So we need to narrow down where your problems are.
First, can your VTK open a render window correctly? (compile and run any VTK program that does this)
second, can you open a render window from python? (In an interactive session, import VTK, read eg one of your STL files, create a render window, connect the output of your vtkSTLReader, and call interact a see VTK examples)
third, can vmtk open a window? (Try vmtksurfaceviewer with one of your STL files as an input)
I've had no response, so closing. Please reopen if this is an issue for you.