cpu_set_t

Hi,

Getting an error with cpu_set_t,

pgcc -c -I./Sources. -I/home/armnlib/ssm/all/include -I/opt/compilers/pgi/linux86-64/12.4/include -I/cm/shared/apps/gcc/4.4.6/include -I/cm/shared/apps/mvapich2/pgi/64/1.6/include  -fpic  -D_REENTRANT -I. -I/home/armnlib/ssm/infrastructure_1.0_linux24-x86-64/share/armnlib/include -I/home/armnlib/ssm/infrastructure_1.0_linux24-x86-64/share/armnlib/include/Linux_x86-64_pgi10xx -I. -O2  -D__x86_64 -DWITHOUT_OpenMP  f90_threads.c

PGC-S-0040-Illegal use of symbol, cpu_set_t (/opt/compilers/pgi/linux86-64/12.4/include/sched.h: 82)
PGC-W-0156-Type not specified, 'int' assumed (/opt/compilers/pgi/linux86-64/12.4/include/sched.h: 82)
PGC-S-0040-Illegal use of symbol, cpu_set_t (/opt/compilers/pgi/linux86-64/12.4/include/sched.h: 86)
PGC-W-0156-Type not specified, 'int' assumed (/opt/compilers/pgi/linux86-64/12.4/include/sched.h: 86)
PGC/x86-64 Linux 12.4-0: compilation completed with severe errors

It seems like PGI has it’s own sched.h, and it’s there that this is failing.

Any idea how cpu_set_t could not get defined? There’s a definition for it in /usr/include/bits/sched.h, but that’s there only place I’ve found it. I’ve read that if I have stdlib included (and I do) that it should be fine…

I’m on a CentOS 6.2 Linux box, with PGI 12.4 86x64

Thanks.

Hmm, I think the problem was that the pgi shared directory was in the include path. The build script for what I’m building was created by someone else, so I’ll try to find why it was being included.

Hi khea_actua1,

Note that the “sched.h” we provide first includes the system’s “sched.h” which in turn includes “bits/sched.h” which defines “cpu_set_t”. We only include our version to work around a “#ifdef __USE_GNU” guard in the default “sched.h”'s CPU_SET macros.

  • Mat