Skip to content

Conversation

@anton-malakhov
Copy link
Contributor

setup.py Outdated
url ="https://software.intel.com/intel-distribution-for-python",
author ="Intel Corporation",
author_email="scripting@intel.com",
license ="Intel EULA",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be BSD*?

except:
ProcessPoolExecutor = None
ThreadPoolExecutor = None
from ctypes import *

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uh

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's fair.. we'll fix that later though

Copy link

@fschlimb fschlimb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks very nice. As noted, I might be able to give feedback on the content once I better understand what it's doing.

threads_per_process = oversubscription_factor
if cpu_count >= process_count:
threads_per_process = threads_per_process*int(round(float(cpu_count)
/float(process_count)))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure I understand what this block is really doing.

Generally, the entire file has only 2 comments/hints. I have not been involved in any of the discussions about this topic so it's hard to follow what exactly is happening. The description in the other file does not help much either (as it does not go beyond re-phrasing the names of the arguments). There is no explanation what so ever of what this module is supposed to do, e.g. what the different input arguments really mean and how this works.

I suggest you add a high-level description of this file is really doing and add more specific comment to each function. Things like lines 223-225 could also use some comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

process_count=1, process_id=0):
from multiprocessing.pool import worker
set_proc_affinity(process_count, process_id)
worker(inqueue, outqueue, initializer, initargs, maxtasks, wrap_exception)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is almost identical with the 27 version. I see no reason for this code-duplication.

w.name = w.name.replace('Process', 'PoolWorker')
w.daemon = True
w.start()
debug('added worker')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess generally all this code duplication should be avoided.

global max_top_workers

if not sys.platform.startswith('linux'):
raise "Only linux is currently supported"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some platform specific is encoded right now, Anton G will rewrite it later

@anton-malakhov anton-malakhov merged commit 5535665 into master Jul 13, 2017
@anton-malakhov anton-malakhov deleted the feature/publication branch July 13, 2017 03:52
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

Successfully merging this pull request may close these issues.

2 participants