forked from shedsaw/exciting-plus-rgvw-mod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile-summitjrjr-pgi.sh
executable file
·57 lines (45 loc) · 1.39 KB
/
compile-summitjrjr-pgi.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
# Compilers
export MAKE=make
export F90=${PGI}/linux86-64-nollvm/2019/mpi/openmpi-3.1.3/bin/mpif90
export CUDA_PATH=/usr/local/cuda
export NVCC=$CUDA_PATH/bin/nvcc
# Copy make.inc
cp make.inc.local.pgi.cpu make.inc
# Clean up
make clean
rm *.o *.mod
rm bin/elk-cpu src/elk-cpu
#rm bin/elk-gpu src/elk-gpu
# Make the binary
make
# CPU-only version
mv src/elk src/elk-cpu
# Compile the necessary codes.
#$NVCC -c -g -G cublas_fortran.cu
#$F90 -Mpreprocess -c -g cublas_fortran_iso.f90
#$F90 -Mpreprocess -g -D_MPI_ -c -I./src/ genmegqblh_cublas.f90
#$F90 -Mpreprocess -g -D_MPI_ -c -I./src/ genvscrn_cublas.f90
# Move the appropriate files over
#cp genmegqblh_cublas.o src/addons/expigqr/genmegqblh.o
##cp genvscrn_cublas.o src/addons/genvscrn.o
#cp cublas_fortran_iso.o cublas_fortran.o cublas_f.mod src/addons/expigqr/
#cp cublas_fortran_iso.o cublas_fortran.o cublas_f.mod src/addons/
#cp cublas_fortran_iso.o cublas_fortran.o cublas_f.mod src/
# Remove main and mod_mpi_grid so they will be recompiled
#rm src/main.o
##rm src/mod_mpi_grid.mod # Keep old module for pstop()
#rm src/addons/mod_mpi_grid.o
# copy make.inc and re-Make the binary.
#cp make.inc.local.pgi.gpu make.inc
#make
# Copy the hybrid CPU+GPU version
#mv src/elk src/elk-gpu
# Keep the two different versions
#make install
#rm bin/elk
mkdir -p bin
cd bin
ln -s -T ../src/elk-cpu elk-cpu
#ln -s -T ../src/elk-gpu elk-gpu
cd ..