Advertisement
Guest User

parallel himeno benchmark

a guest
Feb 27th, 2016
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.82 KB | None | 0 0
  1. #!/bin/bash
  2. # prallel himeno benchmark, needs mpifort, mpirun, wget, unzip and lzh unzipper(lhasa in arch linux)
  3.  
  4. # Get number of cores
  5. cores=$(nproc)
  6. echo Detected $cores cores
  7.  
  8. # Get date for temp folder name
  9. now=$(date +"%d.%m.%Y")
  10. tmpdir=/tmp/himeno-$now
  11.  
  12. # Make temp dir and move to it (remove if exists)
  13. if [ -d $tmpdir ]; then echo "Temporary directory exists, removing it" & rm -rf $tmpdir; fi
  14. mkdir $tmpdir
  15. cd $tmpdir
  16.  
  17. # Get himeno benchmark and unpack
  18. wget "http://accc.riken.jp/en/wp-content/uploads/sites/2/2015/07/f77_xp_mpi.zip"
  19. unzip f77_xp_mpi.zip
  20. lha -e f77_xp_mpi.lzh
  21.  
  22. # Make paramset.h executable and run it to make use of all cores
  23. chmod +x paramset.sh
  24. sh ./paramset.sh S 1 1 $cores
  25.  
  26. # Compile using mpifort
  27. mpifort himenoBMTxpr.f
  28.  
  29. # Run the test using all cores
  30. mpirun -np $cores ./a.out
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement