Installation script
From HPC users
Jump to navigationJump to search
- The following script download Nek 5000 in the current folder under nek5
- Further there will be a directory called bin installed
- At least an example will be stored in the directory eddy and will be executed
#!/bin/bash # modules to load module clear module load shared module load sge/6.2u5p2 module load intel/impi/64/4.1.0.024 module load intel/ics/64/2013.0.028 # download latest version svn co https://svn.mcs.anl.gov/repos/nek5 # set bin dir export NEK5_SRC=`pwd`/nek5/trunk/nek export NEK5_BIN_DIR=`pwd`/bin export PATH=$PATH:$NEK5_BIN_DIR # goto tool directory cd nek5/trunk/tools # modify file maketools sed -e 's/^F77.*/F77=ifort/' -e 's/^CC.*/CC=icc/' -e 's/HOME\/bin/NEK5_BIN_DIR/g' maketools > maketools_mod chmod a+x maketools_mod # call of new maketools ./maketools_mod all # make example cd ../../.. # create example dir mkdir eddy cd eddy cp ../nek5/examples/eddy/* . cp ../nek5/trunk/nek/makenek . # only for optimization sed -e 's/^#OPT_FLAGS_STD.*/OPT_FLAGS_STD="-xHost -Ofast -prec-sqrt -prec-div -ipo"/' makenek > makenek_mod chmod a+x makenek_mod # compile example ./makenek_mod eddy_uv $NEK5_SRC # run example ../nek5/trunk/tools/scripts/nekb eddy_uv