sasomao

622 Reputation

7 Badges

17 years, 229 days
Phd.
Paris, France

MaplePrimes Activity


These are replies submitted by sasomao

Hi Pagan,

that is a good question. There are many answer actually.

The mpl is ~ 1000 lines long (and it reads functions from a different files, another ~1300 lines), and it performs various task, beside computation (changing directory, making directories, saving files, etc). In its first version it simply contained a line

logDistance:= a_value

that was used in the body. Afterwards the need came to use different values for logDistance (as well as other parameters), and it was quite annoying having to open the mpl each time, look for the right line, and modify him.

What I did is that I created a new file with just 4 lines, assigning the values for those parameters there (much simpler modify a file with 4 lines than one with 1000), and reading him from the mpl.

The reason I didn't do what might seem more natural (a for over the possible valus of logDistance) is that I can run on a network of ~20 computers, each one with maple. With the for over the distances I should have run all the possible values in a single job, or instead run over a small set of logDistances, then change computer, and run on a different set, and so on.

But at this point it was much simpler and elegant (I think) to do as explained in this thread, with a bash file that runs over some distances. What I've to do, now, is 

1) go on a pc of the network,
2) change the value in the for cicle: for dist in "100" "200" ; do etc 
3) run the bash file
4) change pc and start from 2

and I won't touch any sensible maple files, just this bash file.

You also need to know that the mpl saves its stuff in a folder which contains the numerical value of some parameters (logDistance, between others) in its name, then it's easy to see which run produces which files.

That's all! If you have suggestions they are obviusly welcomed.

salvatore 

 

ps: for each distance the program may take up to 12hrs, from here the reason I want to share the jobs between different PCs

Hi Pagan,

that is a good question. There are many answer actually.

The mpl is ~ 1000 lines long (and it reads functions from a different files, another ~1300 lines), and it performs various task, beside computation (changing directory, making directories, saving files, etc). In its first version it simply contained a line

logDistance:= a_value

that was used in the body. Afterwards the need came to use different values for logDistance (as well as other parameters), and it was quite annoying having to open the mpl each time, look for the right line, and modify him.

What I did is that I created a new file with just 4 lines, assigning the values for those parameters there (much simpler modify a file with 4 lines than one with 1000), and reading him from the mpl.

The reason I didn't do what might seem more natural (a for over the possible valus of logDistance) is that I can run on a network of ~20 computers, each one with maple. With the for over the distances I should have run all the possible values in a single job, or instead run over a small set of logDistances, then change computer, and run on a different set, and so on.

But at this point it was much simpler and elegant (I think) to do as explained in this thread, with a bash file that runs over some distances. What I've to do, now, is 

1) go on a pc of the network,
2) change the value in the for cicle: for dist in "100" "200" ; do etc 
3) run the bash file
4) change pc and start from 2

and I won't touch any sensible maple files, just this bash file.

You also need to know that the mpl saves its stuff in a folder which contains the numerical value of some parameters (logDistance, between others) in its name, then it's easy to see which run produces which files.

That's all! If you have suggestions they are obviusly welcomed.

salvatore 

 

ps: for each distance the program may take up to 12hrs, from here the reason I want to share the jobs between different PCs

Hi

yes I meant string of course, I was working with both python and maple and my brain gave up :-)

I tried your code and it  works. In the meantime, after some trials and errors, I had found this solution:

for dist in "100" "200" ; do

nohup "`nice -n19 /usr/local/maple/bin/maple -c \"assign(distance_eff_string,convert($dist,string))\" < $PWD/MultiExternal.mpl> out$dist.out`" &

done 

 

but I've to avoid I've no idea of the reason it works :-)

 

salvatore

Hi

yes I meant string of course, I was working with both python and maple and my brain gave up :-)

I tried your code and it  works. In the meantime, after some trials and errors, I had found this solution:

for dist in "100" "200" ; do

nohup "`nice -n19 /usr/local/maple/bin/maple -c \"assign(distance_eff_string,convert($dist,string))\" < $PWD/MultiExternal.mpl> out$dist.out`" &

done 

 

but I've to avoid I've no idea of the reason it works :-)

 

salvatore

Hi Acer, all

yep this is enough (for the moment at least). I just have some troubles in wrinting a bash code (I'm sure I'm screwing the quotation marks!). I want to do something like

# !/bin/bash

for dist in "100" "200" ; do

nohup nice -n19 maple  -c "assign(distance,convert($dist,str)) <code.mpl> out_$dist.out &

done 

 

but it is not working. I've tried to put " and ` here and there but I don't get it working. Could you help? 

 

thanks

Salvatore

Hi Acer, all

yep this is enough (for the moment at least). I just have some troubles in wrinting a bash code (I'm sure I'm screwing the quotation marks!). I want to do something like

# !/bin/bash

for dist in "100" "200" ; do

nohup nice -n19 maple  -c "assign(distance,convert($dist,str)) <code.mpl> out_$dist.out &

done 

 

but it is not working. I've tried to put " and ` here and there but I don't get it working. Could you help? 

 

thanks

Salvatore

@Robert Israel 

 

Hi Robert,

The matrix is a Fisher information (http://en.wikipedia.org/wiki/Fisher_matrix#Matrix_form ). The signal contains 9 unknown parameters, and thus the matrix should be 9x9. As I experimented this kind of problem, I begun removing some parameters. The form I gave was one of those.

I tried using the log of some parameters to "compactify" the parameter space, and it seems to be working for the pure inversion, in the sense that the diagonal terms of the inverse are no longer negatives (it should be so, as they represent the squared variances), but the offdiagonal elements still have some problems. 

 

Salvo

@Robert Israel 

 

Hi Robert,

The matrix is a Fisher information (http://en.wikipedia.org/wiki/Fisher_matrix#Matrix_form ). The signal contains 9 unknown parameters, and thus the matrix should be 9x9. As I experimented this kind of problem, I begun removing some parameters. The form I gave was one of those.

I tried using the log of some parameters to "compactify" the parameter space, and it seems to be working for the pure inversion, in the sense that the diagonal terms of the inverse are no longer negatives (it should be so, as they represent the squared variances), but the offdiagonal elements still have some problems. 

 

Salvo

Hi all,

still testing. The problems is that the usual debugging procs don't seem to be useful, as the problem is not whithin a procedure.

The guys that wrote the maple code should know in what conditions maple return that error, as they wrote the program!, and maybe this could help understanding what is going on, if there aren't better ideas.

Hi Robert,

I will perform tests on the next days to see if that problem can occour if a single istance of maple is running, or (as I think) it is tied to the fact that more jobs are running. There are no antiviruses in the machines I run the jobs, no strange programs. It must be on maple...

 

Salvo

Hi Robert,

I will perform tests on the next days to see if that problem can occour if a single istance of maple is running, or (as I think) it is tied to the fact that more jobs are running. There are no antiviruses in the machines I run the jobs, no strange programs. It must be on maple...

 

Salvo

I read the help pages, and it seems that by default the different runs don't share the engine. 

Yet, the sincronism of the crashes makes me  think about a maple problem, not a code's one.
Maybe when several jobs run at the same time I go over some limit.

I checked datalimit and stacklimt, and they both are "infinity". Processlimit is set to 1024, could that be the problem? Is there a command that print the number of processes maple is running? I don't understand if this is the total number of processes maple car run on a machine, or for  each engine. I think we are looking for a global limit (for maple as a whole), because a single instance of the program doesn't give problems. It must be something that adds! 

 

Thks

Salvo

@DuncanA 

It is ok. It was a good guess! 

@DuncanA 

It is ok. It was a good guess! 

Hey, I've an idea maybe. In my code at the end of the FORs I destroy the variables that must be recalculated at the next iteration, with commands like

if member('h31_Network',[anames(user)]) then
unassign('h31_Network')
end if;

Maybe this can bother the other jobs in the same machine, if they share anames....

But, if this is the reason (it would explain why I'm having problems only when multiple jobs run), why it should stop the jobs after several (random) hours, instead that at the beginning?

Doest it seem a possible explenation to you? 

What is the command to give in order to have a different  namespace for each job?

 

Tks

Salvo

1 2 3 4 5 6 7 Last Page 1 of 10