Posts

Showing posts from May, 2023

Questions Paper Tybcs sem6

Image
 Questions Paper Tybcs sem6             Software testing  G

Operating System sem 6 practical exam program

  Operating System sem 6 practical exam program How to run MPI program for compiler  :   mpicc programname.c -o programname for run           : mpirun -np 2 ./programname //Mpi - min max #include <stdio.h> #include <stdlib.h> #include <mpi.h> #include <limits.h> #define ARRAY_SIZE 1000 int main(int argc, char** argv) {     int rank, size, i;     int local_min = INT_MAX, local_max = INT_MIN;     int global_min, global_max;     int array[ARRAY_SIZE];     MPI_Init(NULL, NULL);     MPI_Comm_rank(MPI_COMM_WORLD, &rank);     MPI_Comm_size(MPI_COMM_WORLD, &size);     // Generate random array on process all process              for (i = 0; i < ARRAY_SIZE; i++) {             array[i] = rand();         }          // Find local ...