scalapack icon indicating copy to clipboard operation
scalapack copied to clipboard

Compilation issue - missing function definitions?

Open dtaller opened this issue 1 year ago • 8 comments

Hello,

I am attempting to compile scalapack with intel oneapi 2022 compiler, with gcc headers from gcc 10.2

When compiling, I keep getting errors along the lines of:

error: call to undeclared function 'BI_ivmcopy'; ISO C99 and later do not support implicit function declarations

My initial solution is to add function definitions to Bdef.h . This is tedious however because similar errors occur for other functions.

How would you suggest that I fix this? If you do not have any other ideas I can continue to add more function definitions to Bdef.h and I think that it will compile eventually, but I appreciate your thoughts as to a different solution.

dtaller avatar Jul 11 '23 23:07 dtaller

Add the flag -Wno-error=implicit-function-declaration can't remember if it has plural s or not. This should work AFAIK, can't test since I am not at my comp.

zerothi avatar Jul 12 '23 04:07 zerothi

Thanks, @zerothi ! I appreciate your help. Your suggestion got me past this type of error, but unfortunately some others came up.

I ended up forcing the C standard to 90 (using -DCMAKE_C_STANDARD=90 but there are other ways to do this). That seems to have allowed me to build. For my application this is probably easiest, but yes you are right I could probably disable this and other errors in the way you suggested also.

dtaller avatar Jul 12 '23 16:07 dtaller

If I recall I managed to build it using that flag, but I was using make files. Perhaps if you show the errors we could help /figure out what to do

zerothi avatar Jul 12 '23 16:07 zerothi

Hello. I just looked through my log files. Actually I think that you are right, your fix worked for scalapack and I was seeing another error for a different package (not scalapack) that my project builds after scalapack. I think that your fix also works.

Thanks and sorry for the trouble.

dtaller avatar Jul 12 '23 16:07 dtaller

Great, I still think the definitions should be made in the repo, so let's keep this issue open.

zerothi avatar Jul 12 '23 17:07 zerothi

Thanks for the workaround. With the following changes to SLmake.inc.example

   CDEFS         = -DAdd_

   FC            = mpifort
   CC            = mpicc
   CCFLAGS       = -O3 -diag-disable=10441 -Wno-error=implicit-function-declaration

   BLASLIB       = -L/opt/intel/oneapi/mkl/2023.2.0/lib -I/opt/intel/oneapi/mkl/2023.2.0/include -lmkl_intel_lp64 -lmkl_sequential -lmkl_core
   LAPACKLIB     =
   LIBS          = $(LAPACKLIB) $(BLASLIB)

I could compile with Intel OneAPI 2023.2.0

  • icc version 2021.10.0 (deprecated, therefore -diag-disable=10441)
  • ifort version 2021.10.0 on Intel MacOS 13.5 (Xcode 14.3.1).

(Note that this issue and Issue #31 comment on the same problem.)

orbeckst avatar Sep 05 '23 02:09 orbeckst

Clang 15 and later now have this enabled by default into an error.

fxcoudert avatar Oct 03 '23 10:10 fxcoudert

Effectively a duplicate of #31

eli-schwartz avatar Mar 05 '24 20:03 eli-schwartz