fpm sets -assume nounderscore if the --release flag is provided, but does not set this option for the default debug build. This means LAPACK / BLAS routines can only be called with Intel in debug mode right now.
+ ifort -fp-model precise -pc 64 -align all -error-limit 1 -reentrancy threaded -nogen-interfaces -assume byterecl -assume nounderscore -module build/ifort_release/multicharge -I build/ifort_release/multicharge build/ifort_release/multicharge/app_main.f90.o build/ifort_release/multicharge/libmulticharge.a -llapack -lblas -llapack -lblas -o build/ifort_release/app/multicharge
ld: build/ifort_release/multicharge/libmulticharge.a(src_multicharge_blas.f90.o): in function `multicharge_blas_mp_mchrg_sgemv312':
blas.f90:(.text+0x38a): undefined reference to `sgemv'
...
Is this because you're not using a BIND(C) interface or does that not work for you?
I never needed a bind(C) for interfacing with Fortran 77 APIs so far, also the linking works with Intel in debug but not with Intel in release, we shouldn't change the calling convention from one build mode to another.
Using bind(C) to solve the issue for Intel release would break it for Intel debug and GCC.
I never needed a
bind(C)for interfacing with Fortran 77 APIs so far,
Apologies, ignore my comment, wasn't thinking
we shouldn't change the calling convention from one build mode to another
I agree, it looks like -assume nounderscore should be removed from ~in the~ release flags ~as well~.
Edit: wrong way around.
I believe --assume nounderscore should be removed from --release version. There were all kinds of issues with underscores with Intel and other vendors long ago; but to my knowledge they were resolved. I built a mixed ifort/icc fpm project (M_draw module from GPF) with no issues without it. Perhaps a bigger issue is that the Fortran fpm(1) assumes the compiler name given can handle both Fortran and C, or at least "co-compiler" C. GNU and IBM and a few others do that; but Intel does not so you have to create a shell script called ifort that calls icc if the input file ends in .c right now and put that in your path before the ifort command and call the ifort command in the script with a full pathname, which is an ugly kludge when building mixed F/C projects right now. If anyone requires "-assume nounderscore" let me know.
Most helpful comment
I believe --assume nounderscore should be removed from --release version. There were all kinds of issues with underscores with Intel and other vendors long ago; but to my knowledge they were resolved. I built a mixed ifort/icc fpm project (M_draw module from GPF) with no issues without it. Perhaps a bigger issue is that the Fortran fpm(1) assumes the compiler name given can handle both Fortran and C, or at least "co-compiler" C. GNU and IBM and a few others do that; but Intel does not so you have to create a shell script called ifort that calls icc if the input file ends in .c right now and put that in your path before the ifort command and call the ifort command in the script with a full pathname, which is an ugly kludge when building mixed F/C projects right now. If anyone requires "-assume nounderscore" let me know.