ledatelescope / bifrost

A stream processing framework for high-throughput applications.
BSD 3-Clause "New" or "Revised" License
66 stars 29 forks source link

Testbench:BF_STATUS_INVALID_ARGUMENT #123

Closed Leeying1235 closed 5 years ago

Leeying1235 commented 5 years ago

@telegraphic @jaycedowell Sorry to bother you both, another problem i have met when i'm running the testbench,the details is below:

python test_fft.py
digraph cluster_Pipeline_0 {
    "Pipeline_0/BinaryFileReadBlock_0" [label=BinaryFileReadBlock_0 fillcolor=white shape=box style=filled]
    ring_0 [fillcolor=deepskyblue shape=ellipse style=filled]
    "Pipeline_0/BinaryFileReadBlock_0" -> ring_0
    "Pipeline_0/CopyBlock_0" [label=CopyBlock_0 fillcolor=lightsteelblue shape=box style=filled]
    ring_2 [fillcolor=limegreen shape=ellipse style=filled]
    "Pipeline_0/CopyBlock_0" -> ring_2
    ring_0 -> "Pipeline_0/CopyBlock_0"
    "Pipeline_0/FftBlock_0" [label=FftBlock_0 fillcolor=white shape=box style=filled]
    ring_3 [fillcolor=limegreen shape=ellipse style=filled]
    "Pipeline_0/FftBlock_0" -> ring_3
    ring_2 -> "Pipeline_0/FftBlock_0"
    "Pipeline_0/CopyBlock_1" [label=CopyBlock_1 fillcolor=lightsteelblue shape=box style=filled]
    ring_5 [fillcolor=orange shape=ellipse style=filled]
    "Pipeline_0/CopyBlock_1" -> ring_5
    ring_3 -> "Pipeline_0/CopyBlock_1"
    "Pipeline_0/BinaryFileWriteBlock_0" [label=BinaryFileWriteBlock_0 fillcolor=white shape=box style=filled]
    ring_5 -> "Pipeline_0/BinaryFileWriteBlock_0"
}
affinity.cpp:45 Condition failed: core >= -1 && core < ncore
affinity.cpp:45 error 10: BF_STATUS_INVALID_ARGUMENT
Exception in thread Pipeline_0/BinaryFileWriteBlock_0:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/bifrost-0.8.0-py2.7.egg/bifrost/pipeline.py", line 346, in run
    bf.affinity.set_core(core if isinstance(core, int) else core[0])
  File "/usr/local/lib/python2.7/dist-packages/bifrost-0.8.0-py2.7.egg/bifrost/affinity.py", line 34, in set_core
    _check(_bf.bfAffinitySetCore(core))
  File "/usr/local/lib/python2.7/dist-packages/bifrost-0.8.0-py2.7.egg/bifrost/libbifrost.py", line 103, in _check
    raise RuntimeError(status_str)
RuntimeError: BF_STATUS_INVALID_ARGUMENT

Could you tell me what's happened and how can i solve this ? Thank you !

telegraphic commented 5 years ago

Hi, it looks like the core bindings aren't working, can you remove the core= arguments in the blocks?

How many CPU cores does your computer have?

On Tue., 16 Oct. 2018, 18:12 Leeying1235, notifications@github.com wrote:

@telegraphic https://github.com/telegraphic @jaycedowell https://github.com/jaycedowell Sorry to bother you both, another problem i have met when i'm running the testbench,the details is below:

python test_fft.py digraph cluster_Pipeline_0 { "Pipeline_0/BinaryFileReadBlock_0" [label=BinaryFileReadBlock_0 fillcolor=white shape=box style=filled] ring_0 [fillcolor=deepskyblue shape=ellipse style=filled] "Pipeline_0/BinaryFileReadBlock_0" -> ring_0 "Pipeline_0/CopyBlock_0" [label=CopyBlock_0 fillcolor=lightsteelblue shape=box style=filled] ring_2 [fillcolor=limegreen shape=ellipse style=filled] "Pipeline_0/CopyBlock_0" -> ring_2 ring_0 -> "Pipeline_0/CopyBlock_0" "Pipeline_0/FftBlock_0" [label=FftBlock_0 fillcolor=white shape=box style=filled] ring_3 [fillcolor=limegreen shape=ellipse style=filled] "Pipeline_0/FftBlock_0" -> ring_3 ring_2 -> "Pipeline_0/FftBlock_0" "Pipeline_0/CopyBlock_1" [label=CopyBlock_1 fillcolor=lightsteelblue shape=box style=filled] ring_5 [fillcolor=orange shape=ellipse style=filled] "Pipeline_0/CopyBlock_1" -> ring_5 ring_3 -> "Pipeline_0/CopyBlock_1" "Pipeline_0/BinaryFileWriteBlock_0" [label=BinaryFileWriteBlock_0 fillcolor=white shape=box style=filled] ring_5 -> "Pipeline_0/BinaryFileWriteBlock_0" } affinity.cpp:45 Condition failed: core >= -1 && core < ncore affinity.cpp:45 error 10: BF_STATUS_INVALID_ARGUMENT Exception in thread Pipeline_0/BinaryFileWriteBlock_0: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 754, in run self.target(*self.args, **self.__kwargs) File "/usr/local/lib/python2.7/dist-packages/bifrost-0.8.0-py2.7.egg/bifrost/pipeline.py", line 346, in run bf.affinity.set_core(core if isinstance(core, int) else core[0]) File "/usr/local/lib/python2.7/dist-packages/bifrost-0.8.0-py2.7.egg/bifrost/affinity.py", line 34, in set_core _check(_bf.bfAffinitySetCore(core)) File "/usr/local/lib/python2.7/dist-packages/bifrost-0.8.0-py2.7.egg/bifrost/libbifrost.py", line 103, in _check raise RuntimeError(status_str) RuntimeError: BF_STATUS_INVALID_ARGUMENT

Could you tell me what's happened and how can i solve this ? Thank you !

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ledatelescope/bifrost/issues/123, or mute the thread https://github.com/notifications/unsubscribe-auth/AAriI4Ty1Bh420cv9QIOmxNz_ymsemSoks5ulYbwgaJpZM4Xdt4D .

Leeying1235 commented 5 years ago

@telegraphic There are 4 CPUs on my computer. I removed the core=argu in the blocks, and then i ran it again,i got this:

python test_fft.py
digraph cluster_Pipeline_0 {
    "Pipeline_0/BinaryFileReadBlock_0" [label=BinaryFileReadBlock_0 fillcolor=white shape=box style=filled]
    ring_0 [fillcolor=deepskyblue shape=ellipse style=filled]
    "Pipeline_0/BinaryFileReadBlock_0" -> ring_0
    "Pipeline_0/CopyBlock_0" [label=CopyBlock_0 fillcolor=lightsteelblue shape=box style=filled]
    ring_2 [fillcolor=limegreen shape=ellipse style=filled]
    "Pipeline_0/CopyBlock_0" -> ring_2
    ring_0 -> "Pipeline_0/CopyBlock_0"
    "Pipeline_0/FftBlock_0" [label=FftBlock_0 fillcolor=white shape=box style=filled]
    ring_3 [fillcolor=limegreen shape=ellipse style=filled]
    "Pipeline_0/FftBlock_0" -> ring_3
    ring_2 -> "Pipeline_0/FftBlock_0"
    "Pipeline_0/CopyBlock_1" [label=CopyBlock_1 fillcolor=lightsteelblue shape=box style=filled]
    ring_5 [fillcolor=orange shape=ellipse style=filled]
    "Pipeline_0/CopyBlock_1" -> ring_5
    ring_3 -> "Pipeline_0/CopyBlock_1"
    "Pipeline_0/BinaryFileWriteBlock_0" [label=BinaryFileWriteBlock_0 fillcolor=white shape=box style=filled]
    ring_5 -> "Pipeline_0/BinaryFileWriteBlock_0"
}
terminate called after throwing an instance of 'thrust::system::system_error'
  what():  function_attributes(): after cudaFuncGetAttributes: invalid device function
Leeying1235 commented 5 years ago

@telegraphic Sorry,there are only 2 CPU cores on my computer, and 4 processors.

jaycedowell commented 5 years ago

Ah, it looks like test_fft.py assumes that you have five and uses a different core for each block.

Are you still using the GTX 790 and is your user.mk file setup to target them, ie., GPU_ARCHS ?= 30?

Leeying1235 commented 5 years ago

@jaycedowell No, i'm using GTX 950M. And it works after i change the GPU_ARCHS in user.mk and core=argu in test_fft.py. So does it means that when i'm using bifrost,the value of argument core should be less than or equal to 2 on my computer(with only 2 CPU cores)?

jaycedowell commented 5 years ago

You should be able use as many cores as CPUs listed in /proc/cpuinfo. For your setup I think that if you changed core=4 to core=3 in the BinaryFileWriteBlock() then test_fft.py should run.

Leeying1235 commented 5 years ago

@jaycedowell yeah, it works.Thank you! Close now.