cancel
Showing results for 
Search instead for 
Did you mean: 

Server Gurus Discussions

zaikun
Adept I

AOCC 4.1 flang: "0: ALLOCATE: xxx bytes requested; not enough memory"

I am using Flang via AOCC 4.1.

Sometimes, I encounter an error saying "0: ALLOCATE: xxx bytes requested; not enough memory", even though the same code works well with the Classic Flang 15.0.3, nvfortran 23.7, gfortran, ifort, ifx, and nagfor.

Is it a known problem?

Those who are interested may have a look at
https://github.com/libprima/prima Suppose that your machine has AOCC 4.1 installed. Cloning this code and run

git checkout 54e66dd && cd fortran/examples/cobyla && make clean && make dtest
 
you will get
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o consts.o ../../common/consts.F90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o infos.o ../../common/infos.f90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o debug.o ../../common/debug.F90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o inf.o ../../common/inf.F90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o infnan.o ../../common/infnan.F90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o memory.o ../../common/memory.F90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o string.o ../../common/string.f90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o linalg.o ../../common/linalg.f90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o powalg.o ../../common/powalg.f90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o ratio.o ../../common/ratio.f90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o redrho.o ../../common/redrho.f90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o history.o ../../common/history.f90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o selectx.o ../../common/selectx.f90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o checkexit.o ../../common/checkexit.f90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o fprint.o ../../common/fprint.f90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o message.o ../../common/message.f90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o preproc.o ../../common/preproc.f90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o pintrf.o ../../common/pintrf.f90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o evaluate.o ../../common/evaluate.f90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o update.o ../../cobyla/update.f90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o initialize.o ../../cobyla/initialize.f90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o trustregion.o ../../cobyla/trustregion.f90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o geometry.o ../../cobyla/geometry.f90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o cobylb.o ../../cobyla/cobylb.f90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -c -o cobyla.o ../../cobyla/cobyla.f90
/opt/AMD/aocc-compiler-4.1.0/bin/flang -Wall -Wextra -std=f2018   -Mstandard -O3 -g -o dtest cobyla_example.f90 *.o
./dtest
0: ALLOCATE: 3932292011188551680 bytes requested; not enough memory
 

Sorry that I do not have a minimal working example. I just want to check whether anyone else has encountered the same problem. Thank you very much!

 
0 Likes
3 Replies
shrjoshi
Staff

Hello @zaikun 

Thank you for writing to Server Guru forum.
We are currently looking into the issue.
Will keep you updated on the same.

Thank you @shrjoshi for taking care of this. 

In case it is a bug of my code, thank you for telling me. 

0 Likes

Hello @zaikun 

Thank you for your patience.
We have verified and confirmed the above error exists with AOCC-4.1.0.
This issue is fixed in the latest AOCC-4.2 release [Available from Feb-27-2024].
Please let us know if building the application with AOCC-4.2 works for you.

0 Likes