zer011b / fdtd3d

fdtd3d is an open source 1D, 2D, 3D FDTD electromagnetics solver with MPI, OpenMP and CUDA support for x64, ARM, ARM64, RISC-V, PowerPC architectures
GNU General Public License v2.0
119 stars 33 forks source link

The FieldPointValue type is undefined #192

Closed jiajiahub closed 5 months ago

jiajiahub commented 6 months ago

file: perf-test-parallel-grid.cpp and ParallelGridDynamic.cpp

zer011b commented 6 months ago

Please share your build commands

jiajiahub commented 6 months ago

cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=nvcc -DCMAKE_C_COMPILER=nvcc -DCUDA_ARCH_SM_TYPE=sm_80 -DPARALLEL_GRID=ON -DCUDA_ENABLED=ON -DPRINT_MESSAGE=ON -DSOLVER_DIM_MODES=ALL -DVALUE_TYPE=d -DCOMPLEX_FIELD_VALUES=ON ..

jiajiahub commented 6 months ago

Modified by CMakeLists: momessage (FATAL_ERROR "Debug CUDA builds with all dimension modes (ALL) are too heavy in terms of compilation time. Use specific dimension.")===>#message (FATAL_ERROR "Debug CUDA builds with all dimension modes (ALL) are too heavy in terms of compilation time. Use specific dimension.")

Comment this statement
zer011b commented 6 months ago

The FieldPointValue type is undefined

Please share full build log.

Comment this statement

This statement is there for a reason, because at least on older versions of nvcc compilation time was too long. You can use -DSOLVER_DIM_MODES=DIM3, for example, to build 3d mode only.

Also, passing both -DPARALLEL_GRID=ON and -DCUDA_ENABLED=ON means that you plan to use mpi + cuda, but note that this mode might be slower than simply using cuda when all data fits in gpu memory. For more details on such launch see https://github.com/zer011b/fdtd3d/blob/master/Docs/Launch.md.

jiajiahub commented 6 months ago

Thank you for answering my question.

zer011b commented 5 months ago

Feel free to reopen if you have any more question