ttadano / alamode

Ab initio simulator for thermal transport and lattice anharmonicity
http://sourceforge.net/projects/alamode
MIT License
135 stars 54 forks source link

problem compiling with Intel compiler #8

Closed asubedi closed 5 years ago

asubedi commented 5 years ago

I have followed the install instructions at https://alamode.readthedocs.io/en/latest/install.html. However, I cannot build with Intel compiler. Icpc version 2018 gives the following error of the form:

/cm/shared/apps/intel/parallel_studio/2018_update1/tbb/include/tbb/tbb_allocator.h(64): error: namespace "tbb::internal" has no member "allocator_type" typedef typename internal::allocator_type<T>::value_type value_type;

Looks like there is some problem in the interaction with the TBB library.

I am using using the latest boost and eigen libraries. The code compiles with g++ v7.3.

ttadano commented 5 years ago

I've tested with the latest boost (1.69.0) and eigen (3.3.7) libraries, and both binaries, alm and anphon, have compiled successfully. My icpc version is as follows:

$ icpc --version
icpc (ICC) 18.0.1 20171018
Copyright (C) 1985-2017 Intel Corporation.  All rights reserved.

Alamode doesn't use the TBB library. So, if you're compiling with the TBB option (-tbb), removing it may solve the issue.

asubedi commented 5 years ago

I was trying to compile alamode in a cluster. It compiles when gcc versions lower that 5.2 is loaded and Intel's compilervars.sh script is manually sourced.

It also compiles with newer versions of gcc and Intel's MKL library.

ttadano commented 5 years ago

I guess this issue comes from a possible incompatibility of gcc (newer than 5.2?) and Intel TBB. Since I can't reproduce the issue in my environment, I am closing this issue. Please feel free to reopen it and comment on it, if necessary.