GenSim Simulation Program

In [1]:
%%bash
cd ..
qmake -project
ls -lrt
total 776
-rw-r--r--@ 1 haocheng  staff    1492 Dec 12 22:28 genome_info.h
-rw-r--r--@ 1 haocheng  staff     889 Dec 12 22:33 cohort.h
-rw-r--r--@ 1 haocheng  staff    1079 Dec 12 22:39 tools.h
-rw-r--r--@ 1 haocheng  staff    1717 Dec 12 22:39 tools.cpp
-rw-r--r--@ 1 haocheng  staff     270 Dec 12 22:39 ped.h
-rw-r--r--@ 1 haocheng  staff     426 Dec 12 22:39 global.h
-rw-r--r--@ 1 haocheng  staff    2281 Dec 12 22:44 animal_class.h
-rw-r--r--@ 1 haocheng  staff    3577 Dec 13 16:47 parmMap.cpp
-rw-r--r--@ 1 haocheng  staff    1438 Dec 13 18:58 simPop.h
-rw-r--r--@ 1 haocheng  staff    2046 Dec 13 19:16 genome_info.cpp
-rw-r--r--@ 1 haocheng  staff    4604 Dec 13 19:55 cohort.cpp
-rw-r--r--@ 1 haocheng  staff   18382 Dec 13 19:55 animal_class.cpp
-rw-r--r--@ 1 haocheng  staff    5092 Dec 13 19:58 simPop.cpp
-rw-r--r--@ 1 haocheng  staff     992 Dec 13 20:25 parmMap.h
-rw-r--r--@ 1 haocheng  staff  302224 Dec 13 20:25 libGenSim.a
-rw-r--r--@ 1 haocheng  staff    1299 Dec 13 20:54 main.cpp
-rw-r--r--@ 1 haocheng  staff     350 Dec 13 20:54 makeGenSim
drwxr-xr-x@ 9 haocheng  staff     306 Dec 13 20:56 ReadMe
-rw-r--r--  1 haocheng  staff     635 Dec 13 20:57 GenSim1.3.pro

In [2]:
%%bash
cd ..
cat GenSim1.3.pro
######################################################################
# Automatically generated by qmake (2.01a) Sat Dec 13 20:57:27 2014
######################################################################

TEMPLATE = app
TARGET = 
DEPENDPATH += .
INCLUDEPATH += .

# Input
HEADERS += animal_class.h \
           cohort.h \
           genome_info.h \
           global.h \
           parmMap.h \
           ped.h \
           simPop.h \
           tools.h
SOURCES += animal_class.cpp \
           cohort.cpp \
           genome_info.cpp \
           main.cpp \
           parmMap.cpp \
           simPop.cpp \
           tools.cpp

In [7]:
%%file GenSim.pro


######################################################################
# Automatically generated by qmake (2.01a) Sat Dec 13 20:11:00 2014
######################################################################

TEMPLATE = lib
CONFIG   = staticlib
TARGET = 
DEPENDPATH += .
INCLUDEPATH += . \
               /Users/erxingfangshui/Dropbox/CODE/eigen3 \
               /Users/erxingfangshui/Dropbox/CODE/boost
#QMAKE_CXXFLAGS += -std=c++11 -stdlib=libc++ -mmacosx-version-min=10.7 


# Input
HEADERS += animal_class.h \
           cohort.h \
           genome_info.h \
           global.h \
           parmMap.h \
           ped.h \
           simPop.h \
           tools.h
SOURCES += animal_class.cpp \
           cohort.cpp \
           genome_info.cpp \
           parmMap.cpp \
           simPop.cpp \
           tools.cpp
Writing GenSim.pro

In [8]:
%%bash
mv GenSim.pro ../
In [9]:
%%bash
cd ..
qmake -spec /anaconda/mkspecs/darwin-g++ GenSim.pro

#to use llvm , the line QMAKE_CXXFLAGS in GenSim.pro is needed.
#qmake -spec /anaconda/mkspecs/macx-llvm GenSim.pro
In [10]:
%%bash
cd ..
make
llvm-g++ -c -pipe -std=c++11 -stdlib=libc++ -mmacosx-version-min=10.7 -O2 -fPIC  -I/anaconda/mkspecs/macx-llvm -I. -I. -I../../CODE/eigen3 -I../../CODE/boost -o animal_class.o animal_class.cpp
llvm-g++ -c -pipe -std=c++11 -stdlib=libc++ -mmacosx-version-min=10.7 -O2 -fPIC  -I/anaconda/mkspecs/macx-llvm -I. -I. -I../../CODE/eigen3 -I../../CODE/boost -o cohort.o cohort.cpp
llvm-g++ -c -pipe -std=c++11 -stdlib=libc++ -mmacosx-version-min=10.7 -O2 -fPIC  -I/anaconda/mkspecs/macx-llvm -I. -I. -I../../CODE/eigen3 -I../../CODE/boost -o genome_info.o genome_info.cpp
llvm-g++ -c -pipe -std=c++11 -stdlib=libc++ -mmacosx-version-min=10.7 -O2 -fPIC  -I/anaconda/mkspecs/macx-llvm -I. -I. -I../../CODE/eigen3 -I../../CODE/boost -o parmMap.o parmMap.cpp
llvm-g++ -c -pipe -std=c++11 -stdlib=libc++ -mmacosx-version-min=10.7 -O2 -fPIC  -I/anaconda/mkspecs/macx-llvm -I. -I. -I../../CODE/eigen3 -I../../CODE/boost -o simPop.o simPop.cpp
llvm-g++ -c -pipe -std=c++11 -stdlib=libc++ -mmacosx-version-min=10.7 -O2 -fPIC  -I/anaconda/mkspecs/macx-llvm -I. -I. -I../../CODE/eigen3 -I../../CODE/boost -o tools.o tools.cpp
rm -f libGenSim.a
ar cq libGenSim.a animal_class.o cohort.o genome_info.o parmMap.o simPop.o tools.o
ranlib -s libGenSim.a

In [11]:
%%bash
cd ..
rm *.o *.pro
rm Makefile