Compilation Error: "beta" is ambiguous in Source/FerroX.cpp

#76 · open · 2 comments

View on GitHub ↗

gyulab

Dear FerroX Team, I'm running into a compilation error when trying to build the code. This issue appears to happen with both the GNU make and cmake build systems. Error Log (from cmake) The build fails with the following ambiguity error: [ 87%] Building CUDA object CMakeFiles/lib_3d.dir/Source/Plotfile.cpp.o [ 88%] Building CUDA object CMakeFiles/lib_3d.dir/Source/Input/GeometryProperties/GeometryProperties.cpp.o [ 89%] Building CUDA object CMakeFiles/lib_3d.dir/Source/Input/BoundaryConditions/BoundaryConditions.cpp.o ./FerroX/Source/FerroX.cpp(354): error: "beta" is ambiguous pp.get("beta", beta); ^ 1 error detected in the compilation of "./FerroX/Source/FerroX.cpp". make[2]: *** [CMakeFiles/lib_3d.dir/build.make:77: CMakeFiles/lib_3d.dir/Source/FerroX.cpp.o] Error 2 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:1187: CMakeFiles/lib_3d.dir/all] Error 2 make: *** [Makefile:146: all] Error 2 I have tried to modify the variable name or other environment settings, but none of them worked. I would like to inquire how I can address the issue. Thank you in advance for your assistance.

Comments

gyulab

Solved. I used FerroX::beta as a variable rather than beta for FerroX.cpp and TotalEnergyDensity.cpp. The build successfully works with this.

gyulab

After running the example file (mpirun -n 4 ./main3d.gnu.TPROF.MPI.CUDA.ex Exec/Examples/inputs_mfim_Noeb ) I get this error: Initializing AMReX (25.10-27-g2e583c208310-dirty)... For the non-CUDA version (OMP), the simulation works well. I believe the newest commit for GPU simulation is not working for now.