On 12/03/2019 10:35, Jakob Schiøtz wrote:


On 12 Mar 2019, at 10:25, Paul Melis <paul.me...@surfsara.nl> wrote:

You need to set CMAKE_C_COMPILER and CMAKE_CXX_COMPILER values to the full path to the compilers, 
not just "icc" and "icpc". CMake's error is pretty clear about it.

Dear Paul,

Thanks for your suggestion, but are you sure?

It is the easybuild itself that sets them to icc and icpc, not my easyconfig.  
And the error message says (my emphasis):

Tell CMake where to find the compiler by setting either the environment variable 
"CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the 
compiler, ***or to the compiler name if it is in the PATH.***

Indeed, EasyBuild only specifies the name of the compiler command, and assumes they are available via $PATH .

We can consider revisiting that by specifying the full path, but only if there's a good reason (and no known downsides).

Maybe OpenKIM-Models breaks this assumption by resetting $PATH?

That would be pretty nasty...


regards,

Kenneth


Best regards

Jakob



Paul



I am trying to make a .eb files for a module using the CMakeMake block.  I am 
having a strange problem, and my lack of experience with CMake makes it hard 
for me to figure out what is going on.

Apparently, cmake cannot find the compilers, since it somehow gets the idea 
that they are placed in the build directory:

== 2019-03-11 11:07:25,450 run.py:192 INFO running cmd:  cmake 
-DCMAKE_INSTALL_PREFIX=/home/niflheim/schiotz/easybuild/broadwell/software/OpenKIM-Models/20190221-intel-2018b
 -DCMAKE_C_COMPILER='icc' -DCMAKE_Fortran_FLAGS='-O2 -xHost -ftz 
-fp-speculation=safe -fp-model source' -DCMAKE_CXX_FLAGS='-O2 -xHost -ftz 
-fp-speculation=safe -fp-model source' -DCMAKE_CXX_COMPILER='icpc' 
-DCMAKE_Fortran_COMPILER='ifort' -DCMAKE_C_FLAGS='-O2 -xHost -ftz 
-fp-speculation=safe -fp-model source' -DCMAKE_VERBOSE_MAKEFILE=ON 
-DKIM_API_INSTALL_COLLECTION=SYSTEM 
-DKIM_API_MODEL_INSTALL_PREFIX=/home/niflheim/schiotz/easybuild/broadwell/software/OpenKIM-Models/20190221-intel-2018b/lib/kim-api-v2/models
 
-DKIM_API_MODEL_DRIVER_INSTALL_PREFIX=/home/niflheim/schiotz/easybuild/broadwell/software/OpenKIM-Models/20190221-intel-2018b/lib/kim-api-v2/model-drivers
  
/home/niflheim/schiotz/easybuild/broadwell/build/OpenKIMModels/20190221/intel-2018b/OpenKIM-Models-v2-2019-02-21/
...
CMake Error at CMakeLists.txt:37 (project):
  The CMAKE_CXX_COMPILER:

    
/home/niflheim/schiotz/easybuild/broadwell/build/OpenKIMModels/20190221/intel-2018b/easybuild_obj/icpc

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.

and the same for the C and Fortran compilers.



--
Jakob Schiøtz, professor, Ph.D.
Department of Physics
Technical University of Denmark
DK-2800 Kongens Lyngby, Denmark
http://www.fysik.dtu.dk/~schiotz/

--
Jakob Schiøtz, professor, Ph.D.
Department of Physics
Technical University of Denmark
DK-2800 Kongens Lyngby, Denmark
http://www.fysik.dtu.dk/~schiotz/



Reply via email to