Re: [EXTERNAL] Re: Adding support for Intel compilers
"Kokron, Daniel S. \(ARC-606.2\)\[InuTeq, LLC\] via Scons-users" <[email protected]>
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <[email protected]> |
Jason,
I think I see what you are after.
The SConstruct file in the enzo-e tree includes the following (see attached)
elif (arch == "pleiades_intel"): from pleiades_intel import *
config/pleiades_intel.py is attached.
env = Environment (
CC = cc,
CFLAGS = cflags,
CPPDEFINES = defines,
CPPPATH = cpppath,
CXX = cxx,
CXXFLAGS = cxxflags,
ENV = environ,
FORTRANFLAGS = fortranflags,
FORTRAN = f90,
FORTRANLIBS = libs_fortran,
FORTRANPATH = fortranpath,
LIBPATH = libpath,
LINKFLAGS = linkflags )
From: Scons-users <[email protected]> on behalf of Jason Kenny <[email protected]>
Reply-To: SCons users mailing list <[email protected]>
Date: Wednesday, June 23, 2021 at 5:34 PM
To: SCons users mailing list <[email protected]>
Subject: [EXTERNAL] Re: [Scons-users] Adding support for Intel compilers
Can you share how you set up your Environment object. I can take a quick look at what you need to tweak to get it running correctly.
Jason
From: Scons-users <[email protected]> On Behalf Of Jason Kenny
Sent: Wednesday, June 23, 2021 4:58 PM
To: SCons users mailing list <[email protected]>
Subject: Re: [Scons-users] Adding support for Intel compilers
I believe you need to make sure you load the c++/gcc tool as well as this adds other items you need to have defined that the intelc.py tool does not handle if I recall correctly with pure SCons
You should be able to find some examples of how in Pure SCons to create the Environment correctly in the user list.
I have support for icc in my extension for Scons called Parts. In fact, I am adding support for the new icx version that should be replacing the existing/classic icc case for the next drop.
Jason
________________________________
From: Scons-users <[email protected]<mailto:[email protected]>> on behalf of Kokron, Daniel S. (ARC-606.2)[InuTeq, LLC] via Scons-users <[email protected]<mailto:[email protected]>>
Sent: Wednesday, June 23, 2021 4:14 PM
To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Cc: Kokron, Daniel S. (ARC-606.2)[InuTeq, LLC] <[email protected]<mailto:[email protected]>>
Subject: [Scons-users] Adding support for Intel compilers
I have a user on our system whose application (ENZO-E) depends on SCons. We have a working build that uses GNU compilers however I would like to test the code using Intel compilers as they typically provide better performance on our system. I have already worked through some issues by modifying SCons/Tool/intelc.py so it can find our installation tree.
- for d in glob.glob('/opt/intel/compilers_and_libraries_%s/linux'%version):
+ for d in glob.glob('/nasa/intel/Compiler/2020.4.304/compilers_and_libraries_%s/linux'%version):
I have tried duplicating the set of files used for GNU compilers (gcc.py, g++.py and gxx.py), replacing GNU compiler names with appropriate names of Intel compilers. However, nothing I’ve tried has been able to resolve the following.
scons: *** While building `['cello.o']' from `['cello.cpp']': Don't know how to build from a source file with suffix `.cpp'. Expected a suffix in this list: ['.c', '.m', '.i', '.fpp', '.FPP', '.I', '.f77', '.F77', '.i90', '.I90', '.f95', '.F95', '.f03', '.F03', '.f08', '.F08', '.s', '.asm', '.ASM', '.spp', '.SPP', '.sx', '.S', '.d'].
Can anyone offer some guidance on how to proceed?
Daniel Kokron
RedLine Performance Solutions
SciCon/APP group
--
_______________________________________________
Scons-users mailing list
[email protected]
https://pairlist4.pair.net/mailman/listinfo/scons-users
pleiades_intel.py
(text/x-python-script, 2.4 KB)
import os
from _common_search_paths import charm_path_search, grackle_path_search
is_arch_valid = 1
#vec_flags = '-xCORE-AVX2 ' # mimimum instructions supported by all nodes
#vec_flags = '-xCORE-AVX512 ' # only supports SKX login & compute nodes
#vec_flags = '-xMIC-AVX512 ' # only supports KNL compute nodes
# As recommended by the stampede user-guide the following builds a "fat"
# binary including code paths for both SKX and KNL that is selected at
# execution. It's more flexible, but has (~20%) longer compile times and
# produces larger binaries and (which may be slightly slower than targetting
# one architecture.
vec_flags = '-xCORE-AVX2 -axCORE-AVX512'
flags_arch = vec_flags + '-Ofast -g -Wall'
flags_link = '-rdynamic'
cc = 'icc'
cxx = 'icpc'
f90 = 'ifort'
flags_prec_single = ''
flags_prec_double = '-real-size 64 -double-size 64'
libpath_fortran = ''
libs_fortran = ['irc', 'imf','ifcore','ifport','stdc++','intlc','svml']
home = os.environ['HOME']
hdf5_path = os.getenv('HDF5HOME',None)
if hdf5_path is not None:
hdf5_inc = hdf5_path + '/include'
hdf5_lib = hdf5_path + '/lib'
else:
# the following environment variables are set by the hdf5 module
hdf5_inc = os.environ['TACC_HDF5_INC']
hdf5_lib = os.environ['TACC_HDF5_LIB']
# the BOOST_ROOT environment variable is defined by the the boost module
boost_path = os.environ['BOOST_ROOT']
boost_inc = boost_path + '/include'
boost_lib = boost_path + '/lib'
#--------------------------------------------------
# CHARM
#
# Change charm_path below to match where your copy is. To compile
# Charm++ on Stampede with Intel compilers, use the following:
#
# ./build charm++ ofi-linux-x86_64 icc ifort -j8 --with-production --enable-tracing
#
#--------------------------------------------------
if os.path.isdir(home + '/Charm/682/intel/omni/charm'):
charm_path = home + '/Charm/682/intel/omni/charm'
else:
# charm_path = charm_path_search(home)
charm_path = '/nobackupp16/swbuild/dkokron/ENZO-E/charm-v6.10.2'
if ((os.getenv("TACC_PAPI_LIB", None) is not None) and
(os.getenv("TACC_PAPI_INC", None) is not None)):
papi_inc = os.environ["TACC_PAPI_INC"]
papi_lin = os.environ["TACC_PAPI_LIB"]
else:
papi_inc = home + '/include'
papi_lib = home + '/lib'
png_path = '/usr/lib64'
if os.path.isdir(home + '/public/Grackle/src/clib'):
grackle_path = home + '/public/Grackle/src/clib'
else:
# grackle_path = grackle_path_search(home)
grackle_path = '/nobackupp16/swbuild/dkokron/ENZO-E/grackle/install'
SConstruct
(application/octet-stream, 20.1 KB) - not displayed