Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intel fortran build error: intrinsic assignment error #9

Open
glemieux opened this issue Apr 10, 2021 · 3 comments
Open

Intel fortran build error: intrinsic assignment error #9

glemieux opened this issue Apr 10, 2021 · 3 comments

Comments

@glemieux
Copy link

glemieux commented Apr 10, 2021

When building a program with fhash as a dependency using fpm specifying ifort as the compiler I received the following error:

$ fpm build --compiler ifort
 + ifort -c app/main.f90 -warn all -check:all:noarg_temp_created -error-limit 1 -O0 -g -assume byterecl -traceback -module build/ifort_BFE5DBA90E3838BC/mapred_project -I build/ifort_BFE5DBA90E3838BC/mapred_project -o build/ifort_BFE5DBA90E3838BC/mapred_project/app_main.f90.o
 + ifort -c build/dependencies/fhash/src/fhash_data_container.f90 -warn all -check:all:noarg_temp_created -error-limit 1 -O0 -g -assume byterecl -traceback -module build/ifort_BFE5DBA90E3838BC/mapred_project -I build/ifort_BFE5DBA90E3838BC/mapred_project -o build/ifort_BFE5DBA90E3838BC/mapred_project/build_dependencies_fhash_src_fhash_data_container.f90.o
build/dependencies/fhash/src/fhash_data_container.f90(96): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic.   [RAW]
      raw = data
------^
build/dependencies/fhash/src/fhash_data_container.f90(244): catastrophic error: Too many errors, exiting
compilation aborted for build/dependencies/fhash/src/fhash_data_container.f90 (code 1)
 Command failed
ERROR STOP 

Error termination. Backtrace:
#0  0x55ccb6e5409c in ???
#1  0x55ccb6e622bb in ???
#2  0x55ccb6e625ac in ???
#3  0x2ba3f5588e8b in GOMP_parallel
	at /home/conda/feedstock_root/build_artifacts/ctng-compilers_1610729750655/work/.build/x86_64-conda-linux-gnu/src/gcc/libgomp/parallel.c:171
#4  0x55ccb6e8a65f in ???
#5  0x55ccb6e97142 in ???
#6  0x55ccb6e2613f in ???
#7  0x2ba3f58fc554 in ???
#8  0x55ccb6e261b8 in ???
@LKedward
Copy link
Owner

Thanks for reporting @glemieux; looks like I'm doing something non-standard here. I didn't get the same error as you reported, but I've put together a fix (see #10) that now seems to work with ifort 2021.1.2. Which version of ifort are you running?

If you get a chance, would you be able to trial the proposed fix in your fpm project:

[dependencies]
fhash = { git = "https://github.com/LKedward/fhash.git" , branch="fix-ambig-generic"}

@glemieux
Copy link
Author

Thanks for taking a look at this. I'm running ifort 17.0.1 20161005. The error still seems to be persisting, unfortunately.

@LKedward
Copy link
Owner

Thanks, it looks like assignment to an allocatable polymorphic variable is not supported in your version of ifort (support was added in v18.0).

I can get the library compiling with ifort 17.0.1 if I replace these assignment statements with explicit allocation statements, unfortunately I then run into strange runtime errors with the tests and demos which I can only put down to a compiler bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants