Fixup braces lost in previous edit
@@ -778,10 +778,7 @@ static int initialized = 0;
void gotoblas_affinity_init(void) {
int cpu, num_avail;
-#ifndef USE_OPENMP
cpu_set_t cpu_mask;
-#endif
- int i;
if (initialized) return;
@@ -825,16 +822,18 @@ void gotoblas_affinity_init(void) {
common -> shmid = pshmid;
- if (common -> magic != SH_MAGIC)
+ if (common -> magic != SH_MAGIC) {
cpu_set_t *cpusetp;
int nums;
int ret;
+ int i;
#ifdef DEBUG
fprintf(stderr, "Shared Memory Initialization.\n");
#endif
//returns the number of processors which are currently online
+
nums = sysconf(_SC_NPROCESSORS_CONF);
#if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 3)
@@ -864,6 +863,7 @@ void gotoblas_affinity_init(void) {
for (i=0;i<nums;i++)
if (CPU_ISSET(i,cpusetp)) n++;
common->num_procs = n;
+ }
#else
common->num_procs = CPU_COUNT(sizeof(cpu_set_t),cpusetp);
#endif
