Browse Source

Fix compiler warnings

tags/v0.3.10^2
Martin Kroeker GitHub 5 years ago
parent
commit
f4248af26e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions
  1. +4
    -2
      driver/others/blas_server.c
  2. +1
    -1
      driver/others/memory.c

+ 4
- 2
driver/others/blas_server.c View File

@@ -272,7 +272,7 @@ static void legacy_exec(void *func, int mode, blas_arg_t *args, void *sb){
}
}

#if defined(OS_LINUX) && !defined(NO_AFFINITY)
#if defined(OS_LINUX) && !defined(NO_AFFINITY)
int gotoblas_set_affinity(int);
int gotoblas_set_affinity2(int);
int get_node(void);
@@ -281,6 +281,8 @@ int get_node(void);
static int increased_threads = 0;

#ifdef OS_LINUX
extern int openblas_get_num_threads(void);

int openblas_setaffinity(int thread_idx, size_t cpusetsize, cpu_set_t* cpu_set) {
const int active_threads = openblas_get_num_threads();

@@ -602,7 +604,7 @@ int blas_thread_init(void){
if(ret!=0){
struct rlimit rlim;
const char *msg = strerror(ret);
fprintf(STDERR, "OpenBLAS blas_thread_init: pthread_create failed for thread %ld of %ld: %s\n", i+1,blas_num_threads,msg);
fprintf(STDERR, "OpenBLAS blas_thread_init: pthread_create failed for thread %ld of %d: %s\n", i+1,blas_num_threads,msg);
#ifdef RLIMIT_NPROC
if(0 == getrlimit(RLIMIT_NPROC, &rlim)) {
fprintf(STDERR, "OpenBLAS blas_thread_init: RLIMIT_NPROC "


+ 1
- 1
driver/others/memory.c View File

@@ -2070,7 +2070,7 @@ if (!release->address) return;
if (munmap(release -> address, BUFFER_SIZE)) {
int errsv=errno;
perror("OpenBLAS : munmap failed:");
printf("error code=%d,\trelease->address=%lx\n",errsv,release->address);
printf("error code=%d,\trelease->address=%p\n",errsv,release->address);
}
}



Loading…
Cancel
Save