Compiling ADDA with the root account not available

27 views
Skip to first unread message

Kamil Mróz

unread,
Sep 24, 2024, 12:47:59 PM9/24/24
to ADDA questions and answers
Hi,
I tried to compile ADDA with with no root account.  In order to satisfy the dependencies, I build a miniforge environment under my home directory, and I tried to install into it the packages that provide the equivalent functionality to the Ubuntu packages, listed on the compilation page. It went  smoothly as their names were mostly matching the Ubuntu packages names: 
 fftw, openmpi, gcc, gfortran, ocl-icd-system, clfft 

mamba install gcc gfortran fftw openmpi ocl-icd-system clfft -c conda-forge

However, when I try to "make ocl" I get the following error:
make[1]: *** [cmplx.o] Error 1
make[1]: *** [comm.o] Error 1
In file included from ../calculator.c:26:
../oclcore.h: At top level:
../oclcore.h:30:17: fatal error: CL/cl.h: No such file or directory
   30 | #       include <CL/cl.h>
      |                 ^~~~~~~~~
compilation terminated.

This can be solved by:
export C_INCLUDE_PATH=$C_INCLUDE_PATH:$CONDA_PREFIX/include:$CONDA_PREFIX/envs/adda/include

But then I am left with a list of errors like this:
make[1]: *** [CalculateE.o] Error 1
/home/users/km357/miniforge3/envs/adda/x86_64-conda-linux-gnu/sysroot/usr/include/bits/math-finite.h:280:10: error: implicit declaration of function 'lgammal_r'; did you mean 'lgammal'? [-Wimplicit-function-declaration]
  280 |   return lgammal_r (__d, &__local_signgam);
      |          ^~~~~~~~~
      |          lgammal

Any idea how to resolve this issue?
gcc version 14.1.0 (conda-forge gcc 14.1.0-1)

Kamil




Maxim Yurkin

unread,
Sep 25, 2024, 12:14:28 PM9/25/24
to adda-d...@googlegroups.com, Kamil Mróz
Dear Kamil,

First, I assume that you use Ubuntu (with miniforge) and seq and mpi versions compile fine, right?

Second, you seem to be having a problem with system headers. It may be the case that the compiler includes headers that are not designed for this language standard (C99). So I suggest to check the C_INCLUDE_PATH that you use. It seems to be very broad, potentially including many system headers that should be instead handled by the compiler itself. I am not sure about ocl-icd-system package that you use, but it is possible that it doesn't include the OpenCL headers file (as in ocl-icd-opencl-dev or opencl-headers for Ubuntu). If that is the case, you can get them manually as described at https://github.com/adda-team/adda/wiki/OpenCL#unix . The latter also describes, how to set the include paths - in any case (whether you already have OpenCL headers or not) try to make this paths more specific without including anything that is not necessary. You can also manually check the include paths based on $CONDA_PREFIX to see what is actually located there.

That's all my ideas for now.

Maxim.

P.S. This answer has been forwarded to your e-mail address for your convenience. However, if you want to continue the discussion please reply to the group's e-mail. You are also advised to check the corresponding discussion thread at http://groups.google.com/group/adda-discuss and/or subscribe to it to receive automatic notifications, since other answers/comments will not be necessarily forwarded to your e-mail.
--
You received this message because you are subscribed to the Google Groups "ADDA questions and answers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adda-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adda-discuss/5c7f1299-4815-4a6a-9494-18ee72acf3dfn%40googlegroups.com.


Reply all
Reply to author
Forward
0 new messages