Skip to content

Commit 116d6a2

Browse files
committed
Merge branch 'hough'
2 parents 0e8e307 + 599b0c0 commit 116d6a2

62 files changed

Lines changed: 11348 additions & 3067 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.o
2+
gpue
3+
*.bvox
4+
*.png

CMakeLists.txt

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
cmake_minimum_required(VERSION 2.8)
2+
project(gpue_build LANGUAGES CXX CUDA)
3+
find_package(CUDA QUIET REQUIRED)
4+
5+
set(
6+
CUDA_NVCC_FLAGS
7+
${CUDA_NVCC_FLAGS};
8+
-O3 -gencode arch=compute_37,code=sm_37 -lcufft -fopenmp
9+
)
10+
11+
add_executable(
12+
gpue
13+
src/dynamic.cu
14+
include/dynamic.h
15+
16+
src/ds.cu
17+
include/ds.h
18+
19+
src/edge.cu
20+
include/edge.h
21+
22+
src/evolution.cu
23+
include/evolution.h
24+
25+
src/fileIO.cu
26+
include/fileIO.h
27+
28+
src/kernels.cu
29+
include/kernels.h
30+
31+
src/manip.cu
32+
include/manip.h
33+
34+
src/lattice.cu
35+
include/lattice.h
36+
37+
src/minions.cu
38+
include/minions.h
39+
40+
src/multigpu.cu
41+
42+
src/node.cu
43+
include/node.h
44+
45+
src/operators.cu
46+
include/operators.h
47+
48+
src/parser.cu
49+
include/parser.h
50+
51+
src/split_op.cu
52+
include/split_op.h
53+
54+
src/tracker.cu
55+
include/tracker.h
56+
57+
src/unit_test.cu
58+
include/unit_test.h
59+
60+
src/vort.cu
61+
include/vort.h
62+
63+
src/vortex_3d.cu
64+
include/vortex_3d.h
65+
66+
src/init.cu
67+
include/init.h
68+
)
69+
70+
target_compile_features(gpue PUBLIC cxx_std_11)
71+
target_link_libraries(gpue ${CUDA_LIBRARIES} ${CUDA_CUFFT_LIBRARIES})
72+
set_target_properties(gpue PROPERTIES CUDA_SEPARABLE_COMPILATION ON)

LICENSE renamed to LICENSE.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
Copyright (c) 2011-2015, Lee J. O'Riordan (mlxd), Tadhg Morgan, Neil
2-
Crowley. All rights reserved.
1+
/***
2+
GPUE: Split Operator based GPU solver for Nonlinear
3+
Schrodinger Equation, Copyright (C) 2011-2017,
4+
Lee J. O'Riordan <loriordan@gmail.com>,
5+
James Schloss <jrs.schloss@gmail.com>,
6+
Tadhg Morgan,
7+
Neil Crowley.
8+
All rights reserved.
39

410
Redistribution and use in source and binary forms, with or without
511
modification, are permitted provided that the following conditions are
@@ -27,3 +33,5 @@ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
2733
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
2834
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2935
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36+
***/
37+

Makefile

Lines changed: 17 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,41 @@
1-
CUDA_HOME = /apps/free/cuda/7.5.18/
2-
GPU_ARCH = sm_30
1+
CUDA_HOME = /opt/cuda/
2+
#CUDA_HOME = /apps/free/cuda/7.5.18/
3+
#CUTT_DIR = cutt/lib
4+
GPU_ARCH = sm_50
35
OS:= $(shell uname)
46
ifeq ($(OS),Darwin)
57
CUDA_LIB = $(CUDA_HOME)/lib
68
CUDA_HEADER = $(CUDA_HOME)/include
79
CC = $(CUDA_HOME)/bin/nvcc -ccbin /usr/bin/clang --ptxas-options=-v#-save-temps
8-
CFLAGS = -g -O3 -m64 -std=c++11
10+
CFLAGS = -g -std=c++11 -Wno-deprecated-gpu-targets
911
else
1012
CUDA_LIB = $(CUDA_HOME)/lib64
1113
CUDA_HEADER = $(CUDA_HOME)/include
1214
CC = $(CUDA_HOME)/bin/nvcc --ptxas-options=-v --compiler-options -Wall #-save-temps
1315
CHOSTFLAGS = #-fopenmp
14-
CFLAGS = -g -O3 -std=c++11 -Xcompiler '-std=c++11' -Xcompiler '-fopenmp' #-malign-double
16+
CFLAGS = -g -O0 -std=c++11 -Xcompiler '-std=c++11' -Xcompiler '-fopenmp' #-L$(CUTT_DIR) -l:libcutt.a
1517
endif
1618

19+
CUDA_FLAGS = -lcufft
20+
1721
CLINKER = $(CC)
1822
RM = /bin/rm
1923
INCFLAGS = -I$(CUDA_HEADER)
2024
LDFLAGS = -L$(CUDA_LIB)
2125
EXECS = gpue # BINARY NAME HERE
2226

23-
gpue: fileIO.o kernels.o split_op.o tracker.o minions.o ds.o edge.o node.o lattice.o manip.o vort.o
24-
#node.o edge.o lattice.o
25-
$(CC) *.o $(INCFLAGS) $(CFLAGS) $(LDFLAGS) $(CHOSTFLAGS) -lm -lcufft -lcudart -o gpue
26-
#rm -rf ./*.o
27-
28-
split_op.o: ./src/split_op.cu ./include/split_op.h ./include/kernels.h ./include/constants.h ./include/fileIO.h ./include/minions.h Makefile
29-
$(CC) -c ./src/split_op.cu -o $@ $(INCFLAGS) $(CFLAGS) $(LDFLAGS) -Xcompiler "-fopenmp" -arch=$(GPU_ARCH)
30-
31-
kernels.o: ./include/split_op.h Makefile ./include/constants.h ./include/kernels.h ./src/kernels.cu
32-
$(CC) -c ./src/kernels.cu -o $@ $(INCFLAGS) $(CFLAGS) $(LDFLAGS) -arch=$(GPU_ARCH)
33-
34-
fileIO.o: ./include/fileIO.h ./src/fileIO.cc Makefile
35-
$(CC) -c ./src/fileIO.cc -o $@ $(INCFLAGS) $(CFLAGS) $(LDFLAGS)
36-
37-
tracker.o: ./src/tracker.cc ./include/tracker.h ./include/fileIO.h
38-
$(CC) -c ./src/tracker.cc -o $@ $(INCFLAGS) $(CFLAGS) $(LDFLAGS) $(CHOSTFLAGS)
39-
40-
minions.o: ./src/minions.cc ./include/minions.h
41-
$(CC) -c ./src/minions.cc -o $@ $(INCFLAGS) $(CFLAGS) $(LDFLAGS) $(CHOSTFLAGS)
42-
43-
ds.o: ./src/ds.cc ./include/ds.h
44-
$(CC) -c ./src/ds.cc -o $@ $(INCFLAGS) $(CFLAGS) $(LDFLAGS) $(CHOSTFLAGS)
45-
46-
node.o: ./src/node.cc ./include/node.h
47-
$(CC) -c ./src/node.cc -o $@ $(INCFLAGS) $(CFLAGS) $(LDFLAGS) $(CHOSTFLAGS)
48-
49-
edge.o: ./src/edge.cc ./include/edge.h
50-
$(CC) -c ./src/edge.cc -o $@ $(INCFLAGS) $(CFLAGS) $(LDFLAGS) $(CHOSTFLAGS)
51-
52-
lattice.o: ./src/lattice.cc ./include/lattice.h
53-
$(CC) -c ./src/lattice.cc -o $@ $(INCFLAGS) $(CFLAGS) $(LDFLAGS) $(CHOSTFLAGS)
54-
55-
manip.o: ./src/manip.cu ./include/manip.h
56-
$(CC) -c ./src/manip.cu -o $@ $(INCFLAGS) $(CFLAGS) $(LDFLAGS) $(CHOSTFLAGS)
57-
58-
vort.o: ./src/vort.cc ./include/vort.h
59-
$(CC) -c ./src/vort.cc -o $@ $(INCFLAGS) $(CFLAGS) $(LDFLAGS) $(CHOSTFLAGS)
60-
61-
graphtest.o: ./src/graphtest.cc
62-
$(CC) -c ./src/graphtest.cc -o $@ $(INCFLAGS) $(CFLAGS) $(LDFLAGS) $(CHOSTFLAGS)
63-
64-
gtest: edge.o node.o lattice.o graphtest.o
65-
$(CC) $(INCFLAGS) $(CFLAGS) $(LDFLAGS) $(CHOSTFLAGS) edge.o node.o lattice.o graphtest.o -o gtest
27+
DEPS = ./include/constants.h ./include/ds.h ./include/edge.h ./include/evolution.h ./include/fileIO.h ./include/init.h ./include/kernels.h ./include/lattice.h ./include/manip.h ./include/minions.h ./include/node.h ./include/operators.h ./include/parser.h ./include/split_op.h ./include/tracker.h ./include/unit_test.h ./include/vort.h ./include/vortex_3d.h ./include/dynamic.h
6628

67-
minions: ./src/minions.cc ./include/minions.h minions.o
68-
$(CC) minions.o -o mintest $(INCFLAGS) $(CFLAGS) $(LDFLAGS)
29+
OBJ = fileIO.o kernels.o split_op.o tracker.o minions.o ds.o edge.o node.o lattice.o manip.o vort.o parser.o evolution.o init.o unit_test.o operators.o vortex_3d.o dynamic.o
6930

70-
tracker_test: tracker.o fileIO.o ./src/tracker.cc ./include/fileIO.h ./src/fileIO.cc ./include/tracker.h
71-
$(CC) ./tracker.o ./fileIO.o -o tracker_test $(INCFLAGS) $(CFLAGS) $(LDFLAGS)
31+
%.o: ./src/%.cc $(DEPS)
32+
$(CC) -c -o $@ $(INCFLAGS) $(CFLAGS) $(LDFLAGS) -Xcompiler "-fopenmp" -arch=$(GPU_ARCH) $<
7233

73-
default: gpue
74-
all: gpue test
34+
%.o: ./src/%.cu $(DEPS)
35+
$(CC) -c -o $@ $(INCFLAGS) $(CFLAGS) $(LDFLAGS) $(CUDA_FLAGS) -Xcompiler "-fopenmp" -arch=$(GPU_ARCH) $< -dc
7536

76-
.c.o:
77-
$(CC) $(INCFLAGS) $(CFLAGS) -c $<
37+
gpue: $(OBJ)
38+
$(CC) -o $@ $(INCFLAGS) $(CFLAGS) $(LDFLAGS) $(CUDA_FLAGS) -Xcompiler "-fopenmp" -arch=$(GPU_ARCH) $^
7839

7940
clean:
80-
@-$(RM) -f r_0 Phi_0 E* px_* py_0* xPy* xpy* ypx* x_* y_* yPx* p0* p1* p2* EKp* EVr* gpot wfc* Tpot 0* V_* K_* Vi_* Ki_* 0i* k s_* si_* *.o *~ PI* $(EXECS) $(OTHER_EXECS) *.dat *.png *.eps *.ii *.i *cudafe* *fatbin* *hash* *module* *ptx test* vort* v_opt*;
41+
@-$(RM) -f r_0 Phi_0 E* px_* py_0* xPy* xpy* ypx* x_* y_* yPx* p0* p1* p2* EKp* EVr* gpot wfc* Tpot 0* V_* K_* Vi_* Ki_* 0i* k s_* si_* *.o *~ PI* $(EXECS) $(OTHER_EXECS) *.dat *.eps *.ii *.i *cudafe* *fatbin* *hash* *module* *ptx test* vort* v_opt*;

bin/run_params.conf

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,10 @@
5757
# -V, -U are the x and y shifts of the kicking potential.
5858
# -a, turns on the graph calculation code. Necessary for vortex annihilation
5959
# -K, selects vortex with specified UID for termination. Plot adjacency matrix of initial state to determine which index (graph_0 --- need to do simulation before you get this; will be updated at some point)
60-
# -D, sets offset for kill vortex distance radially
6160

6261

6362
# Sample simulation data sets
64-
-x 256 -y 256 -T 1e-5 -t 1e-5 -n 1e6 -g 2.01e5 -e 2e5 -p 1000 -r 0 -w 0.65 -o 100 -d 0 -l 1 -s 1 -i 1.0 -P 10000.0 -G 1.0 -L 10 -X 6.28318 -Y 6.28318 -k 0 -O 0.0 -W 1 -U 0 -V 0 -S 3.0 -a 1 -K 1 -D 0.0
65-
-x 512 -y 512 -T 1e-5 -t 1e-5 -n 1e6 -g 2.01e5 -e 2e5 -p 1000 -r 0 -w 0.75 -o 100 -d 1 -l 1 -s 1 -i 1.0 -P 15000.0 -G 1.0 -L 20 -X 6.28318 -Y 6.28318 -k 0 -O 10.0 -W 1 -U 0 -V 0 -S 3.0 -a 1 -K 2 -D 1.0
66-
-x 1024 -y 1024 -T 1e-5 -t 1e-5 -n 1e6 -g 2.01e5 -e 2e5 -p 1000 -r 0 -w 0.85 -o 100 -d 2 -l 1 -s 1 -i 1.0 -P 20000.0 -G 1.0 -L 30 -X 6.28318 -Y 6.28318 -k 0 -O 20.0 -W 1 -U 0 -V 0 -S 3.0 -a 1 -K 3 -D -4.5
67-
-x 2048 -y 2048 -T 1e-5 -t 1e-5 -n 1e6 -g 2.01e5 -e 2e5 -p 1000 -r 0 -w 0.95 -o 100 -d 3 -l 1 -s 1 -i 1.0 -P 25000.0 -G 1.0 -L 0 -X 6.28318 -Y 6.28318 -k 0 -O 0.0 -W 1 -U 0 -V 0 -S 3.0 -a 0 -K 0 -D 0
63+
-x 256 -y 256 -T 1e-5 -t 1e-5 -n 1e6 -g 2.01e5 -e 2e5 -p 1000 -r 0 -w 0.65 -o 100 -d 0 -l 1 -s 1 -i 1.0 -P 10000.0 -G 1.0 -L 10 -X 6.28318 -Y 6.28318 -k 0 -O 0.0 -W 1 -U 0 -V 0 -S 3.0 -a 1 -K 1
64+
-x 512 -y 512 -T 1e-5 -t 1e-5 -n 1e6 -g 2.01e5 -e 2e5 -p 1000 -r 0 -w 0.75 -o 100 -d 1 -l 1 -s 1 -i 1.0 -P 15000.0 -G 1.0 -L 20 -X 6.28318 -Y 6.28318 -k 0 -O 10.0 -W 1 -U 0 -V 0 -S 3.0 -a 1 -K 2
65+
-x 1024 -y 1024 -T 1e-5 -t 1e-5 -n 1e6 -g 2.01e5 -e 2e5 -p 1000 -r 0 -w 0.85 -o 100 -d 2 -l 1 -s 1 -i 1.0 -P 20000.0 -G 1.0 -L 30 -X 6.28318 -Y 6.28318 -k 0 -O 20.0 -W 1 -U 0 -V 0 -S 3.0 -a 1 -K 3
66+
-x 2048 -y 2048 -T 1e-5 -t 1e-5 -n 1e6 -g 2.01e5 -e 2e5 -p 1000 -r 0 -w 0.95 -o 100 -d 3 -l 1 -s 1 -i 1.0 -P 25000.0 -G 1.0 -L 0 -X 6.28318 -Y 6.28318 -k 0 -O 0.0 -W 1 -U 0 -V 0 -S 3.0 -a 0 -K 0

include/constants.h

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,3 @@
1-
///@cond LICENSE
2-
/*** constants.h - GPUE: Split Operator based GPU solver for Nonlinear
3-
Schrodinger Equation, Copyright (C) 2011-2015, Lee J. O'Riordan
4-
<loriordan@gmail.com>, Tadhg Morgan, Neil Crowley.
5-
All rights reserved.
6-
7-
Redistribution and use in source and binary forms, with or without
8-
modification, are permitted provided that the following conditions are
9-
met:
10-
11-
1. Redistributions of source code must retain the above copyright
12-
notice, this list of conditions and the following disclaimer.
13-
14-
2. Redistributions in binary form must reproduce the above copyright
15-
notice, this list of conditions and the following disclaimer in the
16-
documentation and/or other materials provided with the distribution.
17-
18-
3. Neither the name of the copyright holder nor the names of its
19-
contributors may be used to endorse or promote products derived from
20-
this software without specific prior written permission.
21-
22-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
25-
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26-
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
28-
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
29-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33-
*/
341
///@endcond
352
//##############################################################################
363
/**
@@ -44,7 +11,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4411
* @section DESCRIPTION
4512
* This file maintains macros for physical constants.
4613
*/
47-
//##############################################################################
14+
//#############################################################################
4815

4916
#ifndef CONSTANTS_H
5017
#define CONSTANTS_H
@@ -53,7 +20,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5320
#define HBAR 1.05457148e-34 // m^2 kg/s
5421
#define MU_N 5.05078324e-27 // J/T Nuclear magneton
5522
#define MU_B 9.27400915e-24 // J/T Bohr magneton
56-
#define Q 1.602176565e-19 // C Elementary charge of proton
23+
//#define Q 1.602176565e-19 // C Elementary charge of proton
5724
#define MU_0 4*PI*1e-7 // V*S/A*m or H/m or N/A^2 Vacuum permeability
5825
#define EPSILON_0 8.854187817620e-12 // F/m Vacuum permittivity
5926
#define INV_RT_2 0.7071067811865475 // 1/sqrt(2)

0 commit comments

Comments
 (0)