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

Compilation issue - missing function definitions? #81

Open
dtaller opened this issue Jul 11, 2023 · 8 comments
Open

Compilation issue - missing function definitions? #81

dtaller opened this issue Jul 11, 2023 · 8 comments

Comments

@dtaller
Copy link

dtaller commented Jul 11, 2023

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.

@zerothi
Copy link
Contributor

zerothi commented Jul 12, 2023

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.

@dtaller
Copy link
Author

dtaller commented Jul 12, 2023

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.

@zerothi
Copy link
Contributor

zerothi commented Jul 12, 2023

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

@dtaller
Copy link
Author

dtaller commented Jul 12, 2023

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.

@zerothi
Copy link
Contributor

zerothi commented Jul 12, 2023

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

@orbeckst
Copy link

orbeckst commented Sep 5, 2023

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.)

@fxcoudert
Copy link

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

@eli-schwartz
Copy link

Effectively a duplicate of #31

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

5 participants