stan-dev / math

The Stan Math Library is a C++ template library for automatic differentiation of any order using forward, reverse, and mixed modes. It includes a range of built-in functions for probabilistic modeling, linear algebra, and equation solving.
https://mc-stan.org
BSD 3-Clause "New" or "Revised" License
735 stars 185 forks source link

Feature Request: support for Intel icpc #1160

Open prehensilecode opened 5 years ago

prehensilecode commented 5 years ago

Description

Intel C++ compiler (icpc) should be supported, together with the "-xHost" compiler option to generate instructions for the highest instruction set and processor available on the compilation host machine.

Example

In make/default_compiler_options set

    CC=icpc

Currently, since the optimization flag only sets the integer optimization level, there is no mechanism for adding other optimization options (e.g. for code generation).

Expected Output

Example with Intel Composer XE 2019u1:

Stan Math makefile:
  Current configuration:
  - OS_TYPE (Operating System):  linux
  - CC (Compiler):               icpc
  - CC_TYPE                      intel
  - Compiler version:            19.0.1.144 20181018
  - O (Optimization Level):      3

Current Version:

v2.18.1

bgoodri commented 5 years ago

You can put whatever you want into

make/local

but icpc isn't a big priority for us.

On Fri, Mar 15, 2019 at 12:09 PM David Chin notifications@github.com wrote:

Description

Intel C++ compiler (icpc) should be supported, together with the "-xHost" compiler option to generate instructions for the highest instruction set and processor available on the compilation host machine. Example

In make/default_compiler_options set

CC=icpc

Currently, since the optimization flag only sets the integer optimization level, there is no mechanism for adding other optimization options (e.g. for code generation). Expected Output

Example with Intel Composer XE 2019u1:

Stan Math makefile: Current configuration:

  • OS_TYPE (Operating System): linux
  • CC (Compiler): icpc
  • CC_TYPE intel
  • Compiler version: 19.0.1.144 20181018
  • O (Optimization Level): 3

Current Version:

v2.18.1

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/stan-dev/math/issues/1160, or mute the thread https://github.com/notifications/unsubscribe-auth/ADOrql0cywo_X_bywJ7czCxBinOy-ZSPks5vW8W5gaJpZM4b2z06 .

bob-carpenter commented 5 years ago

We'll also accept pull requests to bring our math lib up to other library standards as long as it doesn't break anything else or leave the code too crufty with ifdefs.