should other compilers besides gcc work (i.e. icc or pgcc)?

Issue #6 resolved
Former user created an issue

If I set CC=icc, run ./configure; make a slew of errors like this:

SHT.c(485): error: expected an expression for (int it=typ_start; it<SHT_NTYP; it++) {

and this

SHT.c(2541): warning #188: enumerated type mixed with another type shtns_set_grid(sht_data, type | layout, eps, nlat, *nphi);

Looks like icc doesn't support these constructs. Same thing happens with the portland group c compiler. Is this a bug, or gcc the only compiler you intend to support?

Comments (7)

  1. Nathanaël Schaeffer repo owner

    I hoped this would be supported by any compiler, but I admit I only tested with gcc :) I will look into it, but if you have time to do so, could you append "(int)" before "typ_start" and "SHT_NTYP" ? I suspect it could solve the problem. (Note that the agressive vectorization should only work with gcc, resulting in faster code.)

  2. Nathanaël Schaeffer repo owner

    I just tested with icc 9.1 and icc 12.1.4. Without changing anything, SHTns 2.2.4 compiles just fine, although a lot of warnings are issued. What version of icc are you using ?

    Concerning pgcc, I have no access to this compiler, but if you send me the errors, I will fix them.

  3. Former user Account Deleted

    You are right - it works with icc as long as you compile with -std=gnu99. I must have modified the Makefile to remove that compiler flag while removing some of the other gcc flags that icc didn't understand. I will try again with pgcc and let you know.

  4. Former user Account Deleted

    pgcc doesn't understand -pipe. After removing that from the Makefile, I get

    pgcc -O2 -I/scratch1/portfolios/BMC/fim/whitaker/include -L/scratch1/portfolios/BMC/fim/whitaker/lib -D_GNU_SOURCE -L/scratch1/portfolios/BMC/fim/whitaker/lib -I/scratch1/portfolios/BMC/fim/whitaker/include -O2 -D_HGID_="\"`hg id -ti`\"" -c SHT.c -o SHT.o /bin/sh: hg: command not found PGC-W-0267-#warning -- "using GCC vector extensions (sse3)" (./sht_private.h: 226) PGC-W-0118-Function getticks does not contain a return statement (./cycle.h: 243) PGC-W-0155-Long value is passed to a nonprototyped function - argument #1 (SHT.c: 689) PGC-W-0095-Type cast required for this conversion (SHT.c: 745) PGC-W-0095-Type cast required for this conversion (SHT.c: 746) PGC-W-0095-Type cast required for this conversion (SHT.c: 766) PGC-W-0155-Long value is passed to a nonprototyped function - argument #1 (SHT.c: 829) PGC-W-0155-Long value is passed to a nonprototyped function - argument #1 (SHT.c: 830) PGC-W-0095-Type cast required for this conversion (SHT.c: 914) PGC-W-0095-Type cast required for this conversion (SHT.c: 914) PGC-W-0155-Long value is passed to a nonprototyped function - argument #1 (SHT.c: 943) PGC-W-0095-Type cast required for this conversion (SHT.c: 971) PGC-W-0155-Long value is passed to a nonprototyped function - argument #1 (SHT.c: 1542) PGC-W-0155-Long value is passed to a nonprototyped function - argument #1 (SHT.c: 1544) PGC-W-0155-Long value is passed to a nonprototyped function - argument #1 (SHT.c: 1606) PGC-W-0155-Long value is passed to a nonprototyped function - argument #1 (SHT.c: 1721) PGC-W-0155-Long value is passed to a nonprototyped function - argument #1 (SHT.c: 1722) PGC-W-0155-Long value is passed to a nonprototyped function - argument #1 (SHT.c: 1723) PGC-W-0155-Long value is passed to a nonprototyped function - argument #1 (SHT.c: 1724) PGC-W-0155-Long value is passed to a nonprototyped function - argument #1 (SHT.c: 1725) PGC-W-0155-Long value is passed to a nonprototyped function - argument #1 (SHT.c: 1726) PGC-W-0095-Type cast required for this conversion (SHT.c: 1777) PGC-W-0095-Type cast required for this conversion (SHT.c: 1777) PGC-W-0095-Type cast required for this conversion (SHT.c: 1777) PGC-W-0095-Type cast required for this conversion (SHT.c: 1777) PGC-W-0095-Type cast required for this conversion (SHT.c: 1777) PGC-W-0095-Type cast required for this conversion (SHT.c: 1777) PGC-W-0095-Type cast required for this conversion (SHT.c: 1968) PGC-W-0095-Type cast required for this conversion (SHT.c: 1968) PGC-W-0095-Type cast required for this conversion (SHT.c: 1968) PGC-W-0095-Type cast required for this conversion (SHT.c: 1968) PGC-W-0095-Type cast required for this conversion (SHT.c: 1968) PGC-W-0095-Type cast required for this conversion (SHT.c: 1968) PGC-W-0095-Type cast required for this conversion (SHT.c: 2195) PGC/x86-64 Linux 12.4-0: compilation completed with warnings DONE SHT.o make SH_to_spat.c -C SHT SED=/bin/sed make[1]: Entering directory `/scratch1/portfolios/BMC/fim/whitaker/shtns/SHT' SH*_to_spat code generated. make[1]: Leaving directory `/scratch1/portfolios/BMC/fim/whitaker/shtns/SHT' make SH_to_spat_fly.c -C SHT SFX=fly SED=/bin/sed make[1]: Entering directory `/scratch1/portfolios/BMC/fim/whitaker/shtns/SHT' SH*_to_spat code generated. make[1]: Leaving directory `/scratch1/portfolios/BMC/fim/whitaker/shtns/SHT' make spat_to_SH.c -C SHT SED=/bin/sed make[1]: Entering directory `/scratch1/portfolios/BMC/fim/whitaker/shtns/SHT' spat_to_SH* code generated. make[1]: Leaving directory `/scratch1/portfolios/BMC/fim/whitaker/shtns/SHT' make spat_to_SH_fly.c -C SHT SFX=fly SED=/bin/sed make[1]: Entering directory `/scratch1/portfolios/BMC/fim/whitaker/shtns/SHT' spat_to_SH* code generated. make[1]: Leaving directory `/scratch1/portfolios/BMC/fim/whitaker/shtns/SHT' pgcc -O2 -I/scratch1/portfolios/BMC/fim/whitaker/include -L/scratch1/portfolios/BMC/fim/whitaker/lib -D_GNU_SOURCE -L/scratch1/portfolios/BMC/fim/whitaker/lib -I/scratch1/portfolios/BMC/fim/whitaker/include -O3 -c sht_std.c -o sht_std.o PGC-W-0267-#warning -- "using GCC vector extensions (sse3)" (./sht_private.h: 226) PGC-W-0155-Long value is passed to a nonprototyped function - argument #1 (./SHT/spat_to_SH.c: 62) PGC-S-0094-Illegal type conversion required (./SHT/spat_to_SH.c: 106) PGC-S-0094-Illegal type conversion required (./SHT/spat_to_SH.c: 107) PGC-S-0094-Illegal type conversion required (./SHT/spat_to_SH.c: 116) PGC-S-0094-Illegal type conversion required (./SHT/spat_to_SH.c: 116) PGC-S-0094-Illegal type conversion required (./SHT/spat_to_SH.c: 116) PGC-S-0094-Illegal type conversion required (./SHT/spat_to_SH.c: 116) PGC-S-0094-Illegal type conversion required (./SHT/spat_to_SH.c: 257) PGC-S-0094-Illegal type conversion required (./SHT/spat_to_SH.c: 258) PGC-S-0155-operation not supported on objects of type m128, m128d, and m128i (./SHT/spat_to_SH.c: 260) PGC-S-0155-operation not supported on objects of type m128, m128d, and m128i (./SHT/spat_to_SH.c: 261) PGC-S-0094-Illegal type conversion required (./SHT/spat_to_SH.c: 273) PGC-S-0155-operation not supported on objects of type m128, m128d, and m128i (./SHT/spat_to_SH.c: 275) PGC-W-0095-Type cast required for this conversion (./SHT/spat_to_SH.c: 299) PGC-W-0155-Long value is passed to a nonprototyped function - argument #1 (./SHT/SH_to_spat.c: 68) PGC-S-0094-Illegal type conversion required (./SHT/SH_to_spat.c: 132) PGC-S-0094-Illegal type conversion required (./SHT/SH_to_spat.c: 147) PGC-S-0094-Illegal type conversion required (./SHT/SH_to_spat.c: 226) PGC-S-0094-Illegal type conversion required (./SHT/SH_to_spat.c: 226) PGC-S-0155-operation not supported on objects of type m128, m128d, and m128i (./SHT/SH_to_spat.c: 228) PGC-S-0155-operation not supported on objects of type m128, m128d, and m128i (./SHT/SH_to_spat.c: 229) PGC-S-0155-operation not supported on objects of type m128, m128d, and m128i (./SHT/SH_to_spat.c: 234) PGC-S-0155-operation not supported on objects of type m128, m128d, and m128i (./SHT/SH_to_spat.c: 245) PGC-S-0094-Illegal type conversion required (./SHT/SH_to_spat.c: 246) PGC-S-0094-Illegal type conversion required (./SHT/SH_to_spat.c: 250) PGC-S-0094-Illegal type conversion required (./SHT/SH_to_spat.c: 250) PGC-S-0094-Illegal type conversion required (./SHT/SH_to_spat.c: 264) PGC-S-0094-Illegal type conversion required (./SHT/SH_to_spat.c: 265) PGC-F-0008-Error limit exceeded (./SHT/SH_to_spat.c: 265) PGC/x86-64 Linux 12.4-0: compilation aborted make: * [sht_std.o] Error 2

  5. Nathanaël Schaeffer repo owner

    (Reply via nath...@gmail.com):

    Could you try again using ./configure --disable-simd ? It looks like pgcc pretends to be gcc, but it isn't.

  6. Log in to comment