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

matlabpool_cluster function #14

Open
JohnGriffiths opened this issue Oct 17, 2017 · 1 comment
Open

matlabpool_cluster function #14

JohnGriffiths opened this issue Oct 17, 2017 · 1 comment

Comments

@JohnGriffiths
Copy link
Collaborator

First time running the code and when trying

run fit_kaggle.m

it throws up error

Undefined function or variable 'matlabpool_cluster'.

some cursory googling suggests to me this isn't a built-in matlab function. Perhaps it's a custom utils function not contained in this repo??

@RomeshA
Copy link
Contributor

RomeshA commented Dec 4, 2017

I'll update this properly when I next get a chance, but it will be fine to comment this line out. It's indeed not in this repo, the contents of that function are

function matlabpool_cluster(n)
	% Open a matlabpool with data storage in a temporary directory
	% This prevents multiple pools on the same machine from interacting
	%matlabpool close force
	c=parcluster();
	t=tempname();
	mkdir(t);
	fprintf('Matlabpool storage: %s\n',t);
	c.JobStorageLocation=t;
	c.NumWorkers = n;

	[~, hostname] = system('hostname');
	s = RandStream('mt19937ar','Seed',sum(hostname));
	holdtime = round(10*rand(s,1,1));
	fprintf('Holding for %ds...\n',holdtime);
	pause(holdtime);
	matlabpool(c, c.NumWorkers);
	startup

So all it does is open a matlabpool with a particular storage directory - on the USYD cluster with shared storage, workers on different compute nodes would all try to write their temporary files to the same shared directory otherwise. If you're just running this on a normal machine, then there is no need for this functionality, it should be fine to just open a parallel pool prior to calling fit_kaggle and comment that line out

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