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

Fast PC1 branch seems to go belly up for me #1320

Closed
karalabe opened this issue Oct 18, 2020 · 8 comments
Closed

Fast PC1 branch seems to go belly up for me #1320

karalabe opened this issue Oct 18, 2020 · 8 comments

Comments

@karalabe
Copy link

karalabe commented Oct 18, 2020

I.e. https://app.slack.com/client/TEHTVS1L6/C0179RNEMU4/thread/C0179RNEMU4-1603007653.135600

My hardware setup is: EPYC 7402P, 512GB RAM, PCIe x4 NVMe SSD, Nvidia 1070. Ubuntu 20.04

I've switched to feat/proofs-5.2.3 in lotus to try out the faster PC1 but it failed in a lot of different ways for me on PC2.

Originally I ran with FIL_PROOFS_USE_MULTICORE_SDR=1 but seen super weird behavior so I dropped this env var altogether to keep the change surface a bit smaller. My worker configs were:

Environment=FIL_PROOFS_MAXIMIZE_CACHING=1
Environment=FIL_PROOFS_USE_GPU_COLUMN_BUILDER=1
Environment=FIL_PROOFS_USE_GPU_TREE_BUILDER=1
Environment=BELLMAN_NO_GPU=true
Environment=BELLMAN_CUSTOM_GPU="GeForce GTX 1070:1920"
Environment=FIL_PROOFS_MAX_GPU_COLUMN_BATCH_SIZE=360000
Environment=FIL_PROOFS_SDR_PARENTS_CACHE_SIZE=1073741824
Environment=TRUST_PARAMS=1
Environment=RUST_LOG=info
Environment=RUST_BACKTRACE=1

These configs seem to be stable on the 0.10.2 release branch and never fail.


One immediate error that appeared newly is "msg":"Cannot get device list for platform: Clover!"

The failure that choked all my PC2s were:

Oct 18 09:04:58 filecoin lotus-worker[6450]: thread '<unnamed>' panicked at 'failed to add columns: GPUError("FutharkError(FutharkError { error: \"./lib/a.c:21158: OpenCL call\\n  opencl_alloc(&ctx->opencl, size, desc, &block->mem)\\nfailed with error code -4 (Memory object allocation failure)\\n\" })")', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/storage-proofs-porep-5.2.3/src/stacked/vanilla/proof.rs:548:71
Oct 18 09:04:58 filecoin lotus-worker[6450]: stack backtrace:
Oct 18 09:04:58 filecoin lotus-worker[6450]:    0: rust_begin_unwind
Oct 18 09:04:58 filecoin lotus-worker[6450]:              at ./rustc/beb5ae474d2835962ebdf7416bd1c9ad864fe101/library/std/src/panicking.rs:483
Oct 18 09:04:58 filecoin lotus-worker[6450]:    1: core::panicking::panic_fmt
Oct 18 09:04:58 filecoin lotus-worker[6450]:              at ./rustc/beb5ae474d2835962ebdf7416bd1c9ad864fe101/library/core/src/panicking.rs:85
Oct 18 09:04:58 filecoin lotus-worker[6450]:    2: core::option::expect_none_failed
Oct 18 09:04:58 filecoin lotus-worker[6450]:              at ./rustc/beb5ae474d2835962ebdf7416bd1c9ad864fe101/library/core/src/option.rs:1234
Oct 18 09:04:58 filecoin lotus-worker[6450]:    3: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
Oct 18 09:04:58 filecoin lotus-worker[6450]:    4: std::panicking::try
Oct 18 09:04:58 filecoin lotus-worker[6450]:    5: <rayon_core::job::HeapJob<BODY> as rayon_core::job::Job>::execute
Oct 18 09:04:58 filecoin lotus-worker[6450]:    6: rayon_core::registry::WorkerThread::wait_until_cold
Oct 18 09:04:58 filecoin lotus-worker[6450]:    7: rayon_core::scope::ScopeBase::steal_till_jobs_complete
Oct 18 09:04:58 filecoin lotus-worker[6450]:    8: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
Oct 18 09:04:58 filecoin lotus-worker[6450]:    9: <rayon_core::job::StackJob<L,F,R> as rayon_core::job::Job>::execute
Oct 18 09:04:58 filecoin lotus-worker[6450]:   10: rayon_core::registry::WorkerThread::wait_until_cold
Oct 18 09:04:58 filecoin lotus-worker[6450]:   11: rayon_core::registry::ThreadBuilder::run
Oct 18 09:04:58 filecoin lotus-worker[6450]: note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Oct 18 09:04:59 filecoin lotus-worker[6450]: thread '<unnamed>' panicked at 'failed to send columns: "SendError(..)"', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/storage-proofs-porep-5.2.3/src/stacked/vanilla/proof.rs:523:34
Oct 18 09:04:59 filecoin lotus-worker[6450]: stack backtrace:
Oct 18 09:04:59 filecoin lotus-worker[6450]:    0: rust_begin_unwind
Oct 18 09:04:59 filecoin lotus-worker[6450]:              at ./rustc/beb5ae474d2835962ebdf7416bd1c9ad864fe101/library/std/src/panicking.rs:483
Oct 18 09:04:59 filecoin lotus-worker[6450]:    1: core::panicking::panic_fmt
Oct 18 09:04:59 filecoin lotus-worker[6450]:              at ./rustc/beb5ae474d2835962ebdf7416bd1c9ad864fe101/library/core/src/panicking.rs:85
Oct 18 09:04:59 filecoin lotus-worker[6450]:    2: core::option::expect_none_failed
Oct 18 09:04:59 filecoin lotus-worker[6450]:              at ./rustc/beb5ae474d2835962ebdf7416bd1c9ad864fe101/library/core/src/option.rs:1234
Oct 18 09:04:59 filecoin lotus-worker[6450]:    3: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
Oct 18 09:04:59 filecoin lotus-worker[6450]:    4: std::panicking::try
Oct 18 09:04:59 filecoin lotus-worker[6450]:    5: <rayon_core::job::HeapJob<BODY> as rayon_core::job::Job>::execute
Oct 18 09:04:59 filecoin lotus-worker[6450]:    6: rayon_core::registry::WorkerThread::wait_until_cold
Oct 18 09:04:59 filecoin lotus-worker[6450]:    7: rayon_core::registry::ThreadBuilder::run
Oct 18 09:04:59 filecoin lotus-worker[6450]: note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
@karalabe
Copy link
Author

karalabe commented Oct 18, 2020

Digging a bit deeper, listing clinfo says there's no Clover devices, only CUDA devices, perhaps that might be the root of some issue?

# clinfo 
Number of platforms                               2
  Platform Name                                   NVIDIA CUDA
  Platform Vendor                                 NVIDIA Corporation
  Platform Version                                OpenCL 1.2 CUDA 11.0.228
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts cl_nv_create_buffer cl_khr_int64_base_atomics cl_khr_int64_extended_atomics
  Platform Extensions function suffix             NV

  Platform Name                                   Clover
  Platform Vendor                                 Mesa
  Platform Version                                OpenCL 1.1 Mesa 20.0.8
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd
  Platform Extensions function suffix             MESA

  Platform Name                                   NVIDIA CUDA
Number of devices                                 1
  Device Name                                     GeForce GTX 1070
  Device Vendor                                   NVIDIA Corporation
  Device Vendor ID                                0x10de
  Device Version                                  OpenCL 1.2 CUDA
  Driver Version                                  450.66
  Device OpenCL C Version                         OpenCL C 1.2 
  Device Type                                     GPU
  Device Topology (NV)                            PCI-E, c1:00.0
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Max compute units                               15
  Max clock frequency                             1771MHz
  Compute Capability (NV)                         6.1
  Device Partition                                (core)
    Max number of sub-devices                     1
    Supported partition types                     None
    Supported affinity domains                    (n/a)
  Max work item dimensions                        3
  Max work item sizes                             1024x1024x64
  Max work group size                             1024
  Preferred work group size multiple              32
  Warp size (NV)                                  32
  Preferred / native vector sizes                 
    char                                                 1 / 1       
    short                                                1 / 1       
    int                                                  1 / 1       
    long                                                 1 / 1       
    half                                                 0 / 0        (n/a)
    float                                                1 / 1       
    double                                               1 / 1        (cl_khr_fp64)
  Half-precision Floating-point support           (n/a)
  Single-precision Floating-point support         (core)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  Yes
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
  Address bits                                    64, Little-Endian
  Global memory size                              8511881216 (7.927GiB)
  Error Correction support                        No
  Max memory allocation                           2127970304 (1.982GiB)
  Unified memory for Host and Device              No
  Integrated memory (NV)                          No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       4096 bits (512 bytes)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        737280 (720KiB)
  Global Memory cache line size                   128 bytes
  Image support                                   Yes
    Max number of samplers per kernel             32
    Max size for 1D images from buffer            268435456 pixels
    Max 1D or 2D image array size                 2048 images
    Max 2D image size                             16384x32768 pixels
    Max 3D image size                             16384x16384x16384 pixels
    Max number of read image args                 256
    Max number of write image args                16
  Local memory type                               Local
  Local memory size                               49152 (48KiB)
  Registers per block (NV)                        65536
  Max number of constant args                     9
  Max constant buffer size                        65536 (64KiB)
  Max size of kernel argument                     4352 (4.25KiB)
  Queue properties                                
    Out-of-order execution                        Yes
    Profiling                                     Yes
  Prefer user sync for interop                    No
  Profiling timer resolution                      1000ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
    Kernel execution timeout (NV)                 No
  Concurrent copy and kernel execution (NV)       Yes
    Number of async copy engines                  2
  printf() buffer size                            1048576 (1024KiB)
  Built-in kernels                                (n/a)
  Device Extensions                               cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts cl_nv_create_buffer cl_khr_int64_base_atomics cl_khr_int64_extended_atomics

  Platform Name                                   Clover
Number of devices                                 0

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  No platform
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   No platform
  clCreateContext(NULL, ...) [default]            No platform
  clCreateContext(NULL, ...) [other]              Success [NV]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  No platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  No platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  Invalid device type for platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  No platform

Edit: No idea what Clover is or why you'd all of a sudden try to access it mind you.

@porcuquine
Copy link
Collaborator

Thanks, @karalabe. I think I know what is going on here, and it looks like it may be orthogonal to the intended feature here. It looks like the way we absorbed an unrelated fix caused some previously unreleased code (neptune 1.2.0) to make it in along with the (unrelated to this work) fix (neptune 1.2.1). I think we can probably address this particular issue by going back to the previously-used version of neptune (1.1.1) and applying the needed fix to produce 1.1.2 — leaving out the apparently problematic 1.2.0.

@magik6k @cryptonemo I can prepare a suitable neptune 1.1.2 tomorrow, which may then require pinning the version in the API/FFI.

@porcuquine
Copy link
Collaborator

Towards a fix to the main issues noted here: #1322

@porcuquine
Copy link
Collaborator

@karalabe I have an idea. Can you please run nvidia-smi and paste the complete output here?

@porcuquine
Copy link
Collaborator

porcuquine commented Oct 21, 2020

I think I was able to reproduce (in a different context) and fix the problem you're having: argumentcomputer/neptune#60.

I can create a new patch version 1.2.2, but that will still probably require a new release of API and/or FFI (cc: @cryptonemo) before the lotus test branch can use it.

@karalabe
Copy link
Author

I've just upgraded my GPU and updated the driver, so not sure I can get you the old smi.

@porcuquine
Copy link
Collaborator

It's okay. I think there's a good chance the patch above will fix this problem (not sure about what comes next) once it makes its way into the branch you're using.

@karalabe
Copy link
Author

This was fixed on lotus master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants