FLAMEGPU / FLAMEGPU2

FLAME GPU 2 is a GPU accelerated agent based modelling framework for CUDA C++ and Python
https://flamegpu.com
MIT License
107 stars 22 forks source link

Make GLM include directory portable. #1074

Closed Robadob closed 1 year ago

Robadob commented 1 year ago

Closes #1001

Robadob commented 1 year ago

All tests ran using `--gtest_filter=glm`, With Windows/Debug/GLM=ON

C, Without using environment var

[----------] Global test environment tear-down
[==========] 34 tests from 24 test suites ran. (270287 ms total)
[  PASSED  ] 34 tests.

C, after deleting tmp/flamegpu/jitifycache and SET GLM_INC_DIR=c:/windows.

[----------] 2 tests from DeviceRTCAPITest
[ RUN      ] DeviceRTCAPITest.AgentFunction_array_get_glm
C:\Users\Robert\fgpu2\fgpu2\src\flamegpu\detail\JitifyCache.cu(235): Error environment variable GLM_INC_DIR (c:/windows) does not contain glm/glm.hpp. Please correct this environment variable.

C, after SET GLM_INC_DIR=C:\Users\Robert\fgpu2\fgpu2\build\_deps\glm-src2 (renamed dir to be sure it wasn't cheating).

[----------] Global test environment tear-down
[==========] 34 tests from 24 test suites ran. (271615 ms total)
[  PASSED  ] 34 tests.
Robadob commented 1 year ago

Can't find any GLM tests in python test suite (would explain pyflamegpu.GLM) not being a thing.

Doesn't appear SWIG has GLM mappings setup either (did this get left on hold because of the Jitify slow compilation?). Regardless, the current changes should be appropriate, as it can still be used within RTC without being directly used in Python.

Robadob commented 1 year ago

Not sure the warning on module import is a good addition either. importing a python module should be quiet IMO.

Line 6 of the same file, there's already a warning for the FLAMEGPU inc dir version, I just copied similar pattern.

Otherwise good suggestions, will apply later in the week when I'm back on proper FGPU stuff. GLM + py is still a bit experimental.

ptheywood commented 1 year ago

Line 6 of the same file, there's already a warning for the FLAMEGPU inc dir version, I just copied similar pattern.

That's fair (and I'd prolly lean towards getting rid of that too to be honest, but can be a future thing)