'Why am I not getting any input from this slurm job?
I am in a distributed and parallel computing class and we have to log into the Alabama Supercomputer and run a hello world for Open MP. I run it and the program compiles but there is no text in the output file other than data about the run time. What am I doing wrong? I compile it to an executable that I then put in the .sh file. Is this wrong?
My c file and my .sh file look like this.
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
void Hello(void);
int main(int argc, char* argv[]){
int thread_count = strtol(argv[1], NULL, 10);
# pragma omp parallel num_threads(thread_count)
Hello();
return 0;
}
void Hello(void){
int my_rank = omp_get_thread_num();
int thread_count = omp_get_num_threads();
printf("Hello from thread %d of %d\n", my_rank, thread_count);
}
#!/bin/sh
export OMP_NUM_THREADS=15
./OpenMPHello
Why does it run in the system but produce no output?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
