-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Hi all,
I'm encountering an issue when running Environ compiled with AOCC/AOCL on both my HPC and another AMD-based machine. While the code compiles successfully, execution fails with the following runtime error:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Error in routine density_of_function (1):
Not implemented
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
This can be traced back to function.f90 in the src directory. I suspect the problem is related to Fortran polymorphism. Specifically, I believe that
type-bound procedures or deferred bindings are not being correctly handled by AOCC's Fortran compiler (likely flang), especially since:
The same code runs fine when compiled with Intel compilers on the same systems. The issue occurs only when using AOCC. It appears the method dispatch isn't resolving properly at runtime.
What I've tried:
- Compiling with -O0 to eliminate optimization-related issues.
- Using -fno-stack-arrays.
- Modifying Environ to avoid fatal errors, which confirmed the error is due to unresolved dynamic dispatch from polymorphic types.
I’ve attached the build script (AMD.txt) that shows how I'm compiling both Environ and Quantum ESPRESSO. If there's something wrong in how the compiler flags or environment is configured, I'd appreciate any insight.
Any help or suggestions would be greatly appreciated!
Best regards,
Brad