Advertisement
Guest User

Untitled

a guest
Jan 18th, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. gcc -Wall -pg test_gprof.c -o test_gprof = Para compilar
  2.  
  3. ./test_gprof = Para ejecutar
  4.  
  5. gprof test_gprof gmon.out > actividad.txt = Usar el gprof y generar archivo TXT
  6.  
  7.  
  8.  
  9. mpicc hello_world.c -o hello = sirve para compilar con el mpi y genera un archivo.
  10.  
  11. mpirun -np 2 hello = ejecuta el archivo creado con el mpi. El número representa el número de nucleos que se usan.
  12.  
  13. more maqLocal = Genera un archivo con varios nucleos, si quieres más nucleos copia y pega los HostLocal del propio archivo
  14.  
  15. mpirun -machinefile maqLocal -np 4 hello = Usa el archivo maqLocal de alguna forma que engaña al ordenador y te da más nucleos
  16.  
  17. Para que funcione con MP es "gcc -fopenmp e1.c -o e1" para ejecutar "./e1" (Siendo e1 el archivo a compilar/ejecutar)
  18.  
  19. export OMP_NUM_THREADS=8. Sirve para poner más o menos nucleos. Funciona como el maqLocal, pero más sencillo. Creo.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement