Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seperate plot 4 phases to phase1 and phase234 #266

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
EchoAGI committed May 30, 2021
commit 1f2b2f1a3e01bf9559307f2e76ff409720820109
1 change: 1 addition & 0 deletions _deps/cxxopts-src
Submodule cxxopts-src added at 302302
34 changes: 34 additions & 0 deletions _deps/cxxopts-subbuild/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.

cmake_minimum_required(VERSION 3.20.2)

# We name the project and the target for the ExternalProject_Add() call
# to something that will highlight to the user what we are working on if
# something goes wrong and an error message is produced.

project(cxxopts-populate NONE)

# Pass through things we've already detected in the main project to avoid
# paying the cost of redetecting them again in ExternalProject_Add()
set(GIT_EXECUTABLE [==[/usr/bin/git]==])
set(GIT_VERSION_STRING [==[2.24.3 (Apple Git-128)]==])
set_property(GLOBAL PROPERTY _CMAKE_FindGit_GIT_EXECUTABLE_VERSION
[==[/usr/bin/git;2.24.3 (Apple Git-128)]==]
)


include(ExternalProject)
ExternalProject_Add(cxxopts-populate
"UPDATE_DISCONNECTED" "False" "GIT_REPOSITORY" "https://github.com/jarro2783/cxxopts.git" "GIT_TAG" "v2.2.1"
SOURCE_DIR "/Users/xponly/codebase/chiapos/_deps/cxxopts-src"
BINARY_DIR "/Users/xponly/codebase/chiapos/_deps/cxxopts-build"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
USES_TERMINAL_DOWNLOAD YES
USES_TERMINAL_UPDATE YES
)


Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
repository='https://github.com/jarro2783/cxxopts.git'
module=''
tag='origin'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
repository='https://github.com/jarro2783/cxxopts.git'
module=''
tag='origin'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmd=''
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmd='@cmd@'
1 change: 1 addition & 0 deletions _deps/gulrak-src
Submodule gulrak-src added at 4e21ab
34 changes: 34 additions & 0 deletions _deps/gulrak-subbuild/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.

cmake_minimum_required(VERSION 3.20.2)

# We name the project and the target for the ExternalProject_Add() call
# to something that will highlight to the user what we are working on if
# something goes wrong and an error message is produced.

project(gulrak-populate NONE)

# Pass through things we've already detected in the main project to avoid
# paying the cost of redetecting them again in ExternalProject_Add()
set(GIT_EXECUTABLE [==[/usr/bin/git]==])
set(GIT_VERSION_STRING [==[2.24.3 (Apple Git-128)]==])
set_property(GLOBAL PROPERTY _CMAKE_FindGit_GIT_EXECUTABLE_VERSION
[==[/usr/bin/git;2.24.3 (Apple Git-128)]==]
)


include(ExternalProject)
ExternalProject_Add(gulrak-populate
"UPDATE_DISCONNECTED" "False" "GIT_REPOSITORY" "https://github.com/gulrak/filesystem.git" "GIT_TAG" "v1.5.6"
SOURCE_DIR "/Users/xponly/codebase/chiapos/_deps/gulrak-src"
BINARY_DIR "/Users/xponly/codebase/chiapos/_deps/gulrak-build"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
USES_TERMINAL_DOWNLOAD YES
USES_TERMINAL_UPDATE YES
)


Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
repository='https://github.com/gulrak/filesystem.git'
module=''
tag='origin'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
repository='https://github.com/gulrak/filesystem.git'
module=''
tag='origin'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmd=''
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmd='@cmd@'
1 change: 1 addition & 0 deletions _deps/pybind11-src-src
Submodule pybind11-src-src added at 8de777
34 changes: 34 additions & 0 deletions _deps/pybind11-src-subbuild/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.

cmake_minimum_required(VERSION 3.20.2)

# We name the project and the target for the ExternalProject_Add() call
# to something that will highlight to the user what we are working on if
# something goes wrong and an error message is produced.

project(pybind11-src-populate NONE)

# Pass through things we've already detected in the main project to avoid
# paying the cost of redetecting them again in ExternalProject_Add()
set(GIT_EXECUTABLE [==[/usr/bin/git]==])
set(GIT_VERSION_STRING [==[2.24.3 (Apple Git-128)]==])
set_property(GLOBAL PROPERTY _CMAKE_FindGit_GIT_EXECUTABLE_VERSION
[==[/usr/bin/git;2.24.3 (Apple Git-128)]==]
)


include(ExternalProject)
ExternalProject_Add(pybind11-src-populate
"UPDATE_DISCONNECTED" "False" "GIT_REPOSITORY" "https://github.com/pybind/pybind11.git" "GIT_TAG" "v2.6.2"
SOURCE_DIR "/Users/xponly/codebase/chiapos/_deps/pybind11-src-src"
BINARY_DIR "/Users/xponly/codebase/chiapos/_deps/pybind11-src-build"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
USES_TERMINAL_DOWNLOAD YES
USES_TERMINAL_UPDATE YES
)


Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
repository='https://github.com/pybind/pybind11.git'
module=''
tag='origin'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
repository='https://github.com/pybind/pybind11.git'
module=''
tag='origin'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmd=''
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmd='@cmd@'
Binary file added dist/chiapos1-1.0.3.dev10.tar.gz
Binary file not shown.
140 changes: 140 additions & 0 deletions job.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |

creationTimestamp: "2021-05-15T08:18:46Z"
generation: 3
labels:
app: chia
version: v18
name: chia-con2-1
resourceVersion: "979518313"
selfLink: /apis/extensions/v1beta1/namespaces/dora-apps/daemonsets/chia-con2-1
uid: 2b6b5939-b556-11eb-8a3b-00e0ed58b373
spec:
minReadySeconds: 30
revisionHistoryLimit: 10
selector:
matchLabels:
app: chia
version: v18
template:
metadata:
creationTimestamp: null
labels:
app: chia
owner: "1366780503"
version: v18
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: com/disk
operator: In
values:
- 12x800g
- 12x960g
- matchExpressions:
- key: com/cpu
operator: In
values:
- cpu8160
containers:
- env:
- name: FIRST_TMPDIR
value: /diskmount/1
- name: SECOND_TMPDIR
value: /diskm/2
- name: FINAL_DIR
value: /diskm/2
image: chia-cmd:v18
imagePullPolicy: IfNotPresent
name: chia
resources:
limits:
cpu: "4"
memory: 12Gi
requests:
cpu: "2"
memory: 10Gi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /diskmount/1
name: chia-volume1
- mountPath: /diskm/2
name: chia-volume2
- env:
- name: NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: APP_DEBUG
value: "false"
- name: SERVICE_ADDR
value: http://localhost:12345
- name: SERVICE_NAME
value: xs-chia-v18
- name: RESPONSE_TIMEOUT
value: "604800"
- name: CONCURRENCY
value: "2"
image: consumer:20210510104536-3-master
imagePullPolicy: IfNotPresent
name: task-consumer
resources:
limits:
cpu: 200m
memory: 1Gi
requests:
cpu: 200m
memory: 1Gi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /app/boots-task-consumer.conf
name: boots-task-consumer-config-file
subPath: boots-task-consumer.conf
- mountPath: /app/applog
name: pods-log
subPathExpr: task-consumer/applog
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 90
tolerations:
- effect: NoSchedule
key: com/nodetype
operator: Equal
value: storage-computing
volumes:
- hostPath:
path: /disk1/dora-data
type: ""
name: chia-volume1
- hostPath:
path: /disk13/dora-data1
type: ""
name: chia-volume2
- emptyDir: {}
name: pods-log
- configMap:
defaultMode: 420
name: boots-task-consumer-config
name: boots-task-consumer-config-file
templateGeneration: 3
updateStrategy:
rollingUpdate:
maxUnavailable: 10
type: RollingUpdate
10 changes: 0 additions & 10 deletions python-bindings/chiapos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,27 +128,17 @@ PYBIND11_MODULE(chiapos, m)
const std::string final_dir,
const std::string filename,
uint8_t k,
const py::bytes &memo,
const py::bytes &id,
uint32_t buffmegabytes,
uint32_t num_buckets,
uint32_t stripe_size,
bool nobitfield) {
std::string memo_str(memo);
const uint8_t *memo_ptr = reinterpret_cast<const uint8_t *>(memo_str.data());
std::string id_str(id);
const uint8_t *id_ptr = reinterpret_cast<const uint8_t *>(id_str.data());
try {
dp.CreatePlotDiskPhase234(
tmp_dir,
tmp2_dir,
final_dir,
filename,
k,
memo_ptr,
len(memo),
id_ptr,
len(id),
buffmegabytes,
num_buckets,
stripe_size,
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __str__(self):

ext_modules = [
Extension(
"chiapos",
"chiapos1",
[
"lib/FiniteStateEntropy/lib/entropy_common.c",
"lib/FiniteStateEntropy/lib/fse_compress.c",
Expand Down Expand Up @@ -185,7 +185,7 @@ def build_extensions(self):

if platform.system() == "Windows":
setup(
name="chiapos",
name="chiapos1",
author="Mariano Sorgente",
author_email="mariano@chia.net",
description="Chia proof of space plotting, proving, and verifying (wraps C++)",
Expand All @@ -201,7 +201,7 @@ def build_extensions(self):
)
else:
setup(
name="chiapos",
name="chiapos1",
author="Mariano Sorgente",
author_email="mariano@chia.net",
description="Chia proof of space plotting, proving, and verifying (wraps C++)",
Expand All @@ -210,7 +210,7 @@ def build_extensions(self):
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
url="https://github.com/Chia-Network/chiavdf",
ext_modules=[CMakeExtension("chiapos", ".")],
ext_modules=[CMakeExtension("chiapos1", ".")],
cmdclass=dict(build_ext=CMakeBuild),
zip_safe=False,
)
4 changes: 0 additions & 4 deletions src/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,6 @@ try {
finaldir,
filename,
k,
memo_bytes.data(),
memo_bytes.size(),
id_bytes.data(),
id_bytes.size(),
buffmegabytes,
num_buckets,
num_stripes,
Expand Down
Loading