-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to build with icc? #259
Comments
@ezaron |
cd FRE-NCtools Many files compile correctly, but then it fails on ../../../tools/libfrencutils/mosaic_util.c: icc -std=c11 -DHAVE_CONFIG_H -I. -I../../../tools/libfrencutils -I../.. -I/glade/u/apps/ch/opt/netcdf/4.8.1/intel/19.1.1/include -fPIC -I/glade/u/apps/ch/opt/netcdf/4.8.1/intel/19.1.1//include -g -O2 -MT mosaic_util.o -MD -MP -MF .deps/mosaic_util.Tpo -c -o mosaic_util.o ../../../tools/libfrencutils/mosaic_util.c ../../../tools/libfrencutils/mosaic_util.c(1711): error: expression must have a constant value ../../../tools/libfrencutils/mosaic_util.c(1715): error: expression must have a constant value ../../../tools/libfrencutils/mosaic_util.c(1715): error: expression must have a constant value ../../../tools/libfrencutils/mosaic_util.c(1715): error: expression must have a constant value ../../../tools/libfrencutils/mosaic_util.c(1715): error: expression must have a constant value ../../../tools/libfrencutils/mosaic_util.c(1715): error: expression must have a constant value ../../../tools/libfrencutils/mosaic_util.c(1715): error: expression must have a constant value ../../../tools/libfrencutils/mosaic_util.c(1715): error: expression must have a constant value ../../../tools/libfrencutils/mosaic_util.c(1715): error: expression must have a constant value ../../../tools/libfrencutils/mosaic_util.c(1715): error: expression must have a constant value compilation aborted for ../../../tools/libfrencutils/mosaic_util.c (code 2) |
@ezaron BTW, Normally I compile with these flags (set in a bash script, and below if icc is used (instead of mpicc, etc) it also compiles):
But also I use a more recent intel compiler (from the oneapi collection)
|
Thanks for your help, Miguel. I tried the -std=c18 flag, and the compiler does not complain, but it dies in the same place as my previous post. I am using icc version 19.1.1.217 20200306. I have been able to compile the code with gcc, but I had to purge all modules and load a different set with the gcc dependencies. I was hoping to use the same version of icc, as I need to use the intel modules for my main tasks. I will just stick with gcc for the moment. -Ed |
Hi,
The README.md states that the FRE-nctools are built and tested with gnu and intel compilers.
When I try to build on NCAR cheyenne using the intel, icc, the ./configure throws an error:
git clone https://github.com/NOAA-GFDL/FRE-NCtools
cd FRE-NCtools
autoreconf -i
mkdir build && cd build
../configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '3064' is supported by ustar format... yes
checking whether GID '1000' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking for ranlib... ranlib
checking for style of include used by make... GNU
checking for gcc... icc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether icc accepts -g... yes
checking for icc option to accept ISO C89... none needed
checking dependency style of icc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking whether we are using the GNU C compiler... (cached) yes
checking whether icc accepts -g... (cached) yes
checking for icc option to accept ISO C89... (cached) none needed
checking dependency style of icc... (cached) gcc3
checking whether icc and cc understand -c and -o together... yes
checking for _Generic... no
configure: error: The C compiler does not support the generic selection C-11 standard. Please use a C-11 compliant compiler.
My module list looks like this:
Currently Loaded Modules:
Can you please help me build FRE-nctools with Intel compilers?
-Ed
The text was updated successfully, but these errors were encountered: