Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
lifengjin committed Aug 13, 2017
2 parents c7be9b0 + f22110c commit d8298cd
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 19 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "cusp"]
path = cusplibrary
url = https://github.com/cusplibrary/cusplibrary.git
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ gpusrc/hmmsampler.o: gpusrc/temp.o
${CUDA_PATH}/bin/nvcc -dlink -o $@ $^ -lcudart --shared -Xcompiler -fPIC -m64 -L${CUDA_PATH}/lib64 -Xlinker -rpath -Xlinker ${CUDA_PATH}/lib64

gpusrc/temp.o: gpusrc/HmmSampler.cu gpusrc/State.cu gpusrc/HmmSampler.h
${CUDA_PATH}/bin/nvcc -rdc=true -c -o $@ $< -std=c++11 --shared -Xcompiler -fPIC -m64
${CUDA_PATH}/bin/nvcc -rdc=true -c -o $@ $< -Icusplibrary/ -std=c++11 --shared -Xcompiler -fPIC -m64

config/myconfig.ini: config/d1train.ini
cp $< $@
Expand Down
22 changes: 11 additions & 11 deletions config/d1train.ini
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
[io]
input_file=data/simplewiki_d1_tagwords.ints.txt
input_file=gendata/simplewiki_d1.tagwords.ints.txt
output_dir=outputs/d1sents
dict_file=data/simplewiki_d1_tagwords.dict
dict_file=gendata/simplewiki_d1.tagwords.dict

[params]
## debugging params -- burnin normally is ~500, num_samples ~ 100, sample_iters ~ 1000
burnin=1
num_samples=1
sample_iters=1
starta=5
startb=5
startg=10
startabp=10
discount=0
alphaa=0.5
alphab=0.5
alphag=0.5
alphaf=0.1
alphaj=0.1
init_alpha=0.5
#alphab=0.5
#alphag=0.5
#alphaf=0.1
#alphaj=0.1
gamma=0.1
num_procs=3
cpu_workers=1
finite=1
gpu=1
gpu_workers=1
1 change: 1 addition & 0 deletions cusplibrary
Submodule cusplibrary added at 4f72f1
14 changes: 7 additions & 7 deletions gpusrc/compile_osc.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
#!/bin/bash
# a 'include' folder will be created above uhhmm
module load cuda/7.5.18
module load python/3.4.2
module load gnu/4.9.1
#module load cuda/8.0.44
#module load python/3.5
#module load gnu/4.8.5
cd ../
mkdir include
git clone https://github.com:cusplibrary/cusplibrary.git
git clone https://github.com/cusplibrary/cusplibrary.git
mv cusplibrary/cusp include/
rm -rf cusplibrary
cd -
nvcc -rdc=true -c -o gpusrc/temp.o gpusrc/HmmSampler.cu -std=c++11 --shared -Xcompiler -fPIC -m64 -I../include
nvcc -dlink -o gpusrc/hmmsampler.o gpusrc/temp.o -lcudart --shared -Xcompiler -fPIC -m64 -L/usr/local/cuda/7.5.18/lib64 -Xlinker -rpath -Xlinker /usr/local/cuda/7.5.18
nvcc -dlink -o gpusrc/hmmsampler.o gpusrc/temp.o -lcudart --shared -Xcompiler -fPIC -m64 -L/usr/local/cuda/8.0.44/lib64 -Xlinker -rpath -Xlinker /usr/local/cuda/8.0.44
ar cru gpusrc/libhmm.a gpusrc/hmmsampler.o gpusrc/temp.o
ranlib gpusrc/libhmm.a
cython --cplus gpusrc/CHmmSampler.pyx
# clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c++11 -I/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m -Isrc -I/usr/local/include/ -c CHmmSampler.cpp -o build/CHmmSampler.o -std=c++11 -L. -lhmm -L/usr/local/cuda/lib -lcudart
#x86_64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.4/dist-packages/numpy/core/include -I/usr/include/python3.4m -I/usr/local/include/ -c CHmmSampler.cpp -o build/CHmmSampler.o -w -std=c++11 -L. -lhmm -L/usr/local/cuda/lib -lcudart
g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/anaconda/anaconda3/lib/python3.4/site-packages/numpy/core/include -I/usr/local/anaconda/anaconda3/include/python3.4m -I/usr/local/include/ -c gpusrc/CHmmSampler.cpp -o gpusrc/CHmmSampler.o -w -std=c++11 -L/usr/local/cuda/7.5.18/lib64 -lcudart -L/usr/local/anaconda/anaconda3/lib -lpython3.4m -Lgpusrc/ -lhmm
g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/users/PAS1200/osu0895/envs/nn3/lib/python3.6/site-packages/numpy/core/include -I/users/PAS1200/osu0895/envs/nn3/include/python3.6m -I/usr/local/include/ -c gpusrc/CHmmSampler.cpp -o gpusrc/CHmmSampler.o -w -std=c++11 -L/usr/local/cuda/8.0.44/lib64 -lcudart -L/users/PAS1200/osu0895/envs/nn3/lib -lpython3.6m -Lgpusrc/ -lhmm
# clang -bundle -undefined dynamic_lookup -arch x86_64 -g -std=c++11 build/CHmmSampler.o libhmm.a -o build/CHmmSampler.so -L. -lhmm -L/usr/local/cuda/lib -lcudart
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -std=c++11 gpusrc/CHmmSampler.o gpusrc/libhmm.a -o scripts/CHmmSampler.so -Lgpusrc/ -lhmm -L/usr/local/cuda/7.5.18/lib64 -lcudart
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -std=c++11 gpusrc/CHmmSampler.o gpusrc/libhmm.a -o scripts/CHmmSampler.so -Lgpusrc/ -lhmm -L/usr/local/cuda/8.0.44/lib64 -lcudart
rm gpusrc/temp.o
rm gpusrc/hmmsampler.o
rm gpusrc/libhmm.a
Expand Down

0 comments on commit d8298cd

Please sign in to comment.