Dear ALPS users,
ALPS 2.0.1 has been released. This is the version included with the ALPS paper: B. Bauer et al., J. Stat. Mech. (2011) P05001, which is available at : http://www.iop.org/EJ/abstract/1742-5468/2011/05/P05001 .Besides references to this paper, this release contains many minor bug fixes. The MacOS X 10.5 binary release will be uploaded shortly. The others are ready for download.
Best regards
Matthias Troyer
Dear Mr Troyer,
I've already written to you some months ago to ask you how could I perform a MC classical simulation of the O(4) model. I've edited the file spinmc_factory.C as you suggested and typed make install to make it work. The installation of every packages seemed to be ended well. So I prepared the input file with MODEL O(4) but It didn't work. It seemed as if the simulation started in the proper way but then it stopped with this error:
impossible to perform the simulation, impossible to find the O(4) model in the file factory.C
What is this file? Where I can find it and how can I edit it?
Thank you for your help and sorry for my several requests of help.
Best Regards Rachele Nerattini
Here is the patch. I'll add that to the next release.
--- mc/spins/spinmc_factory.C (revision 5665) +++ mc/spins/spinmc_factory.C (working copy) @@ -139,6 +139,8 @@ produceError(parms); return 0; } + else if (parms["MODEL"]=="O(4)") + return new SpinSim<ONMoment<4>,MIdMatrix<double,4> >(where,parms,node); else if (parms["MODEL"]=="Heisenberg") switch (maxElemCount) { case 1:
On 14 Jul 2011, at 05:11, Rachele Nerattini wrote:
Dear Mr Troyer,
I've already written to you some months ago to ask you how could I perform a MC classical simulation of the O(4) model. I've edited the file spinmc_factory.C as you suggested and typed make install to make it work. The installation of every packages seemed to be ended well. So I prepared the input file with MODEL O(4) but It didn't work. It seemed as if the simulation started in the proper way but then it stopped with this error:
impossible to perform the simulation, impossible to find the O(4) model in the file factory.C
What is this file? Where I can find it and how can I edit it?
Thank you for your help and sorry for my several requests of help.
Best Regards Rachele Nerattini
Dear Mr Troyer,
thank you for the help. I'm going to edit the file and I'll write to you soon to let you know if the program works properly.
Thank you again for the help, best regards Rachele Nerattini
2011/8/1 Matthias Troyer troyer@phys.ethz.ch
Here is the patch. I'll add that to the next release.
--- mc/spins/spinmc_factory.C (revision 5665) +++ mc/spins/spinmc_factory.C (working copy) @@ -139,6 +139,8 @@ produceError(parms); return 0; }
- else if (parms["MODEL"]=="O(4)")
- return new SpinSim<ONMoment<4>,MIdMatrix<double,4>
(where,parms,node);
else if (parms["MODEL"]=="Heisenberg") switch (maxElemCount) { case 1:
On 14 Jul 2011, at 05:11, Rachele Nerattini wrote:
Dear Mr Troyer,
I've already written to you some months ago to ask you how could I perform a MC classical simulation of the O(4) model. I've edited the file spinmc_factory.C as you suggested and typed make install to make it work. The installation of every packages seemed to be ended well. So I prepared the input file with MODEL O(4) but It didn't work. It seemed as if the simulation started in the proper way but then it stopped with this error:
impossible to perform the simulation, impossible to find the O(4) model in the file factory.C
What is this file? Where I can find it and how can I edit it?
Thank you for your help and sorry for my several requests of help.
Best Regards Rachele Nerattini
Dear Mr Troyer,
I'm using ALPS to run MC simulations of classical Ising, XY and Heisenberg models in three dimensions. I want to study how the critical values of some observables varies with L in a regular cubic lattice so I run the simulations at T_c (critical value of the temperature).
I know that at the phase transition you have strong correlation in the system and it is difficult to obtain values of the observables with convergence on the errors. For this reasons I have the following questions:
1) Errors on the observables are given with three different levels of 'accuracy': converged (white), check the convergence (yellow), not converged (red). How does the program test if the convergence is achieved? I mean I see the program evaluate the errors dividing the total number of steps in groups of binning and then evaluating the errors group by group. I suppose that it says that the convergence is achieved if the errors in different groups vary less then some interval that is fixed...is it true? Which is the test that it does?
2) I suppose Tau is the correlation time. Does the program take into account the value of Tau in the final valuation of the errors? I mean, are those errors already multiplied by the sqrt of tau as it must be in case of correlations, or must be corrected bye the value of tau that is given?
3) Since the correlation is strong at T_c do you think that it could be easier to get to convergence if we change the initial configuration of the MC? For example we could run a simulation for a while then take the last configuration it uses to evaluate the values of observables and then use this last configuration as the input configuration for a new run...can it be done in some way?
4) Some months ago I wrote to you to ask if it could be possible to run a classical MC simulation for an O(4) model. in the tutorials you say that it can be done simply editing the spin_factory.C file. I tried but still it doesn't work. I'm afraid I made some mistakes in the installation of the ALPS library on my PC. Did you add this option in the new version 2.0?
Thank you very much for the help and I'm sorry to bother you with all these questions.
I wish you my best regards
Rachele Nerattini
On Feb 14, 2012, at 1:35 PM, Rachele Nerattini wrote:
Dear Mr Troyer,
I'm using ALPS to run MC simulations of classical Ising, XY and Heisenberg models in three dimensions. I want to study how the critical values of some observables varies with L in a regular cubic lattice so I run the simulations at T_c (critical value of the temperature).
I know that at the phase transition you have strong correlation in the system and it is difficult to obtain values of the observables with convergence on the errors. For this reasons I have the following questions:
- Errors on the observables are given with three different levels of 'accuracy': converged (white), check the convergence (yellow), not converged (red).
How does the program test if the convergence is achieved? I mean I see the program evaluate the errors dividing the total number of steps in groups of binning and then evaluating the errors group by group. I suppose that it says that the convergence is achieved if the errors in different groups vary less then some interval that is fixed...is it true? Which is the test that it does?
The best will be if you look at the details of the binning analysis, as explained in tutorial MC-01. If the errors converge as a function of the bin size we mark it as converged, if they still increase slightly (which might just be a statistical fluctuation) mark it as yellow, and if it is clearly not converged we mark it as red. Still, to be sure you should always look at it yourself.
- I suppose Tau is the correlation time. Does the program take into account the value of Tau in the final valuation of the errors? I mean, are those errors already multiplied by the sqrt of tau as it must be in case of correlations, or must be corrected bye the value of tau that is given?
Indeed it is multiplied by sqrt(1+2tau). Well, actually, sqrt(1+2tau) and thus tau is determined from the ratio between converged and naive error. But, to answer your question, the error indeed includes autocorrelation effects.
- Since the correlation is strong at T_c do you think that it could be easier to get to convergence if we change the initial configuration of the MC? For example we could run a simulation for a while then take the last configuration it uses to evaluate the values of observables and then use this last configuration as the input configuration for a new run...can it be done in some way?
Yes, that could be done, it however will not help much. The time needed to equilibrate is of the same order as the autocorrelation time, and if you cannot afford to equilibrate you will also not be able to get many uncorrelated measurements.
- Some months ago I wrote to you to ask if it could be possible to run a classical MC simulation for an O(4) model. in the tutorials you say that it can be done simply editing the spin_factory.C file. I tried but still it doesn't work. I'm afraid I made some mistakes in the installation of the ALPS library on my PC. Did you add this option in the new version 2.0?
What did not work? it should be very easy to add it. Can you tell me what you tried to do and what the problem was?
I hope this helps
Matthias Troyer
Dear Mr Troyer,
thank you very much for the quick and helpfulness answer. For what concerns the last point:
- Some months ago I wrote to you to ask if it could be possible to run a
classical MC simulation for an O(4) model. in the tutorials you say that it can be done simply editing the spin_factory.C file. I tried but still it doesn't work. I'm afraid I made some mistakes in the installation of the ALPS library on my PC. Did you add this option in the new version 2.0?
What did not work? it should be very easy to add it. Can you tell me what you tried to do and what the problem was?
I modified the file spinmc_factory.C adding:
else if (parms["MODEL"]=="O(4)") return new SpinSim<ONMoment<4>,MIdMatrix<double,4>
(where,parms,node);
then I open a terminal, I went into the folder
alps-2.0.0-r5363-src-with-boost/alps/
then I wrote
make install
the program did the installation. Then I wrote the input file
LATTICE_LIBRARY="lattices.xml" LATTICE="simple cubic lattice" L=8 J=1 THERMALIZATION=10000 SWEEPS=50000 UPDATE="cluster" MODEL="O(4)" BOUNDARY type="periodic" S=1 {T=0.8;}
and it retrns the following error line:
O(4) model not implemented in file factory.C
I'm sorry I'm not expert in programming at all...
Thank you for you help,
with best regards
Rachele Nerattini
2012/2/14 Matthias Troyer troyer@phys.ethz.ch
On Feb 14, 2012, at 1:35 PM, Rachele Nerattini wrote:
Dear Mr Troyer,
I'm using ALPS to run MC simulations of classical Ising, XY and
Heisenberg models in three dimensions. I want to study how the critical values of some observables varies with L in a regular cubic lattice so I run the simulations at T_c (critical value of the temperature).
I know that at the phase transition you have strong correlation in the
system and it is difficult to obtain values of the observables with convergence on the errors. For this reasons I have the following questions:
- Errors on the observables are given with three different levels of
'accuracy': converged (white), check the convergence (yellow), not converged (red).
How does the program test if the convergence is achieved? I mean I see
the program evaluate the errors dividing the total number of steps in groups of binning and then evaluating the errors group by group. I suppose that it says that the convergence is achieved if the errors in different groups vary less then some interval that is fixed...is it true? Which is the test that it does?
The best will be if you look at the details of the binning analysis, as explained in tutorial MC-01. If the errors converge as a function of the bin size we mark it as converged, if they still increase slightly (which might just be a statistical fluctuation) mark it as yellow, and if it is clearly not converged we mark it as red. Still, to be sure you should always look at it yourself.
- I suppose Tau is the correlation time. Does the program take into
account the value of Tau in the final valuation of the errors? I mean, are those errors already multiplied by the sqrt of tau as it must be in case of correlations, or must be corrected bye the value of tau that is given?
Indeed it is multiplied by sqrt(1+2tau). Well, actually, sqrt(1+2tau) and thus tau is determined from the ratio between converged and naive error. But, to answer your question, the error indeed includes autocorrelation effects.
- Since the correlation is strong at T_c do you think that it could be
easier to get to convergence if we change the initial configuration of the MC? For example we could run a simulation for a while then take the last configuration it uses to evaluate the values of observables and then use this last configuration as the input configuration for a new run...can it be done in some way?
Yes, that could be done, it however will not help much. The time needed to equilibrate is of the same order as the autocorrelation time, and if you cannot afford to equilibrate you will also not be able to get many uncorrelated measurements.
- Some months ago I wrote to you to ask if it could be possible to run
a classical MC simulation for an O(4) model. in the tutorials you say that it can be done simply editing the spin_factory.C file. I tried but still it doesn't work. I'm afraid I made some mistakes in the installation of the ALPS library on my PC. Did you add this option in the new version 2.0?
What did not work? it should be very easy to add it. Can you tell me what you tried to do and what the problem was?
I hope this helps
Matthias Troyer
Which version of ALPS are you using? O(4) models work for me in ALPS. Can you send your full input files? In your input below the following line should not work:
BOUNDARY type="periodic"
Matthias
On Feb 14, 2012, at 5:08 PM, Rachele Nerattini wrote:
Dear Mr Troyer,
thank you very much for the quick and helpfulness answer. For what concerns the last point:
- Some months ago I wrote to you to ask if it could be possible to run a classical MC simulation for an O(4) model. in the tutorials you say that it can be done simply editing the spin_factory.C file. I tried but still it doesn't work. I'm afraid I made some mistakes in the installation of the ALPS library on my PC. Did you add this option in the new version 2.0?
What did not work? it should be very easy to add it. Can you tell me what you tried to do and what the problem was?
I modified the file spinmc_factory.C adding:
else if (parms["MODEL"]=="O(4)") return new SpinSim<ONMoment<4>,MIdMatrix<double,4> >(where,parms,node);
then I open a terminal, I went into the folder
alps-2.0.0-r5363-src-with-boost/alps/
then I wrote
make install
the program did the installation. Then I wrote the input file
LATTICE_LIBRARY="lattices.xml" LATTICE="simple cubic lattice" L=8 J=1 THERMALIZATION=10000 SWEEPS=50000 UPDATE="cluster" MODEL="O(4)" BOUNDARY type="periodic" S=1 {T=0.8;}
and it retrns the following error line:
O(4) model not implemented in file factory.C
I'm sorry I'm not expert in programming at all...
Thank you for you help,
with best regards
Rachele Nerattini
2012/2/14 Matthias Troyer troyer@phys.ethz.ch
On Feb 14, 2012, at 1:35 PM, Rachele Nerattini wrote:
Dear Mr Troyer,
I'm using ALPS to run MC simulations of classical Ising, XY and Heisenberg models in three dimensions. I want to study how the critical values of some observables varies with L in a regular cubic lattice so I run the simulations at T_c (critical value of the temperature).
I know that at the phase transition you have strong correlation in the system and it is difficult to obtain values of the observables with convergence on the errors. For this reasons I have the following questions:
- Errors on the observables are given with three different levels of 'accuracy': converged (white), check the convergence (yellow), not converged (red).
How does the program test if the convergence is achieved? I mean I see the program evaluate the errors dividing the total number of steps in groups of binning and then evaluating the errors group by group. I suppose that it says that the convergence is achieved if the errors in different groups vary less then some interval that is fixed...is it true? Which is the test that it does?
The best will be if you look at the details of the binning analysis, as explained in tutorial MC-01. If the errors converge as a function of the bin size we mark it as converged, if they still increase slightly (which might just be a statistical fluctuation) mark it as yellow, and if it is clearly not converged we mark it as red. Still, to be sure you should always look at it yourself.
- I suppose Tau is the correlation time. Does the program take into account the value of Tau in the final valuation of the errors? I mean, are those errors already multiplied by the sqrt of tau as it must be in case of correlations, or must be corrected bye the value of tau that is given?
Indeed it is multiplied by sqrt(1+2tau). Well, actually, sqrt(1+2tau) and thus tau is determined from the ratio between converged and naive error. But, to answer your question, the error indeed includes autocorrelation effects.
- Since the correlation is strong at T_c do you think that it could be easier to get to convergence if we change the initial configuration of the MC? For example we could run a simulation for a while then take the last configuration it uses to evaluate the values of observables and then use this last configuration as the input configuration for a new run...can it be done in some way?
Yes, that could be done, it however will not help much. The time needed to equilibrate is of the same order as the autocorrelation time, and if you cannot afford to equilibrate you will also not be able to get many uncorrelated measurements.
- Some months ago I wrote to you to ask if it could be possible to run a classical MC simulation for an O(4) model. in the tutorials you say that it can be done simply editing the spin_factory.C file. I tried but still it doesn't work. I'm afraid I made some mistakes in the installation of the ALPS library on my PC. Did you add this option in the new version 2.0?
What did not work? it should be very easy to add it. Can you tell me what you tried to do and what the problem was?
I hope this helps
Matthias Troyer
The one I wrote below is the complete input file that I use...is it incomplete?
I have installed the version of ALPS 2.0.0
Thank you
Rachele
2012/2/14 Matthias Troyer troyer@phys.ethz.ch
Which version of ALPS are you using? O(4) models work for me in ALPS. Can you send your full input files? In your input below the following line should not work:
BOUNDARY type="periodic"
Matthias
On Feb 14, 2012, at 5:08 PM, Rachele Nerattini wrote:
Dear Mr Troyer,
thank you very much for the quick and helpfulness answer. For what concerns the last point:
- Some months ago I wrote to you to ask if it could be possible to run
a classical MC simulation for an O(4) model. in the tutorials you say that it can be done simply editing the spin_factory.C file. I tried but still it doesn't work. I'm afraid I made some mistakes in the installation of the ALPS library on my PC. Did you add this option in the new version 2.0?
What did not work? it should be very easy to add it. Can you tell me what you tried to do and what the problem was?
I modified the file spinmc_factory.C adding:
else if (parms["MODEL"]=="O(4)") return new SpinSim<ONMoment<4>,MIdMatrix<double,4>
(where,parms,node);
then I open a terminal, I went into the folder
alps-2.0.0-r5363-src-with-boost/alps/
then I wrote
make install
the program did the installation. Then I wrote the input file
LATTICE_LIBRARY="lattices.xml" LATTICE="simple cubic lattice" L=8 J=1 THERMALIZATION=10000 SWEEPS=50000 UPDATE="cluster" MODEL="O(4)" BOUNDARY type="periodic" S=1 {T=0.8;}
and it retrns the following error line:
O(4) model not implemented in file factory.C
I'm sorry I'm not expert in programming at all...
Thank you for you help,
with best regards
Rachele Nerattini
2012/2/14 Matthias Troyer troyer@phys.ethz.ch
On Feb 14, 2012, at 1:35 PM, Rachele Nerattini wrote:
Dear Mr Troyer,
I'm using ALPS to run MC simulations of classical Ising, XY and
Heisenberg models in three dimensions. I want to study how the critical values of some observables varies with L in a regular cubic lattice so I run the simulations at T_c (critical value of the temperature).
I know that at the phase transition you have strong correlation in the
system and it is difficult to obtain values of the observables with convergence on the errors. For this reasons I have the following questions:
- Errors on the observables are given with three different levels of
'accuracy': converged (white), check the convergence (yellow), not converged (red).
How does the program test if the convergence is achieved? I mean I see
the program evaluate the errors dividing the total number of steps in groups of binning and then evaluating the errors group by group. I suppose that it says that the convergence is achieved if the errors in different groups vary less then some interval that is fixed...is it true? Which is the test that it does?
The best will be if you look at the details of the binning analysis, as explained in tutorial MC-01. If the errors converge as a function of the bin size we mark it as converged, if they still increase slightly (which might just be a statistical fluctuation) mark it as yellow, and if it is clearly not converged we mark it as red. Still, to be sure you should always look at it yourself.
- I suppose Tau is the correlation time. Does the program take into
account the value of Tau in the final valuation of the errors? I mean, are those errors already multiplied by the sqrt of tau as it must be in case of correlations, or must be corrected bye the value of tau that is given?
Indeed it is multiplied by sqrt(1+2tau). Well, actually, sqrt(1+2tau) and thus tau is determined from the ratio between converged and naive error. But, to answer your question, the error indeed includes autocorrelation effects.
- Since the correlation is strong at T_c do you think that it could be
easier to get to convergence if we change the initial configuration of the MC? For example we could run a simulation for a while then take the last configuration it uses to evaluate the values of observables and then use this last configuration as the input configuration for a new run...can it be done in some way?
Yes, that could be done, it however will not help much. The time needed to equilibrate is of the same order as the autocorrelation time, and if you cannot afford to equilibrate you will also not be able to get many uncorrelated measurements.
- Some months ago I wrote to you to ask if it could be possible to run
a classical MC simulation for an O(4) model. in the tutorials you say that it can be done simply editing the spin_factory.C file. I tried but still it doesn't work. I'm afraid I made some mistakes in the installation of the ALPS library on my PC. Did you add this option in the new version 2.0?
What did not work? it should be very easy to add it. Can you tell me what you tried to do and what the problem was?
I hope this helps
Matthias Troyer
That file works for me, but I have ALPS 2.0.2. If you used ALPS 2.0.0 and did the change you made below it should also work - are you sure that you use the newly built version of spinmc. Try the following:
ls -l `which spinmc`
and compare the date of that executable to the sate when you changed the source file.
Also, the parameter BOUNDARY type does not exist and will be ignored.
Matthias
On Feb 15, 2012, at 11:02 AM, Rachele Nerattini wrote:
The one I wrote below is the complete input file that I use...is it incomplete?
I have installed the version of ALPS 2.0.0
Thank you
Rachele
2012/2/14 Matthias Troyer troyer@phys.ethz.ch Which version of ALPS are you using? O(4) models work for me in ALPS. Can you send your full input files? In your input below the following line should not work:
BOUNDARY type="periodic"
Matthias
On Feb 14, 2012, at 5:08 PM, Rachele Nerattini wrote:
Dear Mr Troyer,
thank you very much for the quick and helpfulness answer. For what concerns the last point:
- Some months ago I wrote to you to ask if it could be possible to run a classical MC simulation for an O(4) model. in the tutorials you say that it can be done simply editing the spin_factory.C file. I tried but still it doesn't work. I'm afraid I made some mistakes in the installation of the ALPS library on my PC. Did you add this option in the new version 2.0?
What did not work? it should be very easy to add it. Can you tell me what you tried to do and what the problem was?
I modified the file spinmc_factory.C adding:
else if (parms["MODEL"]=="O(4)") return new SpinSim<ONMoment<4>,MIdMatrix<double,4> >(where,parms,node);
then I open a terminal, I went into the folder
alps-2.0.0-r5363-src-with-boost/alps/
then I wrote
make install
the program did the installation. Then I wrote the input file
LATTICE_LIBRARY="lattices.xml" LATTICE="simple cubic lattice" L=8 J=1 THERMALIZATION=10000 SWEEPS=50000 UPDATE="cluster" MODEL="O(4)" BOUNDARY type="periodic" S=1 {T=0.8;}
and it retrns the following error line:
O(4) model not implemented in file factory.C
I'm sorry I'm not expert in programming at all...
Thank you for you help,
with best regards
Rachele Nerattini
2012/2/14 Matthias Troyer troyer@phys.ethz.ch
On Feb 14, 2012, at 1:35 PM, Rachele Nerattini wrote:
Dear Mr Troyer,
I'm using ALPS to run MC simulations of classical Ising, XY and Heisenberg models in three dimensions. I want to study how the critical values of some observables varies with L in a regular cubic lattice so I run the simulations at T_c (critical value of the temperature).
I know that at the phase transition you have strong correlation in the system and it is difficult to obtain values of the observables with convergence on the errors. For this reasons I have the following questions:
- Errors on the observables are given with three different levels of 'accuracy': converged (white), check the convergence (yellow), not converged (red).
How does the program test if the convergence is achieved? I mean I see the program evaluate the errors dividing the total number of steps in groups of binning and then evaluating the errors group by group. I suppose that it says that the convergence is achieved if the errors in different groups vary less then some interval that is fixed...is it true? Which is the test that it does?
The best will be if you look at the details of the binning analysis, as explained in tutorial MC-01. If the errors converge as a function of the bin size we mark it as converged, if they still increase slightly (which might just be a statistical fluctuation) mark it as yellow, and if it is clearly not converged we mark it as red. Still, to be sure you should always look at it yourself.
- I suppose Tau is the correlation time. Does the program take into account the value of Tau in the final valuation of the errors? I mean, are those errors already multiplied by the sqrt of tau as it must be in case of correlations, or must be corrected bye the value of tau that is given?
Indeed it is multiplied by sqrt(1+2tau). Well, actually, sqrt(1+2tau) and thus tau is determined from the ratio between converged and naive error. But, to answer your question, the error indeed includes autocorrelation effects.
- Since the correlation is strong at T_c do you think that it could be easier to get to convergence if we change the initial configuration of the MC? For example we could run a simulation for a while then take the last configuration it uses to evaluate the values of observables and then use this last configuration as the input configuration for a new run...can it be done in some way?
Yes, that could be done, it however will not help much. The time needed to equilibrate is of the same order as the autocorrelation time, and if you cannot afford to equilibrate you will also not be able to get many uncorrelated measurements.
- Some months ago I wrote to you to ask if it could be possible to run a classical MC simulation for an O(4) model. in the tutorials you say that it can be done simply editing the spin_factory.C file. I tried but still it doesn't work. I'm afraid I made some mistakes in the installation of the ALPS library on my PC. Did you add this option in the new version 2.0?
What did not work? it should be very easy to add it. Can you tell me what you tried to do and what the problem was?
I hope this helps
Matthias Troyer
Ok I try to see it...anyway I also want to upgrade ALPS with the latest version. I try to reinstall everything then I'll write to you.
Thank you again for the help. Rachele
2012/2/15 Matthias Troyer troyer@phys.ethz.ch
That file works for me, but I have ALPS 2.0.2. If you used ALPS 2.0.0 and did the change you made below it should also work - are you sure that you use the newly built version of spinmc. Try the following:
ls -l `which spinmc`
and compare the date of that executable to the sate when you changed the source file.
Also, the parameter BOUNDARY type does not exist and will be ignored.
Matthias
On Feb 15, 2012, at 11:02 AM, Rachele Nerattini wrote:
The one I wrote below is the complete input file that I use...is it incomplete?
I have installed the version of ALPS 2.0.0
Thank you
Rachele
2012/2/14 Matthias Troyer troyer@phys.ethz.ch
Which version of ALPS are you using? O(4) models work for me in ALPS. Can you send your full input files? In your input below the following line should not work:
BOUNDARY type="periodic"
Matthias
On Feb 14, 2012, at 5:08 PM, Rachele Nerattini wrote:
Dear Mr Troyer,
thank you very much for the quick and helpfulness answer. For what concerns the last point:
- Some months ago I wrote to you to ask if it could be possible to run
a classical MC simulation for an O(4) model. in the tutorials you say that it can be done simply editing the spin_factory.C file. I tried but still it doesn't work. I'm afraid I made some mistakes in the installation of the ALPS library on my PC. Did you add this option in the new version 2.0?
What did not work? it should be very easy to add it. Can you tell me what you tried to do and what the problem was?
I modified the file spinmc_factory.C adding:
else if (parms["MODEL"]=="O(4)") return new SpinSim<ONMoment<4>,MIdMatrix<double,4>
(where,parms,node);
then I open a terminal, I went into the folder
alps-2.0.0-r5363-src-with-boost/alps/
then I wrote
make install
the program did the installation. Then I wrote the input file
LATTICE_LIBRARY="lattices.xml" LATTICE="simple cubic lattice" L=8 J=1 THERMALIZATION=10000 SWEEPS=50000 UPDATE="cluster" MODEL="O(4)" BOUNDARY type="periodic" S=1 {T=0.8;}
and it retrns the following error line:
O(4) model not implemented in file factory.C
I'm sorry I'm not expert in programming at all...
Thank you for you help,
with best regards
Rachele Nerattini
2012/2/14 Matthias Troyer troyer@phys.ethz.ch
On Feb 14, 2012, at 1:35 PM, Rachele Nerattini wrote:
Dear Mr Troyer,
I'm using ALPS to run MC simulations of classical Ising, XY and
Heisenberg models in three dimensions. I want to study how the critical values of some observables varies with L in a regular cubic lattice so I run the simulations at T_c (critical value of the temperature).
I know that at the phase transition you have strong correlation in the
system and it is difficult to obtain values of the observables with convergence on the errors. For this reasons I have the following questions:
- Errors on the observables are given with three different levels of
'accuracy': converged (white), check the convergence (yellow), not converged (red).
How does the program test if the convergence is achieved? I mean I see
the program evaluate the errors dividing the total number of steps in groups of binning and then evaluating the errors group by group. I suppose that it says that the convergence is achieved if the errors in different groups vary less then some interval that is fixed...is it true? Which is the test that it does?
The best will be if you look at the details of the binning analysis, as explained in tutorial MC-01. If the errors converge as a function of the bin size we mark it as converged, if they still increase slightly (which might just be a statistical fluctuation) mark it as yellow, and if it is clearly not converged we mark it as red. Still, to be sure you should always look at it yourself.
- I suppose Tau is the correlation time. Does the program take into
account the value of Tau in the final valuation of the errors? I mean, are those errors already multiplied by the sqrt of tau as it must be in case of correlations, or must be corrected bye the value of tau that is given?
Indeed it is multiplied by sqrt(1+2tau). Well, actually, sqrt(1+2tau) and thus tau is determined from the ratio between converged and naive error. But, to answer your question, the error indeed includes autocorrelation effects.
- Since the correlation is strong at T_c do you think that it could
be easier to get to convergence if we change the initial configuration of the MC? For example we could run a simulation for a while then take the last configuration it uses to evaluate the values of observables and then use this last configuration as the input configuration for a new run...can it be done in some way?
Yes, that could be done, it however will not help much. The time needed to equilibrate is of the same order as the autocorrelation time, and if you cannot afford to equilibrate you will also not be able to get many uncorrelated measurements.
- Some months ago I wrote to you to ask if it could be possible to
run a classical MC simulation for an O(4) model. in the tutorials you say that it can be done simply editing the spin_factory.C file. I tried but still it doesn't work. I'm afraid I made some mistakes in the installation of the ALPS library on my PC. Did you add this option in the new version 2.0?
What did not work? it should be very easy to add it. Can you tell me what you tried to do and what the problem was?
I hope this helps
Matthias Troyer
Ok I try to see it...anyway I also want to upgrade the version of ALPS i've installed with the newest one. I'll do it and I try to make O(4) simulations work...
Thank you for the help.
Rachele
2012/2/15 Matthias Troyer troyer@phys.ethz.ch
That file works for me, but I have ALPS 2.0.2. If you used ALPS 2.0.0 and did the change you made below it should also work - are you sure that you use the newly built version of spinmc. Try the following:
ls -l `which spinmc`
and compare the date of that executable to the sate when you changed the source file.
Also, the parameter BOUNDARY type does not exist and will be ignored.
Matthias
On Feb 15, 2012, at 11:02 AM, Rachele Nerattini wrote:
The one I wrote below is the complete input file that I use...is it incomplete?
I have installed the version of ALPS 2.0.0
Thank you
Rachele
2012/2/14 Matthias Troyer troyer@phys.ethz.ch
Which version of ALPS are you using? O(4) models work for me in ALPS. Can you send your full input files? In your input below the following line should not work:
BOUNDARY type="periodic"
Matthias
On Feb 14, 2012, at 5:08 PM, Rachele Nerattini wrote:
Dear Mr Troyer,
thank you very much for the quick and helpfulness answer. For what concerns the last point:
- Some months ago I wrote to you to ask if it could be possible to run
a classical MC simulation for an O(4) model. in the tutorials you say that it can be done simply editing the spin_factory.C file. I tried but still it doesn't work. I'm afraid I made some mistakes in the installation of the ALPS library on my PC. Did you add this option in the new version 2.0?
What did not work? it should be very easy to add it. Can you tell me what you tried to do and what the problem was?
I modified the file spinmc_factory.C adding:
else if (parms["MODEL"]=="O(4)") return new SpinSim<ONMoment<4>,MIdMatrix<double,4>
(where,parms,node);
then I open a terminal, I went into the folder
alps-2.0.0-r5363-src-with-boost/alps/
then I wrote
make install
the program did the installation. Then I wrote the input file
LATTICE_LIBRARY="lattices.xml" LATTICE="simple cubic lattice" L=8 J=1 THERMALIZATION=10000 SWEEPS=50000 UPDATE="cluster" MODEL="O(4)" BOUNDARY type="periodic" S=1 {T=0.8;}
and it retrns the following error line:
O(4) model not implemented in file factory.C
I'm sorry I'm not expert in programming at all...
Thank you for you help,
with best regards
Rachele Nerattini
2012/2/14 Matthias Troyer troyer@phys.ethz.ch
On Feb 14, 2012, at 1:35 PM, Rachele Nerattini wrote:
Dear Mr Troyer,
I'm using ALPS to run MC simulations of classical Ising, XY and
Heisenberg models in three dimensions. I want to study how the critical values of some observables varies with L in a regular cubic lattice so I run the simulations at T_c (critical value of the temperature).
I know that at the phase transition you have strong correlation in the
system and it is difficult to obtain values of the observables with convergence on the errors. For this reasons I have the following questions:
- Errors on the observables are given with three different levels of
'accuracy': converged (white), check the convergence (yellow), not converged (red).
How does the program test if the convergence is achieved? I mean I see
the program evaluate the errors dividing the total number of steps in groups of binning and then evaluating the errors group by group. I suppose that it says that the convergence is achieved if the errors in different groups vary less then some interval that is fixed...is it true? Which is the test that it does?
The best will be if you look at the details of the binning analysis, as explained in tutorial MC-01. If the errors converge as a function of the bin size we mark it as converged, if they still increase slightly (which might just be a statistical fluctuation) mark it as yellow, and if it is clearly not converged we mark it as red. Still, to be sure you should always look at it yourself.
- I suppose Tau is the correlation time. Does the program take into
account the value of Tau in the final valuation of the errors? I mean, are those errors already multiplied by the sqrt of tau as it must be in case of correlations, or must be corrected bye the value of tau that is given?
Indeed it is multiplied by sqrt(1+2tau). Well, actually, sqrt(1+2tau) and thus tau is determined from the ratio between converged and naive error. But, to answer your question, the error indeed includes autocorrelation effects.
- Since the correlation is strong at T_c do you think that it could
be easier to get to convergence if we change the initial configuration of the MC? For example we could run a simulation for a while then take the last configuration it uses to evaluate the values of observables and then use this last configuration as the input configuration for a new run...can it be done in some way?
Yes, that could be done, it however will not help much. The time needed to equilibrate is of the same order as the autocorrelation time, and if you cannot afford to equilibrate you will also not be able to get many uncorrelated measurements.
- Some months ago I wrote to you to ask if it could be possible to
run a classical MC simulation for an O(4) model. in the tutorials you say that it can be done simply editing the spin_factory.C file. I tried but still it doesn't work. I'm afraid I made some mistakes in the installation of the ALPS library on my PC. Did you add this option in the new version 2.0?
What did not work? it should be very easy to add it. Can you tell me what you tried to do and what the problem was?
I hope this helps
Matthias Troyer
Dear Mr Troyer,
I'm writing to you because I have some problems in the installation of ALPS on Ubuntu GNU/Linux 10.04 lucid.
Following the instructions in the guide at
http://alps.comp-phys.org/mediawiki/index.php/Download_and_install_ALPS_2#Do...
I proceeded in the following manner:
I openend a terminal and I typed
curl http://www.cpht.polytechnique.fr/ubuntu/gpg_key / sudo apt-key add-
I then added the two debs :
deb http://www.cpht.polytechnique.fr/ubuntu lucid alps deb-src http://www.cpht.polytechnique.fr/ubuntu lucid alps
to the file etc/apt/source.list
then I typed
sudo aptitude update sudo aptitude install alps2-all sudo aptitude upgrade sudo reboot
I need to run classical MC simulations for Ising, XY, Heisenberg and O(4) model. I can do the simulations for the Ising, XY and Heisenberg models with the command
spinmc --Tmin 100 --write-xml parm.in.xml
and it seems to work...but I cannot run the simulation for the O(4) model that I know is already included in the newest version.
Which mistake I made in the installation? It seems that I missed some steps also because I have some problems in other commands. For example the command convert2xml works but the command convert2text doesn't exist.
can you tell me what I have to do ti install ALPS 2.0 on Ubuntu 10.04 lucid?
Thank you very much for the help, with best regards
Rachele Nerattini
I don't think that a Debian package has been created for the version that includes the O(4) model. You will have to build spinmc from source.
On Apr 4, 2012, at 4:47 PM, Rachele Nerattini wrote:
Dear Mr Troyer,
I'm writing to you because I have some problems in the installation of ALPS on Ubuntu GNU/Linux 10.04 lucid.
Following the instructions in the guide at
http://alps.comp-phys.org/mediawiki/index.php/Download_and_install_ALPS_2#Do...
I proceeded in the following manner:
I openend a terminal and I typed
curl http://www.cpht.polytechnique.fr/ubuntu/gpg_key / sudo apt-key add-
I then added the two debs : deb http://www.cpht.polytechnique.fr/ubuntu lucid alps deb-src http://www.cpht.polytechnique.fr/ubuntu lucid alps to the file etc/apt/source.list
then I typed
sudo aptitude update sudo aptitude install alps2-all sudo aptitude upgrade sudo reboot
I need to run classical MC simulations for Ising, XY, Heisenberg and O(4) model. I can do the simulations for the Ising, XY and Heisenberg models with the command
spinmc --Tmin 100 --write-xml parm.in.xml
and it seems to work...but I cannot run the simulation for the O(4) model that I know is already included in the newest version.
Which mistake I made in the installation? It seems that I missed some steps also because I have some problems in other commands. For example the command convert2xml works but the command convert2text doesn't exist.
can you tell me what I have to do ti install ALPS 2.0 on Ubuntu 10.04 lucid?
Thank you very much for the help, with best regards
Rachele Nerattini
Ok, then I try to follow the step for the installation from source. Thank you again Rachele
2012/4/4 Matthias Troyer troyer@phys.ethz.ch
I don't think that a Debian package has been created for the version that includes the O(4) model. You will have to build spinmc from source.
On Apr 4, 2012, at 4:47 PM, Rachele Nerattini wrote:
Dear Mr Troyer,
I'm writing to you because I have some problems in the installation of ALPS on Ubuntu GNU/Linux 10.04 lucid.
Following the instructions in the guide at
http://alps.comp-phys.org/mediawiki/index.php/Download_and_install_ALPS_2#Do...
I proceeded in the following manner:
I openend a terminal and I typed
curl http://www.cpht.polytechnique.fr/ubuntu/gpg_key / sudo apt-key add-
I then added the two debs :
deb http://www.cpht.polytechnique.fr/ubuntu lucid alps deb-src http://www.cpht.polytechnique.fr/ubuntu lucid alps
to the file etc/apt/source.list
then I typed
sudo aptitude update sudo aptitude install alps2-all sudo aptitude upgrade sudo reboot
I need to run classical MC simulations for Ising, XY, Heisenberg and O(4) model. I can do the simulations for the Ising, XY and Heisenberg models with the command
spinmc --Tmin 100 --write-xml parm.in.xml
and it seems to work...but I cannot run the simulation for the O(4) model that I know is already included in the newest version.
Which mistake I made in the installation? It seems that I missed some steps also because I have some problems in other commands. For example the command convert2xml works but the command convert2text doesn't exist.
can you tell me what I have to do ti install ALPS 2.0 on Ubuntu 10.04 lucid?
Thank you very much for the help, with best regards
Rachele Nerattini
Dear Mr.Troyer,
I'm running some simulations using ALPS at the CINECA cluster in Bologna. I will have to run really long simulations which go well beyond the walltime limit of the machine.
To do that I have to divide the whole run in several subsections and then run all the processes in cascade.
Can you tell me how can I do that with ALPS? Which are the commands of stop/restart that I have to use?
Thank you for your help,
Rachele Nerattini
Dear Rachele Nerattini,
Are you using Monte Carlo simulations or one of the other codes?
With best regards
Matthias Troyer
On 28 Jun 2012, at 16:59, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm running some simulations using ALPS at the CINECA cluster in Bologna. I will have to run really long simulations which go well beyond the walltime limit of the machine.
To do that I have to divide the whole run in several subsections and then run all the processes in cascade.
Can you tell me how can I do that with ALPS? Which are the commands of stop/restart that I have to use?
Thank you for your help,
Rachele Nerattini
Dear Mr.Troyer,
I'm using Monte Carlo simulations for classical O(n) spin models. To be more precise I'm using the spinmc algorithm for Ising, XY and Heisenberg models.
Thank you for the help,
all the best
Rachele Nerattini
2012/6/28 Matthias Troyer troyer@phys.ethz.ch
Dear Rachele Nerattini,
Are you using Monte Carlo simulations or one of the other codes?
With best regards
Matthias Troyer
On 28 Jun 2012, at 16:59, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm running some simulations using ALPS at the CINECA cluster in
Bologna. I will have to run really long simulations which go well beyond the walltime limit of the machine.
To do that I have to divide the whole run in several subsections and
then run all the processes in cascade.
Can you tell me how can I do that with ALPS? Which are the commands of
stop/restart that I have to use?
Thank you for your help,
Rachele Nerattini
It is explained here:
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
Best regards
Matthias Troyer
On Jul 1, 2012, at 12:18 PM, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm using Monte Carlo simulations for classical O(n) spin models. To be more precise I'm using the spinmc algorithm for Ising, XY and Heisenberg models.
Thank you for the help,
all the best
Rachele Nerattini
2012/6/28 Matthias Troyer troyer@phys.ethz.ch Dear Rachele Nerattini,
Are you using Monte Carlo simulations or one of the other codes?
With best regards
Matthias Troyer
On 28 Jun 2012, at 16:59, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm running some simulations using ALPS at the CINECA cluster in Bologna. I will have to run really long simulations which go well beyond the walltime limit of the machine.
To do that I have to divide the whole run in several subsections and then run all the processes in cascade.
Can you tell me how can I do that with ALPS? Which are the commands of stop/restart that I have to use?
Thank you for your help,
Rachele Nerattini
Thank you very much for the help! I'll do it immediately. All the best Rachele Nerattini
2012/7/1 Matthias Troyer troyer@phys.ethz.ch
It is explained here:
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
Best regards
Matthias Troyer
On Jul 1, 2012, at 12:18 PM, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm using Monte Carlo simulations for classical O(n) spin models. To be more precise I'm using the spinmc algorithm for Ising, XY and Heisenberg models.
Thank you for the help,
all the best
Rachele Nerattini
2012/6/28 Matthias Troyer troyer@phys.ethz.ch
Dear Rachele Nerattini,
Are you using Monte Carlo simulations or one of the other codes?
With best regards
Matthias Troyer
On 28 Jun 2012, at 16:59, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm running some simulations using ALPS at the CINECA cluster in
Bologna. I will have to run really long simulations which go well beyond the walltime limit of the machine.
To do that I have to divide the whole run in several subsections and
then run all the processes in cascade.
Can you tell me how can I do that with ALPS? Which are the commands of
stop/restart that I have to use?
Thank you for your help,
Rachele Nerattini
Dear Mr. Troyer,
I read the page you suggested me but I still don't understand. It says how to restart a simulation stopped because the computer shut down or how to make it stop before its natural end in case you achieved the required error but I don't understad how to stop it in a controlled way.
For istance, let's suppose I have to run a simulation which is 24 hours long. I want to divide the long run in 10 runs of 2.4 hours each. The output of the first run must be the input of the following and I want to do all the runs in cascade.
What do I have to write in the input file to do that? Sorry but I didn't find it in the page
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
certeinly because I'm not an expert in these kind of things.
I copy and paste here in the following an example of input file I've wrote for the CINECA and an example of script I had to write to run a tet job.... Can you tell me what I have to change to make it stop after a certain numeber of seconds? Then I'll ask to CINECA assistence how to make all the block run in cascade.
Thank you and all the best,
Rachele Nerattini
input file = Ising3DL10mpiprocs10
LATTICE="simple cubic lattice" LATTICE_LIBRARY="lattices.xml" T=4.511441614 J=1 THERMALIZATION=200000 SWEEPS=1000000 UPDATE="cluster" MODEL="Ising" {L=10;}
script = Ising3DL10mpiprocs10.sh
#!/bin/bash #PBS -A name_of_the_project #PBS -l walltime=1:00:00 #PBS -l select=1:ncpus=10:mpiprocs=10:mem=40GB #PBS -q parallel #PBS -o Ising3DL10mpiprocs10.out #PBS -e Ising3DL10mpiprocs10.err # put the executable in the PATH module load autoload alps # cd in the directory where you have input e job.sh cd $PBS_O_WORKDIR # prep gli input parameter2xml Ising3DL10mpiprocs10
# it mounts openmpi to have mpirun in the PATH
module load profile/advanced openmpi/1.4.4--intel--co-2011.6.233--binary
mpirun -np 10 spinmc --mpi --Tmin 100 --write-xml Ising3DL10mpiprocs10.in.xml
qsub Ising3DL10mpiprocs10.sh
What do I have to add to have what I need?
Thank you again for the help,
I whish you all the best
Rachele Nerattini
2012/7/1 Rachele Nerattini r.nerattini@gmail.com
Thank you very much for the help! I'll do it immediately. All the best Rachele Nerattini
2012/7/1 Matthias Troyer troyer@phys.ethz.ch
It is explained here:
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
Best regards
Matthias Troyer
On Jul 1, 2012, at 12:18 PM, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm using Monte Carlo simulations for classical O(n) spin models. To be more precise I'm using the spinmc algorithm for Ising, XY and Heisenberg models.
Thank you for the help,
all the best
Rachele Nerattini
2012/6/28 Matthias Troyer troyer@phys.ethz.ch
Dear Rachele Nerattini,
Are you using Monte Carlo simulations or one of the other codes?
With best regards
Matthias Troyer
On 28 Jun 2012, at 16:59, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm running some simulations using ALPS at the CINECA cluster in
Bologna. I will have to run really long simulations which go well beyond the walltime limit of the machine.
To do that I have to divide the whole run in several subsections and
then run all the processes in cascade.
Can you tell me how can I do that with ALPS? Which are the commands of
stop/restart that I have to use?
Thank you for your help,
Rachele Nerattini
What is your walltime limit? Is 1:00:00 24 hours or 1 hour?
On 1 Jul 2012, at 14:40, Rachele Nerattini wrote:
Dear Mr. Troyer,
I read the page you suggested me but I still don't understand. It says how to restart a simulation stopped because the computer shut down or how to make it stop before its natural end in case you achieved the required error but I don't understad how to stop it in a controlled way.
For istance, let's suppose I have to run a simulation which is 24 hours long. I want to divide the long run in 10 runs of 2.4 hours each. The output of the first run must be the input of the following and I want to do all the runs in cascade.
What do I have to write in the input file to do that? Sorry but I didn't find it in the page
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
certeinly because I'm not an expert in these kind of things.
I copy and paste here in the following an example of input file I've wrote for the CINECA and an example of script I had to write to run a tet job.... Can you tell me what I have to change to make it stop after a certain numeber of seconds? Then I'll ask to CINECA assistence how to make all the block run in cascade.
Thank you and all the best,
Rachele Nerattini
input file = Ising3DL10mpiprocs10
LATTICE="simple cubic lattice" LATTICE_LIBRARY="lattices.xml" T=4.511441614 J=1 THERMALIZATION=200000 SWEEPS=1000000 UPDATE="cluster" MODEL="Ising" {L=10;}
script = Ising3DL10mpiprocs10.sh
#!/bin/bash #PBS -A name_of_the_project #PBS -l walltime=1:00:00 #PBS -l select=1:ncpus=10:mpiprocs=10:mem=40GB #PBS -q parallel #PBS -o Ising3DL10mpiprocs10.out #PBS -e Ising3DL10mpiprocs10.err # put the executable in the PATH module load autoload alps # cd in the directory where you have input e job.sh cd $PBS_O_WORKDIR # prep gli input parameter2xml Ising3DL10mpiprocs10
# it mounts openmpi to have mpirun in the PATH
module load profile/advanced openmpi/1.4.4--intel--co-2011.6.233--binary
mpirun -np 10 spinmc --mpi --Tmin 100 --write-xml Ising3DL10mpiprocs10.in.xml
qsub Ising3DL10mpiprocs10.sh
What do I have to add to have what I need?
Thank you again for the help,
I whish you all the best
Rachele Nerattini
2012/7/1 Rachele Nerattini r.nerattini@gmail.com Thank you very much for the help! I'll do it immediately. All the best Rachele Nerattini
2012/7/1 Matthias Troyer troyer@phys.ethz.ch It is explained here:
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
Best regards
Matthias Troyer
On Jul 1, 2012, at 12:18 PM, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm using Monte Carlo simulations for classical O(n) spin models. To be more precise I'm using the spinmc algorithm for Ising, XY and Heisenberg models.
Thank you for the help,
all the best
Rachele Nerattini
2012/6/28 Matthias Troyer troyer@phys.ethz.ch Dear Rachele Nerattini,
Are you using Monte Carlo simulations or one of the other codes?
With best regards
Matthias Troyer
On 28 Jun 2012, at 16:59, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm running some simulations using ALPS at the CINECA cluster in Bologna. I will have to run really long simulations which go well beyond the walltime limit of the machine.
To do that I have to divide the whole run in several subsections and then run all the processes in cascade.
Can you tell me how can I do that with ALPS? Which are the commands of stop/restart that I have to use?
Thank you for your help,
Rachele Nerattini
Dear Rachele,
if I understood correctly, what you need to do is to : 0) run for 10 seconds or so your job locally on the main server such that file Ising3DL10mpiprocs10.out.xml gets generated (e.g. something like spinmc --time-limit 10 --write-xml Ising3DL10mpiprocs10.in.xml, alternatively just stop the job with CTRL-C)
1) add the time limit of 2.4 hours in the command line where you execute your observable, such as e.g. mpirun -np 10 spinmc --mpi --Tmin 100 --time-limit 9000 --write-xml Ising3DL10mpiprocs10.out.xml [actually you should give slightly less than 2.4 hours such that files have the time to be written to disk, this is why I used 9000 seconds]
Remark that I used .out.xml , and not .in.xml such that your script really continues your ongoing jobs, and does not restart from scratch every time.
I hope this can help, Best Fabien
Le 1 juil. 2012 à 14:40, Rachele Nerattini a écrit :
Dear Mr. Troyer,
I read the page you suggested me but I still don't understand. It says how to restart a simulation stopped because the computer shut down or how to make it stop before its natural end in case you achieved the required error but I don't understad how to stop it in a controlled way.
For istance, let's suppose I have to run a simulation which is 24 hours long. I want to divide the long run in 10 runs of 2.4 hours each. The output of the first run must be the input of the following and I want to do all the runs in cascade.
What do I have to write in the input file to do that? Sorry but I didn't find it in the page
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
certeinly because I'm not an expert in these kind of things.
I copy and paste here in the following an example of input file I've wrote for the CINECA and an example of script I had to write to run a tet job.... Can you tell me what I have to change to make it stop after a certain numeber of seconds? Then I'll ask to CINECA assistence how to make all the block run in cascade.
Thank you and all the best,
Rachele Nerattini
input file = Ising3DL10mpiprocs10
LATTICE="simple cubic lattice" LATTICE_LIBRARY="lattices.xml" T=4.511441614 J=1 THERMALIZATION=200000 SWEEPS=1000000 UPDATE="cluster" MODEL="Ising" {L=10;}
script = Ising3DL10mpiprocs10.sh
#!/bin/bash #PBS -A name_of_the_project #PBS -l walltime=1:00:00 #PBS -l select=1:ncpus=10:mpiprocs=10:mem=40GB #PBS -q parallel #PBS -o Ising3DL10mpiprocs10.out #PBS -e Ising3DL10mpiprocs10.err # put the executable in the PATH module load autoload alps # cd in the directory where you have input e job.sh cd $PBS_O_WORKDIR # prep gli input parameter2xml Ising3DL10mpiprocs10
# it mounts openmpi to have mpirun in the PATH
module load profile/advanced openmpi/1.4.4--intel--co-2011.6.233--binary
mpirun -np 10 spinmc --mpi --Tmin 100 --write-xml Ising3DL10mpiprocs10.in.xml
qsub Ising3DL10mpiprocs10.sh
What do I have to add to have what I need?
Thank you again for the help,
I whish you all the best
Rachele Nerattini
2012/7/1 Rachele Nerattini r.nerattini@gmail.com Thank you very much for the help! I'll do it immediately. All the best Rachele Nerattini
2012/7/1 Matthias Troyer troyer@phys.ethz.ch It is explained here:
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
Best regards
Matthias Troyer
On Jul 1, 2012, at 12:18 PM, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm using Monte Carlo simulations for classical O(n) spin models. To be more precise I'm using the spinmc algorithm for Ising, XY and Heisenberg models.
Thank you for the help,
all the best
Rachele Nerattini
2012/6/28 Matthias Troyer troyer@phys.ethz.ch Dear Rachele Nerattini,
Are you using Monte Carlo simulations or one of the other codes?
With best regards
Matthias Troyer
On 28 Jun 2012, at 16:59, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm running some simulations using ALPS at the CINECA cluster in Bologna. I will have to run really long simulations which go well beyond the walltime limit of the machine.
To do that I have to divide the whole run in several subsections and then run all the processes in cascade.
Can you tell me how can I do that with ALPS? Which are the commands of stop/restart that I have to use?
Thank you for your help,
Rachele Nerattini
Thank you all very much! Yes, I think this could help. I'll send your mail to the CINECA-help-desk so that they will tell me if this is all we need and how to concatenate jobs.
In any case, if I understand well, all I have to do is:
0) to generate the file .out.xml;
1) to run the first block inserting the flag ' --time-limit #sec ' in the command line wich tells the program to stop after #sec seconds;
2) to run the second block using again the flag ' --time-limit #sec ' in the command line and the file .out.xml as input file;
3) to go on with this till the end of the simulations.
Is that ok? For what concerns the walltime limit I think it is 24 hours (24:00:00)... Thnak you again I'll let you know if everything works. Bye for now Rachele
2012/7/1 Fabien Alet alet@irsamc.ups-tlse.fr
Dear Rachele,
if I understood correctly, what you need to do is to : 0) run for 10 seconds or so your job locally on the main server such that file Ising3DL10mpiprocs10.out.xml gets generated (e.g. something like spinmc --time-limit 10 --write-xml Ising3DL10mpiprocs10.in.xml, alternatively just stop the job with CTRL-C)
- add the time limit of 2.4 hours in the command line where you execute
your observable, such as e.g. mpirun -np 10 spinmc --mpi --Tmin 100 --time-limit 9000 --write-xml Ising3DL10mpiprocs10.out.xml [actually you should give slightly less than 2.4 hours such that files have the time to be written to disk, this is why I used 9000 seconds]
Remark that I used .out.xml , and not .in.xml such that your script really continues your ongoing jobs, and does not restart from scratch every time.
I hope this can help, Best Fabien
Le 1 juil. 2012 à 14:40, Rachele Nerattini a écrit :
Dear Mr. Troyer,
I read the page you suggested me but I still don't understand. It says how to restart a simulation stopped because the computer shut down or how to make it stop before its natural end in case you achieved the required error but I don't understad how to stop it in a controlled way.
For istance, let's suppose I have to run a simulation which is 24 hours long. I want to divide the long run in 10 runs of 2.4 hours each. The output of the first run must be the input of the following and I want to do all the runs in cascade.
What do I have to write in the input file to do that? Sorry but I didn't find it in the page
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
certeinly because I'm not an expert in these kind of things.
I copy and paste here in the following an example of input file I've wrote for the CINECA and an example of script I had to write to run a tet job.... Can you tell me what I have to change to make it stop after a certain numeber of seconds? Then I'll ask to CINECA assistence how to make all the block run in cascade.
Thank you and all the best,
Rachele Nerattini
input file = Ising3DL10mpiprocs10
LATTICE="simple cubic lattice" LATTICE_LIBRARY="lattices.xml" T=4.511441614 J=1 THERMALIZATION=200000 SWEEPS=1000000 UPDATE="cluster" MODEL="Ising" {L=10;}
script = Ising3DL10mpiprocs10.sh
#!/bin/bash #PBS -A name_of_the_project #PBS -l walltime=1:00:00 #PBS -l select=1:ncpus=10:mpiprocs=10:mem=40GB #PBS -q parallel #PBS -o Ising3DL10mpiprocs10.out #PBS -e Ising3DL10mpiprocs10.err # put the executable in the PATH module load autoload alps # cd in the directory where you have input e job.sh cd $PBS_O_WORKDIR # prep gli input parameter2xml Ising3DL10mpiprocs10
# it mounts openmpi to have mpirun in the PATH
module load profile/advanced openmpi/1.4.4--intel--co-2011.6.233--binary
mpirun -np 10 spinmc --mpi --Tmin 100 --write-xml Ising3DL10mpiprocs10.in.xml
qsub Ising3DL10mpiprocs10.sh
What do I have to add to have what I need?
Thank you again for the help,
I whish you all the best
Rachele Nerattini
2012/7/1 Rachele Nerattini r.nerattini@gmail.com
Thank you very much for the help! I'll do it immediately. All the best Rachele Nerattini
2012/7/1 Matthias Troyer troyer@phys.ethz.ch
It is explained here:
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
Best regards
Matthias Troyer
On Jul 1, 2012, at 12:18 PM, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm using Monte Carlo simulations for classical O(n) spin models. To be more precise I'm using the spinmc algorithm for Ising, XY and Heisenberg models.
Thank you for the help,
all the best
Rachele Nerattini
2012/6/28 Matthias Troyer troyer@phys.ethz.ch
Dear Rachele Nerattini,
Are you using Monte Carlo simulations or one of the other codes?
With best regards
Matthias Troyer
On 28 Jun 2012, at 16:59, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm running some simulations using ALPS at the CINECA cluster in
Bologna. I will have to run really long simulations which go well beyond the walltime limit of the machine.
To do that I have to divide the whole run in several subsections and
then run all the processes in cascade.
Can you tell me how can I do that with ALPS? Which are the commands
of stop/restart that I have to use?
Thank you for your help,
Rachele Nerattini
On 1 Jul 2012, at 15:25, Rachele Nerattini wrote:
Thank you all very much! Yes, I think this could help. I'll send your mail to the CINECA-help-desk so that they will tell me if this is all we need and how to concatenate jobs.
In any case, if I understand well, all I have to do is:
Nearly
0)use parameter2xml to generate the file .*.in.xml;
- to run the first block inserting the flag ' --time-limit #sec ' in the command line wich tells the program to stop after #sec seconds;
to run the second block using again the flag ' --time-limit #sec ' in the command line and the file .out.xml as input file;
to go on with this till the end of the simulations.
Yes
Is that ok? For what concerns the walltime limit I think it is 24 hours (24:00:00)...
24 ho0urs will be 86400 seconds, but the code will need time to write the checkpoints, thus specify about 1000 seconds less to be on the safe side.
Thnak you again I'll let you know if everything works. Bye for now Rachele
2012/7/1 Fabien Alet alet@irsamc.ups-tlse.fr Dear Rachele,
if I understood correctly, what you need to do is to : 0) run for 10 seconds or so your job locally on the main server such that file Ising3DL10mpiprocs10.out.xml gets generated (e.g. something like spinmc --time-limit 10 --write-xml Ising3DL10mpiprocs10.in.xml, alternatively just stop the job with CTRL-C)
- add the time limit of 2.4 hours in the command line where you execute your observable, such as e.g.
mpirun -np 10 spinmc --mpi --Tmin 100 --time-limit 9000 --write-xml Ising3DL10mpiprocs10.out.xml [actually you should give slightly less than 2.4 hours such that files have the time to be written to disk, this is why I used 9000 seconds]
Remark that I used .out.xml , and not .in.xml such that your script really continues your ongoing jobs, and does not restart from scratch every time.
I hope this can help, Best Fabien
Le 1 juil. 2012 à 14:40, Rachele Nerattini a écrit :
Dear Mr. Troyer,
I read the page you suggested me but I still don't understand. It says how to restart a simulation stopped because the computer shut down or how to make it stop before its natural end in case you achieved the required error but I don't understad how to stop it in a controlled way.
For istance, let's suppose I have to run a simulation which is 24 hours long. I want to divide the long run in 10 runs of 2.4 hours each. The output of the first run must be the input of the following and I want to do all the runs in cascade.
What do I have to write in the input file to do that? Sorry but I didn't find it in the page
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
certeinly because I'm not an expert in these kind of things.
I copy and paste here in the following an example of input file I've wrote for the CINECA and an example of script I had to write to run a tet job.... Can you tell me what I have to change to make it stop after a certain numeber of seconds? Then I'll ask to CINECA assistence how to make all the block run in cascade.
Thank you and all the best,
Rachele Nerattini
input file = Ising3DL10mpiprocs10
LATTICE="simple cubic lattice" LATTICE_LIBRARY="lattices.xml" T=4.511441614 J=1 THERMALIZATION=200000 SWEEPS=1000000 UPDATE="cluster" MODEL="Ising" {L=10;}
script = Ising3DL10mpiprocs10.sh
#!/bin/bash #PBS -A name_of_the_project #PBS -l walltime=1:00:00 #PBS -l select=1:ncpus=10:mpiprocs=10:mem=40GB #PBS -q parallel #PBS -o Ising3DL10mpiprocs10.out #PBS -e Ising3DL10mpiprocs10.err # put the executable in the PATH module load autoload alps # cd in the directory where you have input e job.sh cd $PBS_O_WORKDIR # prep gli input parameter2xml Ising3DL10mpiprocs10
# it mounts openmpi to have mpirun in the PATH
module load profile/advanced openmpi/1.4.4--intel--co-2011.6.233--binary
mpirun -np 10 spinmc --mpi --Tmin 100 --write-xml Ising3DL10mpiprocs10.in.xml
qsub Ising3DL10mpiprocs10.sh
What do I have to add to have what I need?
Thank you again for the help,
I whish you all the best
Rachele Nerattini
2012/7/1 Rachele Nerattini r.nerattini@gmail.com Thank you very much for the help! I'll do it immediately. All the best Rachele Nerattini
2012/7/1 Matthias Troyer troyer@phys.ethz.ch It is explained here:
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
Best regards
Matthias Troyer
On Jul 1, 2012, at 12:18 PM, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm using Monte Carlo simulations for classical O(n) spin models. To be more precise I'm using the spinmc algorithm for Ising, XY and Heisenberg models.
Thank you for the help,
all the best
Rachele Nerattini
2012/6/28 Matthias Troyer troyer@phys.ethz.ch Dear Rachele Nerattini,
Are you using Monte Carlo simulations or one of the other codes?
With best regards
Matthias Troyer
On 28 Jun 2012, at 16:59, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm running some simulations using ALPS at the CINECA cluster in Bologna. I will have to run really long simulations which go well beyond the walltime limit of the machine.
To do that I have to divide the whole run in several subsections and then run all the processes in cascade.
Can you tell me how can I do that with ALPS? Which are the commands of stop/restart that I have to use?
Thank you for your help,
Rachele Nerattini
ok, I'll try to run it on CINECA and I'll tell you if it works.
2012/7/1 Matthias Troyer troyer@phys.ethz.ch
On 1 Jul 2012, at 15:25, Rachele Nerattini wrote:
Thank you all very much! Yes, I think this could help. I'll send your mail to the CINECA-help-desk so that they will tell me if this is all we need and how to concatenate jobs.
In any case, if I understand well, all I have to do is:
Nearly
0)use parameter2xml to generate the file .*.in.xml;
- to run the first block inserting the flag ' --time-limit #sec ' in the
command line wich tells the program to stop after #sec seconds;
- to run the second block using again the flag ' --time-limit #sec ' in
the command line and the file .out.xml as input file;
- to go on with this till the end of the simulations.
Yes
Is that ok? For what concerns the walltime limit I think it is 24 hours (24:00:00)...
24 ho0urs will be 86400 seconds, but the code will need time to write the checkpoints, thus specify about 1000 seconds less to be on the safe side.
Thnak you again I'll let you know if everything works. Bye for now Rachele
2012/7/1 Fabien Alet alet@irsamc.ups-tlse.fr
Dear Rachele,
if I understood correctly, what you need to do is to : 0) run for 10 seconds or so your job locally on the main server such that file Ising3DL10mpiprocs10.out.xml gets generated (e.g. something like spinmc --time-limit 10 --write-xml Ising3DL10mpiprocs10.in.xml, alternatively just stop the job with CTRL-C)
- add the time limit of 2.4 hours in the command line where you execute
your observable, such as e.g. mpirun -np 10 spinmc --mpi --Tmin 100 --time-limit 9000 --write-xml Ising3DL10mpiprocs10.out.xml [actually you should give slightly less than 2.4 hours such that files have the time to be written to disk, this is why I used 9000 seconds]
Remark that I used .out.xml , and not .in.xml such that your script really continues your ongoing jobs, and does not restart from scratch every time.
I hope this can help, Best Fabien
Le 1 juil. 2012 à 14:40, Rachele Nerattini a écrit :
Dear Mr. Troyer,
I read the page you suggested me but I still don't understand. It says how to restart a simulation stopped because the computer shut down or how to make it stop before its natural end in case you achieved the required error but I don't understad how to stop it in a controlled way.
For istance, let's suppose I have to run a simulation which is 24 hours long. I want to divide the long run in 10 runs of 2.4 hours each. The output of the first run must be the input of the following and I want to do all the runs in cascade.
What do I have to write in the input file to do that? Sorry but I didn't find it in the page
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
certeinly because I'm not an expert in these kind of things.
I copy and paste here in the following an example of input file I've wrote for the CINECA and an example of script I had to write to run a tet job.... Can you tell me what I have to change to make it stop after a certain numeber of seconds? Then I'll ask to CINECA assistence how to make all the block run in cascade.
Thank you and all the best,
Rachele Nerattini
input file = Ising3DL10mpiprocs10
LATTICE="simple cubic lattice" LATTICE_LIBRARY="lattices.xml" T=4.511441614 J=1 THERMALIZATION=200000 SWEEPS=1000000 UPDATE="cluster" MODEL="Ising" {L=10;}
script = Ising3DL10mpiprocs10.sh
#!/bin/bash #PBS -A name_of_the_project #PBS -l walltime=1:00:00 #PBS -l select=1:ncpus=10:mpiprocs=10:mem=40GB #PBS -q parallel #PBS -o Ising3DL10mpiprocs10.out #PBS -e Ising3DL10mpiprocs10.err # put the executable in the PATH module load autoload alps # cd in the directory where you have input e job.sh cd $PBS_O_WORKDIR # prep gli input parameter2xml Ising3DL10mpiprocs10
# it mounts openmpi to have mpirun in the PATH
module load profile/advanced openmpi/1.4.4--intel--co-2011.6.233--binary
mpirun -np 10 spinmc --mpi --Tmin 100 --write-xml Ising3DL10mpiprocs10.in.xml
qsub Ising3DL10mpiprocs10.sh
What do I have to add to have what I need?
Thank you again for the help,
I whish you all the best
Rachele Nerattini
2012/7/1 Rachele Nerattini r.nerattini@gmail.com
Thank you very much for the help! I'll do it immediately. All the best Rachele Nerattini
2012/7/1 Matthias Troyer troyer@phys.ethz.ch
It is explained here:
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
Best regards
Matthias Troyer
On Jul 1, 2012, at 12:18 PM, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm using Monte Carlo simulations for classical O(n) spin models. To be more precise I'm using the spinmc algorithm for Ising, XY and Heisenberg models.
Thank you for the help,
all the best
Rachele Nerattini
2012/6/28 Matthias Troyer troyer@phys.ethz.ch
Dear Rachele Nerattini,
Are you using Monte Carlo simulations or one of the other codes?
With best regards
Matthias Troyer
On 28 Jun 2012, at 16:59, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm running some simulations using ALPS at the CINECA cluster in
Bologna. I will have to run really long simulations which go well beyond the walltime limit of the machine.
To do that I have to divide the whole run in several subsections and
then run all the processes in cascade.
Can you tell me how can I do that with ALPS? Which are the commands
of stop/restart that I have to use?
Thank you for your help,
Rachele Nerattini
Thank you again for the quick and precise help.
2012/7/1 Rachele Nerattini r.nerattini@gmail.com
ok, I'll try to run it on CINECA and I'll tell you if it works.
2012/7/1 Matthias Troyer troyer@phys.ethz.ch
On 1 Jul 2012, at 15:25, Rachele Nerattini wrote:
Thank you all very much! Yes, I think this could help. I'll send your mail to the CINECA-help-desk so that they will tell me if this is all we need and how to concatenate jobs.
In any case, if I understand well, all I have to do is:
Nearly
0)use parameter2xml to generate the file .*.in.xml;
- to run the first block inserting the flag ' --time-limit #sec ' in the
command line wich tells the program to stop after #sec seconds;
- to run the second block using again the flag ' --time-limit #sec ' in
the command line and the file .out.xml as input file;
- to go on with this till the end of the simulations.
Yes
Is that ok? For what concerns the walltime limit I think it is 24 hours (24:00:00)...
24 ho0urs will be 86400 seconds, but the code will need time to write the checkpoints, thus specify about 1000 seconds less to be on the safe side.
Thnak you again I'll let you know if everything works. Bye for now Rachele
2012/7/1 Fabien Alet alet@irsamc.ups-tlse.fr
Dear Rachele,
if I understood correctly, what you need to do is to : 0) run for 10 seconds or so your job locally on the main server such that file Ising3DL10mpiprocs10.out.xml gets generated (e.g. something like spinmc --time-limit 10 --write-xml Ising3DL10mpiprocs10.in.xml, alternatively just stop the job with CTRL-C)
- add the time limit of 2.4 hours in the command line where you execute
your observable, such as e.g. mpirun -np 10 spinmc --mpi --Tmin 100 --time-limit 9000 --write-xml Ising3DL10mpiprocs10.out.xml [actually you should give slightly less than 2.4 hours such that files have the time to be written to disk, this is why I used 9000 seconds]
Remark that I used .out.xml , and not .in.xml such that your script really continues your ongoing jobs, and does not restart from scratch every time.
I hope this can help, Best Fabien
Le 1 juil. 2012 à 14:40, Rachele Nerattini a écrit :
Dear Mr. Troyer,
I read the page you suggested me but I still don't understand. It says how to restart a simulation stopped because the computer shut down or how to make it stop before its natural end in case you achieved the required error but I don't understad how to stop it in a controlled way.
For istance, let's suppose I have to run a simulation which is 24 hours long. I want to divide the long run in 10 runs of 2.4 hours each. The output of the first run must be the input of the following and I want to do all the runs in cascade.
What do I have to write in the input file to do that? Sorry but I didn't find it in the page
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
certeinly because I'm not an expert in these kind of things.
I copy and paste here in the following an example of input file I've wrote for the CINECA and an example of script I had to write to run a tet job.... Can you tell me what I have to change to make it stop after a certain numeber of seconds? Then I'll ask to CINECA assistence how to make all the block run in cascade.
Thank you and all the best,
Rachele Nerattini
input file = Ising3DL10mpiprocs10
LATTICE="simple cubic lattice" LATTICE_LIBRARY="lattices.xml" T=4.511441614 J=1 THERMALIZATION=200000 SWEEPS=1000000 UPDATE="cluster" MODEL="Ising" {L=10;}
script = Ising3DL10mpiprocs10.sh
#!/bin/bash #PBS -A name_of_the_project #PBS -l walltime=1:00:00 #PBS -l select=1:ncpus=10:mpiprocs=10:mem=40GB #PBS -q parallel #PBS -o Ising3DL10mpiprocs10.out #PBS -e Ising3DL10mpiprocs10.err # put the executable in the PATH module load autoload alps # cd in the directory where you have input e job.sh cd $PBS_O_WORKDIR # prep gli input parameter2xml Ising3DL10mpiprocs10
# it mounts openmpi to have mpirun in the PATH
module load profile/advanced openmpi/1.4.4--intel--co-2011.6.233--binary
mpirun -np 10 spinmc --mpi --Tmin 100 --write-xml Ising3DL10mpiprocs10.in.xml
qsub Ising3DL10mpiprocs10.sh
What do I have to add to have what I need?
Thank you again for the help,
I whish you all the best
Rachele Nerattini
2012/7/1 Rachele Nerattini r.nerattini@gmail.com
Thank you very much for the help! I'll do it immediately. All the best Rachele Nerattini
2012/7/1 Matthias Troyer troyer@phys.ethz.ch
It is explained here:
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
Best regards
Matthias Troyer
On Jul 1, 2012, at 12:18 PM, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm using Monte Carlo simulations for classical O(n) spin models. To be more precise I'm using the spinmc algorithm for Ising, XY and Heisenberg models.
Thank you for the help,
all the best
Rachele Nerattini
2012/6/28 Matthias Troyer troyer@phys.ethz.ch
Dear Rachele Nerattini,
Are you using Monte Carlo simulations or one of the other codes?
With best regards
Matthias Troyer
On 28 Jun 2012, at 16:59, Rachele Nerattini wrote:
> Dear Mr.Troyer, > > I'm running some simulations using ALPS at the CINECA cluster in Bologna. I will have to run really long simulations which go well beyond the walltime limit of the machine. > > To do that I have to divide the whole run in several subsections and then run all the processes in cascade. > > Can you tell me how can I do that with ALPS? Which are the commands of stop/restart that I have to use? > > Thank you for your help, > > Rachele Nerattini
Dear Mr. Troyer,
I have to run very long simulations of classical O(n) model in three spatial dimensions. In particular I study the Ising model, the XY model, the Heisenberg model and the O(4) model at the critical value of the temperature. To gain time I wanted to run the simulations in parallel.
An example of the input file I used is:
============================ LATTICE="simple cubic lattice" LATTICE_LIBRARY="lattices.xml" T=4.511441614 J=1 THERMALIZATION=200000 SWEEPS=1000000 UPDATE="cluster" MODEL="Ising" {L=32;} ============================
And the command I used to run the simulation on 4 processors is
mpirun -np 4 spinmc --mpi --Tmin 300 --time-limit 2400 --write-xml Ising3DL32mpiprocs4.out.xml (1)
------------------------------------------------------------------------------------------- To run the same simulation in a serial manner I use the command
spinmc --Tmin 300 --time-limit 2400 --write-xml Ising3DL32serial.out.xml (2) -------------------------------------------------------------------------------------------- In both cases the simulation runs properly BUT I the gain, in terms of time, of the parallel run with respect to the serial run is almost zero. This is true independentely on the number of processors that I used (2,4,8,12).
Am I doing some mistakes in the command line (1) ? Am I missing any flags or something like that? Or the parallelization of the program is done only at a compliler level (In the sense that the program spinmc can run on different processors but as a matter of fact it is not really optimized in this sense...)?
Thank you for your attention and for your answer.
With best regards,
Rachele
2012/7/1 Rachele Nerattini r.nerattini@gmail.com
Thank you again for the quick and precise help.
2012/7/1 Rachele Nerattini r.nerattini@gmail.com
ok, I'll try to run it on CINECA and I'll tell you if it works.
2012/7/1 Matthias Troyer troyer@phys.ethz.ch
On 1 Jul 2012, at 15:25, Rachele Nerattini wrote:
Thank you all very much! Yes, I think this could help. I'll send your mail to the CINECA-help-desk so that they will tell me if this is all we need and how to concatenate jobs.
In any case, if I understand well, all I have to do is:
Nearly
0)use parameter2xml to generate the file .*.in.xml;
- to run the first block inserting the flag ' --time-limit #sec ' in
the command line wich tells the program to stop after #sec seconds;
- to run the second block using again the flag ' --time-limit #sec ' in
the command line and the file .out.xml as input file;
- to go on with this till the end of the simulations.
Yes
Is that ok? For what concerns the walltime limit I think it is 24 hours (24:00:00)...
24 ho0urs will be 86400 seconds, but the code will need time to write the checkpoints, thus specify about 1000 seconds less to be on the safe side.
Thnak you again I'll let you know if everything works. Bye for now Rachele
2012/7/1 Fabien Alet alet@irsamc.ups-tlse.fr
Dear Rachele,
if I understood correctly, what you need to do is to : 0) run for 10 seconds or so your job locally on the main server such that file Ising3DL10mpiprocs10.out.xml gets generated (e.g. something like spinmc --time-limit 10 --write-xml Ising3DL10mpiprocs10.in.xml, alternatively just stop the job with CTRL-C)
- add the time limit of 2.4 hours in the command line where you
execute your observable, such as e.g. mpirun -np 10 spinmc --mpi --Tmin 100 --time-limit 9000 --write-xml Ising3DL10mpiprocs10.out.xml [actually you should give slightly less than 2.4 hours such that files have the time to be written to disk, this is why I used 9000 seconds]
Remark that I used .out.xml , and not .in.xml such that your script really continues your ongoing jobs, and does not restart from scratch every time.
I hope this can help, Best Fabien
Le 1 juil. 2012 à 14:40, Rachele Nerattini a écrit :
Dear Mr. Troyer,
I read the page you suggested me but I still don't understand. It says how to restart a simulation stopped because the computer shut down or how to make it stop before its natural end in case you achieved the required error but I don't understad how to stop it in a controlled way.
For istance, let's suppose I have to run a simulation which is 24 hours long. I want to divide the long run in 10 runs of 2.4 hours each. The output of the first run must be the input of the following and I want to do all the runs in cascade.
What do I have to write in the input file to do that? Sorry but I didn't find it in the page
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
certeinly because I'm not an expert in these kind of things.
I copy and paste here in the following an example of input file I've wrote for the CINECA and an example of script I had to write to run a tet job.... Can you tell me what I have to change to make it stop after a certain numeber of seconds? Then I'll ask to CINECA assistence how to make all the block run in cascade.
Thank you and all the best,
Rachele Nerattini
input file = Ising3DL10mpiprocs10
LATTICE="simple cubic lattice" LATTICE_LIBRARY="lattices.xml" T=4.511441614 J=1 THERMALIZATION=200000 SWEEPS=1000000 UPDATE="cluster" MODEL="Ising" {L=10;}
script = Ising3DL10mpiprocs10.sh
#!/bin/bash #PBS -A name_of_the_project #PBS -l walltime=1:00:00 #PBS -l select=1:ncpus=10:mpiprocs=10:mem=40GB #PBS -q parallel #PBS -o Ising3DL10mpiprocs10.out #PBS -e Ising3DL10mpiprocs10.err # put the executable in the PATH module load autoload alps # cd in the directory where you have input e job.sh cd $PBS_O_WORKDIR # prep gli input parameter2xml Ising3DL10mpiprocs10
# it mounts openmpi to have mpirun in the PATH
module load profile/advanced openmpi/1.4.4--intel--co-2011.6.233--binary
mpirun -np 10 spinmc --mpi --Tmin 100 --write-xml Ising3DL10mpiprocs10.in.xml
qsub Ising3DL10mpiprocs10.sh
What do I have to add to have what I need?
Thank you again for the help,
I whish you all the best
Rachele Nerattini
2012/7/1 Rachele Nerattini r.nerattini@gmail.com
Thank you very much for the help! I'll do it immediately. All the best Rachele Nerattini
2012/7/1 Matthias Troyer troyer@phys.ethz.ch
It is explained here:
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
Best regards
Matthias Troyer
On Jul 1, 2012, at 12:18 PM, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm using Monte Carlo simulations for classical O(n) spin models. To be more precise I'm using the spinmc algorithm for Ising, XY and Heisenberg models.
Thank you for the help,
all the best
Rachele Nerattini
2012/6/28 Matthias Troyer troyer@phys.ethz.ch
> Dear Rachele Nerattini, > > Are you using Monte Carlo simulations or one of the other codes? > > With best regards > > Matthias Troyer > > On 28 Jun 2012, at 16:59, Rachele Nerattini wrote: > > > Dear Mr.Troyer, > > > > I'm running some simulations using ALPS at the CINECA cluster in > Bologna. I will have to run really long simulations which go well beyond > the walltime limit of the machine. > > > > To do that I have to divide the whole run in several subsections > and then run all the processes in cascade. > > > > Can you tell me how can I do that with ALPS? Which are the > commands of stop/restart that I have to use? > > > > Thank you for your help, > > > > Rachele Nerattini > >
Dear Mr Troyer,
sorry if I write again is only that I didn't hear anything from you and I'm not sure you received my mail. I have to run MC simulations for classical O(n) spin model in parallel.
I used the command
mpirun -np 4 spinmc --mpi --Tmin 300 --time-limit 2400 --write-xml Ising3DL32mpiprocs4.out.xml
to mean that I want to run it on 4 processors. The simulation goes fine and in the end I have these output files:
Ising3DL32mpiprocs4.out.xml Ising3DL32mpiprocs4.task1.out.run1.xml Ising3DL32mpiprocs4.task1.out.run2.xml Ising3DL32mpiprocs4.task1.out.run3.xml Ising3DL32mpiprocs4.task1.out.run4.xml
more other files. I am a bit surprised since in every file Ising3DL32mpiprocs4.task1.out.run*.xml It looks like I have a separate simulation of the same model and it doesn't seems like that the whole simulation (the one generated by the file Ising3DL32mpiprocs4.in.xml) is being partitioned in 4 parts.
In fact the simulation takes exactly the same time if I run it on 2, 4, 8, 12 .... processors. I don't have any gain in time with the parallelization of the program.
Why? Do I missing any flags in the command above or is the program really written for parallelization?
Thank you very much for the help.
Waiting for your answer, all the best
Rachele Nerattini
I have to run very long simulations of classical O(n) model in three spatial dimensions. In particular I study the Ising model, the XY model, the Heisenberg model and the O(4) model at the critical value of the temperature. To gain time I wanted to run the simulations in parallel.
An example of the input file I used is:
============================
LATTICE="simple cubic lattice" LATTICE_LIBRARY="lattices.xml" T=4.511441614 J=1 THERMALIZATION=200000 SWEEPS=1000000 UPDATE="cluster" MODEL="Ising" {L=32;} ============================
And the command I used to run the simulation on 4 processors is
mpirun -np 4 spinmc --mpi --Tmin 300 --time-limit 2400 --write-xml Ising3DL32mpiprocs4.out.xml (1)
To run the same simulation in a serial manner I use the command
spinmc --Tmin 300 --time-limit 2400 --write-xml Ising3DL32serial.out.xml (2)
In both cases the simulation runs properly BUT I the gain, in terms of time, of the parallel run with respect to the serial run is almost zero. This is true independentely on the number of processors that I used (2,4,8,12).
Am I doing some mistakes in the command line (1) ? Am I missing any flags or something like that? Or the parallelization of the program is done only at a compliler level (In the sense that the program spinmc can run on different processors but as a matter of fact it is not really optimized in this sense...)?
Thank you for your attention and for your answer.
With best regards,
Rachele
2012/7/1 Rachele Nerattini r.nerattini@gmail.com
Thank you again for the quick and precise help.
2012/7/1 Rachele Nerattini r.nerattini@gmail.com
ok, I'll try to run it on CINECA and I'll tell you if it works.
2012/7/1 Matthias Troyer troyer@phys.ethz.ch
On 1 Jul 2012, at 15:25, Rachele Nerattini wrote:
Thank you all very much! Yes, I think this could help. I'll send your mail to the CINECA-help-desk so that they will tell me if this is all we need and how to concatenate jobs.
In any case, if I understand well, all I have to do is:
Nearly
0)use parameter2xml to generate the file .*.in.xml;
- to run the first block inserting the flag ' --time-limit #sec ' in
the command line wich tells the program to stop after #sec seconds;
- to run the second block using again the flag ' --time-limit #sec '
in the command line and the file .out.xml as input file;
- to go on with this till the end of the simulations.
Yes
Is that ok? For what concerns the walltime limit I think it is 24 hours (24:00:00)...
24 ho0urs will be 86400 seconds, but the code will need time to write the checkpoints, thus specify about 1000 seconds less to be on the safe side.
Thnak you again I'll let you know if everything works. Bye for now Rachele
2012/7/1 Fabien Alet alet@irsamc.ups-tlse.fr
Dear Rachele,
if I understood correctly, what you need to do is to : 0) run for 10 seconds or so your job locally on the main server such that file Ising3DL10mpiprocs10.out.xml gets generated (e.g. something like spinmc --time-limit 10 --write-xml Ising3DL10mpiprocs10.in.xml, alternatively just stop the job with CTRL-C)
- add the time limit of 2.4 hours in the command line where you
execute your observable, such as e.g. mpirun -np 10 spinmc --mpi --Tmin 100 --time-limit 9000 --write-xml Ising3DL10mpiprocs10.out.xml [actually you should give slightly less than 2.4 hours such that files have the time to be written to disk, this is why I used 9000 seconds]
Remark that I used .out.xml , and not .in.xml such that your script really continues your ongoing jobs, and does not restart from scratch every time.
I hope this can help, Best Fabien
Le 1 juil. 2012 à 14:40, Rachele Nerattini a écrit :
Dear Mr. Troyer,
I read the page you suggested me but I still don't understand. It says how to restart a simulation stopped because the computer shut down or how to make it stop before its natural end in case you achieved the required error but I don't understad how to stop it in a controlled way.
For istance, let's suppose I have to run a simulation which is 24 hours long. I want to divide the long run in 10 runs of 2.4 hours each. The output of the first run must be the input of the following and I want to do all the runs in cascade.
What do I have to write in the input file to do that? Sorry but I didn't find it in the page
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
certeinly because I'm not an expert in these kind of things.
I copy and paste here in the following an example of input file I've wrote for the CINECA and an example of script I had to write to run a tet job.... Can you tell me what I have to change to make it stop after a certain numeber of seconds? Then I'll ask to CINECA assistence how to make all the block run in cascade.
Thank you and all the best,
Rachele Nerattini
input file = Ising3DL10mpiprocs10
LATTICE="simple cubic lattice" LATTICE_LIBRARY="lattices.xml" T=4.511441614 J=1 THERMALIZATION=200000 SWEEPS=1000000 UPDATE="cluster" MODEL="Ising" {L=10;}
script = Ising3DL10mpiprocs10.sh
#!/bin/bash #PBS -A name_of_the_project #PBS -l walltime=1:00:00 #PBS -l select=1:ncpus=10:mpiprocs=10:mem=40GB #PBS -q parallel #PBS -o Ising3DL10mpiprocs10.out #PBS -e Ising3DL10mpiprocs10.err # put the executable in the PATH module load autoload alps # cd in the directory where you have input e job.sh cd $PBS_O_WORKDIR # prep gli input parameter2xml Ising3DL10mpiprocs10
# it mounts openmpi to have mpirun in the PATH
module load profile/advanced openmpi/1.4.4--intel--co-2011.6.233--binary
mpirun -np 10 spinmc --mpi --Tmin 100 --write-xml Ising3DL10mpiprocs10.in.xml
qsub Ising3DL10mpiprocs10.sh
What do I have to add to have what I need?
Thank you again for the help,
I whish you all the best
Rachele Nerattini
2012/7/1 Rachele Nerattini r.nerattini@gmail.com
Thank you very much for the help! I'll do it immediately. All the best Rachele Nerattini
2012/7/1 Matthias Troyer troyer@phys.ethz.ch
> It is explained here: > > http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running > > Best regards > > Matthias Troyer > > On Jul 1, 2012, at 12:18 PM, Rachele Nerattini wrote: > > Dear Mr.Troyer, > > I'm using Monte Carlo simulations for classical O(n) spin models. To > be more precise I'm using the spinmc algorithm for Ising, XY and Heisenberg > models. > > Thank you for the help, > > all the best > > Rachele Nerattini > > > 2012/6/28 Matthias Troyer troyer@phys.ethz.ch > >> Dear Rachele Nerattini, >> >> Are you using Monte Carlo simulations or one of the other codes? >> >> With best regards >> >> Matthias Troyer >> >> On 28 Jun 2012, at 16:59, Rachele Nerattini wrote: >> >> > Dear Mr.Troyer, >> > >> > I'm running some simulations using ALPS at the CINECA cluster in >> Bologna. I will have to run really long simulations which go well beyond >> the walltime limit of the machine. >> > >> > To do that I have to divide the whole run in several subsections >> and then run all the processes in cascade. >> > >> > Can you tell me how can I do that with ALPS? Which are the >> commands of stop/restart that I have to use? >> > >> > Thank you for your help, >> > >> > Rachele Nerattini >> >> > >
Dear Rachele,
if I understand correctly your situation, the fact that each simulation on 2,4,8,12.. processors takes exactly the same computational time means that the total number of Monte Carlo iterations on each processor is always the same. In other words, on each processor you make a certain number of iterations which is **independent** on the total number of processors.
The advantage of using more processors is that the statistical error you will have with say 8 processors should be about a factor 2 smaller than the statistical error you have when running with 2 processor.
You might verify if this is the case.
Regards,
Giuseppe
Dear Mr Troyer,
sorry if I write again is only that I didn't hear anything from you and I'm not sure you received my mail. I have to run MC simulations for classical O(n) spin model in parallel.
I used the command
mpirun -np 4 spinmc --mpi --Tmin 300 --time-limit 2400 --write-xml Ising3DL32mpiprocs4.out.xml
to mean that I want to run it on 4 processors. The simulation goes fine and in the end I have these output files:
Ising3DL32mpiprocs4.out.xml Ising3DL32mpiprocs4.task1.out.run1.xml Ising3DL32mpiprocs4.task1.out.run2.xml Ising3DL32mpiprocs4.task1.out.run3.xml Ising3DL32mpiprocs4.task1.out.run4.xml
more other files. I am a bit surprised since in every file Ising3DL32mpiprocs4.task1.out.run*.xml It looks like I have a separate simulation of the same model and it doesn't seems like that the whole simulation (the one generated by the file Ising3DL32mpiprocs4.in.xml) is being partitioned in 4 parts.
In fact the simulation takes exactly the same time if I run it on 2, 4, 8, 12 .... processors. I don't have any gain in time with the parallelization of the program.
Why? Do I missing any flags in the command above or is the program really written for parallelization?
Thank you very much for the help.
Waiting for your answer, all the best
Rachele Nerattini
I have to run very long simulations of classical O(n) model in three spatial dimensions. In particular I study the Ising model, the XY model, the Heisenberg model and the O(4) model at the critical value of the temperature. To gain time I wanted to run the simulations in parallel. An example of the input file I used is: ============================ LATTICE="simple cubic lattice" LATTICE_LIBRARY="lattices.xml" T=4.511441614 J=1 THERMALIZATION=200000 SWEEPS=1000000 UPDATE="cluster" MODEL="Ising" {L=32;} ============================ And the command I used to run the simulation on 4 processors is mpirun -np 4 spinmc --mpi --Tmin 300 --time-limit 2400 --write-xml Ising3DL32mpiprocs4.out.xml (1) ------------------------------------------------------------------------------------------- To run the same simulation in a serial manner I use the command spinmc --Tmin 300 --time-limit 2400 --write-xml Ising3DL32serial.out.xml (2) -------------------------------------------------------------------------------------------- In both cases the simulation runs properly BUT I the gain, in terms of time, of the parallel run with respect to the serial run is almost zero. This is true independentely on the number of processors that I used (2,4,8,12). Am I doing some mistakes in the command line (1) ? Am I missing any flags or something like that? Or the parallelization of the program is done only at a compliler level (In the sense that the program spinmc can run on different processors but as a matter of fact it is not really optimized in this sense...)? Thank you for your attention and for your answer. With best regards, Rachele 2012/7/1 Rachele Nerattini <r.nerattini@gmail.com <mailto:r.nerattini@gmail.com>> Thank you again for the quick and precise help. 2012/7/1 Rachele Nerattini <r.nerattini@gmail.com <mailto:r.nerattini@gmail.com>> ok, I'll try to run it on CINECA and I'll tell you if it works. 2012/7/1 Matthias Troyer <troyer@phys.ethz.ch <mailto:troyer@phys.ethz.ch>> On 1 Jul 2012, at 15:25, Rachele Nerattini wrote:
Thank you all very much! Yes, I think this could help. I'll send your mail to the CINECA-help-desk so that they will tell me if this is all we need and how to concatenate jobs. In any case, if I understand well, all I have to do is:
Nearly
0)use parameter2xml to generate the file .*.in.xml;
1) to run the first block inserting the flag ' --time-limit #sec ' in the command line wich tells the program to stop after #sec seconds;
2) to run the second block using again the flag ' --time-limit #sec ' in the command line and the file .out.xml as input file; 3) to go on with this till the end of the simulations.
Yes
Is that ok? For what concerns the walltime limit I think it is 24 hours (24:00:00)...
24 ho0urs will be 86400 seconds, but the code will need time to write the checkpoints, thus specify about 1000 seconds less to be on the safe side.
Thnak you again I'll let you know if everything works. Bye for now Rachele
2012/7/1 Fabien Alet <alet@irsamc.ups-tlse.fr <mailto:alet@irsamc.ups-tlse.fr>> Dear Rachele, if I understood correctly, what you need to do is to : 0) run for 10 seconds or so your job locally on the main server such that file Ising3DL10mpiprocs10.out.xml gets generated (e.g. something like spinmc --time-limit 10 --write-xml Ising3DL10mpiprocs10.in.xml, alternatively just stop the job with CTRL-C) 1) add the time limit of 2.4 hours in the command line where you execute your observable, such as e.g. mpirun -np 10 spinmc --mpi --Tmin 100 --time-limit 9000 --write-xml Ising3DL10mpiprocs10.out.xml [actually you should give slightly less than 2.4 hours such that files have the time to be written to disk, this is why I used 9000 seconds] Remark that I used .out.xml , and not .in.xml such that your script really continues your ongoing jobs, and does not restart from scratch every time. I hope this can help, Best Fabien Le 1 juil. 2012 à 14:40, Rachele Nerattini a écrit :
Dear Mr. Troyer, I read the page you suggested me but I still don't understand. It says how to restart a simulation stopped because the computer shut down or how to make it stop before its natural end in case you achieved the required error but I don't understad how to stop it in a controlled way. For istance, let's suppose I have to run a simulation which is 24 hours long. I want to divide the long run in 10 runs of 2.4 hours each. The output of the first run must be the input of the following and I want to do all the runs in cascade. What do I have to write in the input file to do that? Sorry but I didn't find it in the page http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running certeinly because I'm not an expert in these kind of things. I copy and paste here in the following an example of input file I've wrote for the CINECA and an example of script I had to write to run a tet job.... Can you tell me what I have to change to make it stop after a certain numeber of seconds? Then I'll ask to CINECA assistence how to make all the block run in cascade. Thank you and all the best, Rachele Nerattini input file = Ising3DL10mpiprocs10 LATTICE="simple cubic lattice" LATTICE_LIBRARY="lattices.xml" T=4.511441614 J=1 THERMALIZATION=200000 SWEEPS=1000000 UPDATE="cluster" MODEL="Ising" {L=10;} script = Ising3DL10mpiprocs10.sh #!/bin/bash #PBS -A name_of_the_project #PBS -l walltime=1:00:00 #PBS -l select=1:ncpus=10:mpiprocs=10:mem=40GB #PBS -q parallel #PBS -o Ising3DL10mpiprocs10.out #PBS -e Ising3DL10mpiprocs10.err # put the executable in the PATH module load autoload alps # cd in the directory where you have input e job.sh cd $PBS_O_WORKDIR # prep gli input parameter2xml Ising3DL10mpiprocs10 # it mounts openmpi to have mpirun in the PATH module load profile/advanced openmpi/1.4.4--intel--co-2011.6.233--binary mpirun -np 10 spinmc --mpi --Tmin 100 --write-xml Ising3DL10mpiprocs10.in.xml qsub Ising3DL10mpiprocs10.sh What do I have to add to have what I need? Thank you again for the help, I whish you all the best Rachele Nerattini 2012/7/1 Rachele Nerattini <r.nerattini@gmail.com <mailto:r.nerattini@gmail.com>> Thank you very much for the help! I'll do it immediately. All the best Rachele Nerattini 2012/7/1 Matthias Troyer <troyer@phys.ethz.ch <mailto:troyer@phys.ethz.ch>> It is explained here: http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running Best regards Matthias Troyer On Jul 1, 2012, at 12:18 PM, Rachele Nerattini wrote:
Dear Mr.Troyer, I'm using Monte Carlo simulations for classical O(n) spin models. To be more precise I'm using the spinmc algorithm for Ising, XY and Heisenberg models. Thank you for the help, all the best Rachele Nerattini 2012/6/28 Matthias Troyer <troyer@phys.ethz.ch <mailto:troyer@phys.ethz.ch>> Dear Rachele Nerattini, Are you using Monte Carlo simulations or one of the other codes? With best regards Matthias Troyer On 28 Jun 2012, at 16:59, Rachele Nerattini wrote: > Dear Mr.Troyer, > > I'm running some simulations using ALPS at the CINECA cluster in Bologna. I will have to run really long simulations which go well beyond the walltime limit of the machine. > > To do that I have to divide the whole run in several subsections and then run all the processes in cascade. > > Can you tell me how can I do that with ALPS? Which are the commands of stop/restart that I have to use? > > Thank you for your help, > > Rachele Nerattini
Dear Evgeni and Carlo,
thank you very much for your answers.
Naively I thought that if I run a Monte Carlo simulation on several processors (let's say 4 processors), the time needed to the simulation to finish should be much less (let's say around 4 times less) then the time nedeed by the same simulation on 1 processor.
This means that if I want to simulate the Ising model on a cubic lattice of edge 8, the simulation will take ~200 seconds to finish on 1 processor ~100 seconds to finish on 2 processors ~50 seconds to finish on 4 processors and so on...
I see instead, and you confirm my suspicious, that I can only improve the statistical error on the results but not the running time.
Thank you very much for your help. I whish you all the best, Rachele
2012/9/19 Giuseppe Carleo giuscarl@gmail.com
Dear Rachele,
if I understand correctly your situation, the fact that each simulation on 2,4,8,12.. processors takes exactly the same computational time means that the total number of Monte Carlo iterations on each processor is always the same. In other words, on each processor you make a certain number of iterations which is **independent** on the total number of processors.
The advantage of using more processors is that the statistical error you will have with say 8 processors should be about a factor 2 smaller than the statistical error you have when running with 2 processor.
You might verify if this is the case.
Regards,
Giuseppe
Dear Mr Troyer,
sorry if I write again is only that I didn't hear anything from you and I'm not sure you received my mail. I have to run MC simulations for classical O(n) spin model in parallel.
I used the command
mpirun -np 4 spinmc --mpi --Tmin 300 --time-limit 2400 --write-xml Ising3DL32mpiprocs4.out.xml
to mean that I want to run it on 4 processors. The simulation goes fine and in the end I have these output files:
Ising3DL32mpiprocs4.out.xml Ising3DL32mpiprocs4.task1.out.run1.xml Ising3DL32mpiprocs4.task1.out.run2.xml Ising3DL32mpiprocs4.task1.out.run3.xml Ising3DL32mpiprocs4.task1.out.run4.xml
more other files. I am a bit surprised since in every file Ising3DL32mpiprocs4.task1.out.run*.xml It looks like I have a separate simulation of the same model and it doesn't seems like that the whole simulation (the one generated by the file Ising3DL32mpiprocs4.in.xml) is being partitioned in 4 parts.
In fact the simulation takes exactly the same time if I run it on 2, 4, 8, 12 .... processors. I don't have any gain in time with the parallelization of the program.
Why? Do I missing any flags in the command above or is the program really written for parallelization?
Thank you very much for the help.
Waiting for your answer, all the best
Rachele Nerattini
I have to run very long simulations of classical O(n) model in three spatial dimensions. In particular I study the Ising model, the XY model, the Heisenberg model and the O(4) model at the critical value of the temperature. To gain time I wanted to run the simulations in parallel.
An example of the input file I used is:
============================
LATTICE="simple cubic lattice" LATTICE_LIBRARY="lattices.xml" T=4.511441614 J=1 THERMALIZATION=200000 SWEEPS=1000000 UPDATE="cluster" MODEL="Ising" {L=32;} ============================
And the command I used to run the simulation on 4 processors is
mpirun -np 4 spinmc --mpi --Tmin 300 --time-limit 2400 --write-xml Ising3DL32mpiprocs4.out.xml (1)
To run the same simulation in a serial manner I use the command
spinmc --Tmin 300 --time-limit 2400 --write-xml Ising3DL32serial.out.xml (2)
In both cases the simulation runs properly BUT I the gain, in terms of time, of the parallel run with respect to the serial run is almost zero. This is true independentely on the number of processors that I used (2,4,8,12).
Am I doing some mistakes in the command line (1) ? Am I missing any flags or something like that? Or the parallelization of the program is done only at a compliler level (In the sense that the program spinmc can run on different processors but as a matter of fact it is not really optimized in this sense...)?
Thank you for your attention and for your answer.
With best regards,
Rachele
2012/7/1 Rachele Nerattini r.nerattini@gmail.com
Thank you again for the quick and precise help.
2012/7/1 Rachele Nerattini r.nerattini@gmail.com
ok, I'll try to run it on CINECA and I'll tell you if it works.
2012/7/1 Matthias Troyer troyer@phys.ethz.ch
On 1 Jul 2012, at 15:25, Rachele Nerattini wrote:
Thank you all very much! Yes, I think this could help. I'll send your mail to the CINECA-help-desk so that they will tell me if this is all we need and how to concatenate jobs.
In any case, if I understand well, all I have to do is:
Nearly
0)use parameter2xml to generate the file .*.in.xml;
- to run the first block inserting the flag ' --time-limit #sec ' in
the command line wich tells the program to stop after #sec seconds;
- to run the second block using again the flag ' --time-limit #sec '
in the command line and the file .out.xml as input file;
- to go on with this till the end of the simulations.
Yes
Is that ok? For what concerns the walltime limit I think it is 24 hours (24:00:00)...
24 ho0urs will be 86400 seconds, but the code will need time to write the checkpoints, thus specify about 1000 seconds less to be on the safe side.
Thnak you again I'll let you know if everything works. Bye for now Rachele
2012/7/1 Fabien Alet alet@irsamc.ups-tlse.fr
Dear Rachele,
if I understood correctly, what you need to do is to : 0) run for 10 seconds or so your job locally on the main server such that file Ising3DL10mpiprocs10.out.xml gets generated (e.g. something like spinmc --time-limit 10 --write-xml Ising3DL10mpiprocs10.in.xml, alternatively just stop the job with CTRL-C)
- add the time limit of 2.4 hours in the command line where you
execute your observable, such as e.g. mpirun -np 10 spinmc --mpi --Tmin 100 --time-limit 9000 --write-xml Ising3DL10mpiprocs10.out.xml [actually you should give slightly less than 2.4 hours such that files have the time to be written to disk, this is why I used 9000 seconds]
Remark that I used .out.xml , and not .in.xml such that your script really continues your ongoing jobs, and does not restart from scratch every time.
I hope this can help, Best Fabien
Le 1 juil. 2012 à 14:40, Rachele Nerattini a écrit :
Dear Mr. Troyer,
I read the page you suggested me but I still don't understand. It says how to restart a simulation stopped because the computer shut down or how to make it stop before its natural end in case you achieved the required error but I don't understad how to stop it in a controlled way.
For istance, let's suppose I have to run a simulation which is 24 hours long. I want to divide the long run in 10 runs of 2.4 hours each. The output of the first run must be the input of the following and I want to do all the runs in cascade.
What do I have to write in the input file to do that? Sorry but I didn't find it in the page
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
certeinly because I'm not an expert in these kind of things.
I copy and paste here in the following an example of input file I've wrote for the CINECA and an example of script I had to write to run a tet job.... Can you tell me what I have to change to make it stop after a certain numeber of seconds? Then I'll ask to CINECA assistence how to make all the block run in cascade.
Thank you and all the best,
Rachele Nerattini
input file = Ising3DL10mpiprocs10
LATTICE="simple cubic lattice" LATTICE_LIBRARY="lattices.xml" T=4.511441614 J=1 THERMALIZATION=200000 SWEEPS=1000000 UPDATE="cluster" MODEL="Ising" {L=10;}
script = Ising3DL10mpiprocs10.sh
#!/bin/bash #PBS -A name_of_the_project #PBS -l walltime=1:00:00 #PBS -l select=1:ncpus=10:mpiprocs=10:mem=40GB #PBS -q parallel #PBS -o Ising3DL10mpiprocs10.out #PBS -e Ising3DL10mpiprocs10.err # put the executable in the PATH module load autoload alps # cd in the directory where you have input e job.sh cd $PBS_O_WORKDIR # prep gli input parameter2xml Ising3DL10mpiprocs10
# it mounts openmpi to have mpirun in the PATH
module load profile/advanced openmpi/1.4.4--intel--co-2011.6.233--binary
mpirun -np 10 spinmc --mpi --Tmin 100 --write-xml Ising3DL10mpiprocs10.in.xml
qsub Ising3DL10mpiprocs10.sh
What do I have to add to have what I need?
Thank you again for the help,
I whish you all the best
Rachele Nerattini
2012/7/1 Rachele Nerattini r.nerattini@gmail.com
> Thank you very much for the help! I'll do it immediately. > All the best > Rachele Nerattini > > > 2012/7/1 Matthias Troyer troyer@phys.ethz.ch > >> It is explained here: >> >> >> http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running >> >> Best regards >> >> Matthias Troyer >> >> On Jul 1, 2012, at 12:18 PM, Rachele Nerattini wrote: >> >> Dear Mr.Troyer, >> >> I'm using Monte Carlo simulations for classical O(n) spin models. >> To be more precise I'm using the spinmc algorithm for Ising, XY and >> Heisenberg models. >> >> Thank you for the help, >> >> all the best >> >> Rachele Nerattini >> >> >> 2012/6/28 Matthias Troyer troyer@phys.ethz.ch >> >>> Dear Rachele Nerattini, >>> >>> Are you using Monte Carlo simulations or one of the other codes? >>> >>> With best regards >>> >>> Matthias Troyer >>> >>> On 28 Jun 2012, at 16:59, Rachele Nerattini wrote: >>> >>> > Dear Mr.Troyer, >>> > >>> > I'm running some simulations using ALPS at the CINECA cluster in >>> Bologna. I will have to run really long simulations which go well beyond >>> the walltime limit of the machine. >>> > >>> > To do that I have to divide the whole run in several subsections >>> and then run all the processes in cascade. >>> > >>> > Can you tell me how can I do that with ALPS? Which are the >>> commands of stop/restart that I have to use? >>> > >>> > Thank you for your help, >>> > >>> > Rachele Nerattini >>> >>> >> >> >
Dear Rachele,
actually you should reason in terms of the statistical error you want to achieve for a given observable, not in terms of the running time.
Say you want an error of 1.0e-4 on the total energy, and that with 2 processors this will be achieved after 30 minutes. Now, with 8 processors, the same statistical error will be achieved after about 15 minutes (in the ideal case). So, this means that you can run your simulation for only 15 minutes instead of 30 minutes, and get the same statistical error. That's how parallelisation can greatly help in this case.
Ciao,
Giuseppe (not Carlo)
Dear Evgeni and Carlo,
thank you very much for your answers.
Naively I thought that if I run a Monte Carlo simulation on several processors (let's say 4 processors), the time needed to the simulation to finish should be much less (let's say around 4 times less) then the time nedeed by the same simulation on 1 processor.
This means that if I want to simulate the Ising model on a cubic lattice of edge 8, the simulation will take ~200 seconds to finish on 1 processor ~100 seconds to finish on 2 processors ~50 seconds to finish on 4 processors and so on...
I see instead, and you confirm my suspicious, that I can only improve the statistical error on the results but not the running time.
Thank you very much for your help. I whish you all the best, Rachele
2012/9/19 Giuseppe Carleo <giuscarl@gmail.com mailto:giuscarl@gmail.com>
Dear Rachele, if I understand correctly your situation, the fact that each simulation on 2,4,8,12.. processors takes exactly the same computational time means that the total number of Monte Carlo iterations on each processor is always the same. In other words, on each processor you make a certain number of iterations which is **independent** on the total number of processors. The advantage of using more processors is that the statistical error you will have with say 8 processors should be about a factor 2 smaller than the statistical error you have when running with 2 processor. You might verify if this is the case. Regards, Giuseppe
Dear Mr Troyer, sorry if I write again is only that I didn't hear anything from you and I'm not sure you received my mail. I have to run MC simulations for classical O(n) spin model in parallel. I used the command mpirun -np 4 spinmc --mpi --Tmin 300 --time-limit 2400 --write-xml Ising3DL32mpiprocs4.out.xml to mean that I want to run it on 4 processors. The simulation goes fine and in the end I have these output files: Ising3DL32mpiprocs4.out.xml Ising3DL32mpiprocs4.task1.out.run1.xml Ising3DL32mpiprocs4.task1.out.run2.xml Ising3DL32mpiprocs4.task1.out.run3.xml Ising3DL32mpiprocs4.task1.out.run4.xml more other files. I am a bit surprised since in every file Ising3DL32mpiprocs4.task1.out.run*.xml It looks like I have a separate simulation of the same model and it doesn't seems like that the whole simulation (the one generated by the file Ising3DL32mpiprocs4.in.xml) is being partitioned in 4 parts. In fact the simulation takes exactly the same time if I run it on 2, 4, 8, 12 .... processors. I don't have any gain in time with the parallelization of the program. Why? Do I missing any flags in the command above or is the program really written for parallelization? Thank you very much for the help. Waiting for your answer, all the best Rachele Nerattini I have to run very long simulations of classical O(n) model in three spatial dimensions. In particular I study the Ising model, the XY model, the Heisenberg model and the O(4) model at the critical value of the temperature. To gain time I wanted to run the simulations in parallel. An example of the input file I used is: ============================ LATTICE="simple cubic lattice" LATTICE_LIBRARY="lattices.xml" T=4.511441614 J=1 THERMALIZATION=200000 SWEEPS=1000000 UPDATE="cluster" MODEL="Ising" {L=32;} ============================ And the command I used to run the simulation on 4 processors is mpirun -np 4 spinmc --mpi --Tmin 300 --time-limit 2400 --write-xml Ising3DL32mpiprocs4.out.xml (1) ------------------------------------------------------------------------------------------- To run the same simulation in a serial manner I use the command spinmc --Tmin 300 --time-limit 2400 --write-xml Ising3DL32serial.out.xml (2) -------------------------------------------------------------------------------------------- In both cases the simulation runs properly BUT I the gain, in terms of time, of the parallel run with respect to the serial run is almost zero. This is true independentely on the number of processors that I used (2,4,8,12). Am I doing some mistakes in the command line (1) ? Am I missing any flags or something like that? Or the parallelization of the program is done only at a compliler level (In the sense that the program spinmc can run on different processors but as a matter of fact it is not really optimized in this sense...)? Thank you for your attention and for your answer. With best regards, Rachele 2012/7/1 Rachele Nerattini <r.nerattini@gmail.com <mailto:r.nerattini@gmail.com>> Thank you again for the quick and precise help. 2012/7/1 Rachele Nerattini <r.nerattini@gmail.com <mailto:r.nerattini@gmail.com>> ok, I'll try to run it on CINECA and I'll tell you if it works. 2012/7/1 Matthias Troyer <troyer@phys.ethz.ch <mailto:troyer@phys.ethz.ch>> On 1 Jul 2012, at 15:25, Rachele Nerattini wrote:
Thank you all very much! Yes, I think this could help. I'll send your mail to the CINECA-help-desk so that they will tell me if this is all we need and how to concatenate jobs. In any case, if I understand well, all I have to do is:
Nearly
0)use parameter2xml to generate the file .*.in.xml;
1) to run the first block inserting the flag ' --time-limit #sec ' in the command line wich tells the program to stop after #sec seconds;
2) to run the second block using again the flag ' --time-limit #sec ' in the command line and the file .out.xml as input file; 3) to go on with this till the end of the simulations.
Yes
Is that ok? For what concerns the walltime limit I think it is 24 hours (24:00:00)...
24 ho0urs will be 86400 seconds, but the code will need time to write the checkpoints, thus specify about 1000 seconds less to be on the safe side.
Thnak you again I'll let you know if everything works. Bye for now Rachele
2012/7/1 Fabien Alet <alet@irsamc.ups-tlse.fr <mailto:alet@irsamc.ups-tlse.fr>> Dear Rachele, if I understood correctly, what you need to do is to : 0) run for 10 seconds or so your job locally on the main server such that file Ising3DL10mpiprocs10.out.xml gets generated (e.g. something like spinmc --time-limit 10 --write-xml Ising3DL10mpiprocs10.in.xml, alternatively just stop the job with CTRL-C) 1) add the time limit of 2.4 hours in the command line where you execute your observable, such as e.g. mpirun -np 10 spinmc --mpi --Tmin 100 --time-limit 9000 --write-xml Ising3DL10mpiprocs10.out.xml [actually you should give slightly less than 2.4 hours such that files have the time to be written to disk, this is why I used 9000 seconds] Remark that I used .out.xml , and not .in.xml such that your script really continues your ongoing jobs, and does not restart from scratch every time. I hope this can help, Best Fabien Le 1 juil. 2012 à 14:40, Rachele Nerattini a écrit :
Dear Mr. Troyer, I read the page you suggested me but I still don't understand. It says how to restart a simulation stopped because the computer shut down or how to make it stop before its natural end in case you achieved the required error but I don't understad how to stop it in a controlled way. For istance, let's suppose I have to run a simulation which is 24 hours long. I want to divide the long run in 10 runs of 2.4 hours each. The output of the first run must be the input of the following and I want to do all the runs in cascade. What do I have to write in the input file to do that? Sorry but I didn't find it in the page http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running certeinly because I'm not an expert in these kind of things. I copy and paste here in the following an example of input file I've wrote for the CINECA and an example of script I had to write to run a tet job.... Can you tell me what I have to change to make it stop after a certain numeber of seconds? Then I'll ask to CINECA assistence how to make all the block run in cascade. Thank you and all the best, Rachele Nerattini input file = Ising3DL10mpiprocs10 LATTICE="simple cubic lattice" LATTICE_LIBRARY="lattices.xml" T=4.511441614 J=1 THERMALIZATION=200000 SWEEPS=1000000 UPDATE="cluster" MODEL="Ising" {L=10;} script = Ising3DL10mpiprocs10.sh #!/bin/bash #PBS -A name_of_the_project #PBS -l walltime=1:00:00 #PBS -l select=1:ncpus=10:mpiprocs=10:mem=40GB #PBS -q parallel #PBS -o Ising3DL10mpiprocs10.out #PBS -e Ising3DL10mpiprocs10.err # put the executable in the PATH module load autoload alps # cd in the directory where you have input e job.sh cd $PBS_O_WORKDIR # prep gli input parameter2xml Ising3DL10mpiprocs10 # it mounts openmpi to have mpirun in the PATH module load profile/advanced openmpi/1.4.4--intel--co-2011.6.233--binary mpirun -np 10 spinmc --mpi --Tmin 100 --write-xml Ising3DL10mpiprocs10.in.xml qsub Ising3DL10mpiprocs10.sh What do I have to add to have what I need? Thank you again for the help, I whish you all the best Rachele Nerattini 2012/7/1 Rachele Nerattini <r.nerattini@gmail.com <mailto:r.nerattini@gmail.com>> Thank you very much for the help! I'll do it immediately. All the best Rachele Nerattini 2012/7/1 Matthias Troyer <troyer@phys.ethz.ch <mailto:troyer@phys.ethz.ch>> It is explained here: http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running Best regards Matthias Troyer On Jul 1, 2012, at 12:18 PM, Rachele Nerattini wrote:
Dear Mr.Troyer, I'm using Monte Carlo simulations for classical O(n) spin models. To be more precise I'm using the spinmc algorithm for Ising, XY and Heisenberg models. Thank you for the help, all the best Rachele Nerattini 2012/6/28 Matthias Troyer <troyer@phys.ethz.ch <mailto:troyer@phys.ethz.ch>> Dear Rachele Nerattini, Are you using Monte Carlo simulations or one of the other codes? With best regards Matthias Troyer On 28 Jun 2012, at 16:59, Rachele Nerattini wrote: > Dear Mr.Troyer, > > I'm running some simulations using ALPS at the CINECA cluster in Bologna. I will have to run really long simulations which go well beyond the walltime limit of the machine. > > To do that I have to divide the whole run in several subsections and then run all the processes in cascade. > > Can you tell me how can I do that with ALPS? Which are the commands of stop/restart that I have to use? > > Thank you for your help, > > Rachele Nerattini
Dear Giuseppe,
ok thank you very much and sorry for the name! I made an ugly mixture with your surname and the Monte Carlo method, which is actually my nightmare!
Ciao Rachele
2012/9/19 Giuseppe Carleo giuscarl@gmail.com
Dear Rachele,
actually you should reason in terms of the statistical error you want to achieve for a given observable, not in terms of the running time.
Say you want an error of 1.0e-4 on the total energy, and that with 2 processors this will be achieved after 30 minutes. Now, with 8 processors, the same statistical error will be achieved after about 15 minutes (in the ideal case). So, this means that you can run your simulation for only 15 minutes instead of 30 minutes, and get the same statistical error. That's how parallelisation can greatly help in this case.
Ciao,
Giuseppe (not Carlo)
Dear Evgeni and Carlo,
thank you very much for your answers.
Naively I thought that if I run a Monte Carlo simulation on several processors (let's say 4 processors), the time needed to the simulation to finish should be much less (let's say around 4 times less) then the time nedeed by the same simulation on 1 processor.
This means that if I want to simulate the Ising model on a cubic lattice of edge 8, the simulation will take ~200 seconds to finish on 1 processor ~100 seconds to finish on 2 processors ~50 seconds to finish on 4 processors and so on...
I see instead, and you confirm my suspicious, that I can only improve the statistical error on the results but not the running time.
Thank you very much for your help. I whish you all the best, Rachele
2012/9/19 Giuseppe Carleo giuscarl@gmail.com
Dear Rachele,
if I understand correctly your situation, the fact that each simulation on 2,4,8,12.. processors takes exactly the same computational time means that the total number of Monte Carlo iterations on each processor is always the same. In other words, on each processor you make a certain number of iterations which is **independent** on the total number of processors.
The advantage of using more processors is that the statistical error you will have with say 8 processors should be about a factor 2 smaller than the statistical error you have when running with 2 processor.
You might verify if this is the case.
Regards,
Giuseppe
Dear Mr Troyer,
sorry if I write again is only that I didn't hear anything from you and I'm not sure you received my mail. I have to run MC simulations for classical O(n) spin model in parallel.
I used the command
mpirun -np 4 spinmc --mpi --Tmin 300 --time-limit 2400 --write-xml Ising3DL32mpiprocs4.out.xml
to mean that I want to run it on 4 processors. The simulation goes fine and in the end I have these output files:
Ising3DL32mpiprocs4.out.xml Ising3DL32mpiprocs4.task1.out.run1.xml Ising3DL32mpiprocs4.task1.out.run2.xml Ising3DL32mpiprocs4.task1.out.run3.xml Ising3DL32mpiprocs4.task1.out.run4.xml
more other files. I am a bit surprised since in every file Ising3DL32mpiprocs4.task1.out.run*.xml It looks like I have a separate simulation of the same model and it doesn't seems like that the whole simulation (the one generated by the file Ising3DL32mpiprocs4.in.xml) is being partitioned in 4 parts.
In fact the simulation takes exactly the same time if I run it on 2, 4, 8, 12 .... processors. I don't have any gain in time with the parallelization of the program.
Why? Do I missing any flags in the command above or is the program really written for parallelization?
Thank you very much for the help.
Waiting for your answer, all the best
Rachele Nerattini
I have to run very long simulations of classical O(n) model in three spatial dimensions. In particular I study the Ising model, the XY model, the Heisenberg model and the O(4) model at the critical value of the temperature. To gain time I wanted to run the simulations in parallel.
An example of the input file I used is:
============================
LATTICE="simple cubic lattice" LATTICE_LIBRARY="lattices.xml" T=4.511441614 J=1 THERMALIZATION=200000 SWEEPS=1000000 UPDATE="cluster" MODEL="Ising" {L=32;} ============================
And the command I used to run the simulation on 4 processors is
mpirun -np 4 spinmc --mpi --Tmin 300 --time-limit 2400 --write-xml Ising3DL32mpiprocs4.out.xml (1)
To run the same simulation in a serial manner I use the command
spinmc --Tmin 300 --time-limit 2400 --write-xml Ising3DL32serial.out.xml (2)
In both cases the simulation runs properly BUT I the gain, in terms of time, of the parallel run with respect to the serial run is almost zero. This is true independentely on the number of processors that I used (2,4,8,12).
Am I doing some mistakes in the command line (1) ? Am I missing any flags or something like that? Or the parallelization of the program is done only at a compliler level (In the sense that the program spinmc can run on different processors but as a matter of fact it is not really optimized in this sense...)?
Thank you for your attention and for your answer.
With best regards,
Rachele
2012/7/1 Rachele Nerattini r.nerattini@gmail.com
Thank you again for the quick and precise help.
2012/7/1 Rachele Nerattini r.nerattini@gmail.com
ok, I'll try to run it on CINECA and I'll tell you if it works.
2012/7/1 Matthias Troyer troyer@phys.ethz.ch
On 1 Jul 2012, at 15:25, Rachele Nerattini wrote:
Thank you all very much! Yes, I think this could help. I'll send your mail to the CINECA-help-desk so that they will tell me if this is all we need and how to concatenate jobs.
In any case, if I understand well, all I have to do is:
Nearly
0)use parameter2xml to generate the file .*.in.xml;
- to run the first block inserting the flag ' --time-limit #sec ' in
the command line wich tells the program to stop after #sec seconds;
- to run the second block using again the flag ' --time-limit #sec '
in the command line and the file .out.xml as input file;
- to go on with this till the end of the simulations.
Yes
Is that ok? For what concerns the walltime limit I think it is 24 hours (24:00:00)...
24 ho0urs will be 86400 seconds, but the code will need time to write the checkpoints, thus specify about 1000 seconds less to be on the safe side.
Thnak you again I'll let you know if everything works. Bye for now Rachele
2012/7/1 Fabien Alet alet@irsamc.ups-tlse.fr
> Dear Rachele, > > if I understood correctly, what you need to do is to : > 0) run for 10 seconds or so your job locally on the main server such > that file Ising3DL10mpiprocs10.out.xml gets generated > (e.g. something like spinmc --time-limit 10 --write-xml > Ising3DL10mpiprocs10.in.xml, alternatively just stop the job with CTRL-C) > > 1) add the time limit of 2.4 hours in the command line where you > execute your observable, such as e.g. > mpirun -np 10 spinmc --mpi --Tmin 100 --time-limit 9000 --write-xml > Ising3DL10mpiprocs10.out.xml > [actually you should give slightly less than 2.4 hours such that > files have the time to be written to disk, this is why I used 9000 seconds] > > Remark that I used .out.xml , and not .in.xml such that your > script really continues your ongoing jobs, and does not restart from > scratch every time. > > I hope this can help, > Best > Fabien > > Le 1 juil. 2012 à 14:40, Rachele Nerattini a écrit : > > Dear Mr. Troyer, > > I read the page you suggested me but I still don't understand. It > says how to restart a simulation stopped because the computer shut down or > how to make it stop before its natural end in case you achieved the > required error but I don't understad how to stop it in a controlled way. > > For istance, let's suppose I have to run a simulation which is 24 > hours long. > I want to divide the long run in 10 runs of 2.4 hours each. The > output of the first run must be the input of the following and I want to do > all the runs in cascade. > > What do I have to write in the input file to do that? Sorry but I > didn't find it in the page > > http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running > > certeinly because I'm not an expert in these kind of things. > > I copy and paste here in the following an example of input file I've > wrote for the CINECA and an example of script I had to write to run a tet > job.... > Can you tell me what I have to change to make it stop after a > certain numeber of seconds? Then I'll ask to CINECA assistence how to make > all the block run in cascade. > > Thank you and all the best, > > Rachele Nerattini > > input file = Ising3DL10mpiprocs10 > > LATTICE="simple cubic lattice" > LATTICE_LIBRARY="lattices.xml" > T=4.511441614 > J=1 > THERMALIZATION=200000 > SWEEPS=1000000 > UPDATE="cluster" > MODEL="Ising" > {L=10;} > > script = Ising3DL10mpiprocs10.sh > > #!/bin/bash > #PBS -A name_of_the_project > #PBS -l walltime=1:00:00 > #PBS -l select=1:ncpus=10:mpiprocs=10:mem=40GB > #PBS -q parallel > #PBS -o Ising3DL10mpiprocs10.out > #PBS -e Ising3DL10mpiprocs10.err > # put the executable in the PATH > module load autoload alps > # cd in the directory where you have input e job.sh > cd $PBS_O_WORKDIR > # prep gli input > parameter2xml Ising3DL10mpiprocs10 > > # it mounts openmpi to have mpirun in the PATH > > module load profile/advanced > openmpi/1.4.4--intel--co-2011.6.233--binary > > mpirun -np 10 spinmc --mpi --Tmin 100 --write-xml > Ising3DL10mpiprocs10.in.xml > > qsub Ising3DL10mpiprocs10.sh > > What do I have to add to have what I need? > > Thank you again for the help, > > I whish you all the best > > Rachele Nerattini > > > 2012/7/1 Rachele Nerattini r.nerattini@gmail.com > >> Thank you very much for the help! I'll do it immediately. >> All the best >> Rachele Nerattini >> >> >> 2012/7/1 Matthias Troyer troyer@phys.ethz.ch >> >>> It is explained here: >>> >>> >>> http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running >>> >>> Best regards >>> >>> Matthias Troyer >>> >>> On Jul 1, 2012, at 12:18 PM, Rachele Nerattini wrote: >>> >>> Dear Mr.Troyer, >>> >>> I'm using Monte Carlo simulations for classical O(n) spin models. >>> To be more precise I'm using the spinmc algorithm for Ising, XY and >>> Heisenberg models. >>> >>> Thank you for the help, >>> >>> all the best >>> >>> Rachele Nerattini >>> >>> >>> 2012/6/28 Matthias Troyer troyer@phys.ethz.ch >>> >>>> Dear Rachele Nerattini, >>>> >>>> Are you using Monte Carlo simulations or one of the other codes? >>>> >>>> With best regards >>>> >>>> Matthias Troyer >>>> >>>> On 28 Jun 2012, at 16:59, Rachele Nerattini wrote: >>>> >>>> > Dear Mr.Troyer, >>>> > >>>> > I'm running some simulations using ALPS at the CINECA cluster >>>> in Bologna. I will have to run really long simulations which go well beyond >>>> the walltime limit of the machine. >>>> > >>>> > To do that I have to divide the whole run in several >>>> subsections and then run all the processes in cascade. >>>> > >>>> > Can you tell me how can I do that with ALPS? Which are the >>>> commands of stop/restart that I have to use? >>>> > >>>> > Thank you for your help, >>>> > >>>> > Rachele Nerattini >>>> >>>> >>> >>> >> > >
Hi Rachele Nerattini,
Is the time it takes 40 minutes? If so, probably the simulation is not finished yet and just stops after the time limit you have specified. Or is it 5 minutes? In that case the reason is that you told it to run for at least 5 minutes even if is already finished.
Matthias Troyer
On Sep 19, 2012, at 6:57 AM, Rachele Nerattini r.nerattini@gmail.com wrote:
Dear Mr Troyer,
sorry if I write again is only that I didn't hear anything from you and I'm not sure you received my mail. I have to run MC simulations for classical O(n) spin model in parallel.
I used the command
mpirun -np 4 spinmc --mpi --Tmin 300 --time-limit 2400 --write-xml Ising3DL32mpiprocs4.out.xml
to mean that I want to run it on 4 processors. The simulation goes fine and in the end I have these output files:
Ising3DL32mpiprocs4.out.xml Ising3DL32mpiprocs4.task1.out.run1.xml Ising3DL32mpiprocs4.task1.out.run2.xml Ising3DL32mpiprocs4.task1.out.run3.xml Ising3DL32mpiprocs4.task1.out.run4.xml
more other files. I am a bit surprised since in every file Ising3DL32mpiprocs4.task1.out.run*.xml It looks like I have a separate simulation of the same model and it doesn't seems like that the whole simulation (the one generated by the file Ising3DL32mpiprocs4.in.xml) is being partitioned in 4 parts.
In fact the simulation takes exactly the same time if I run it on 2, 4, 8, 12 .... processors. I don't have any gain in time with the parallelization of the program.
Why? Do I missing any flags in the command above or is the program really written for parallelization?
Thank you very much for the help.
Waiting for your answer, all the best
Rachele Nerattini
I have to run very long simulations of classical O(n) model in three spatial dimensions. In particular I study the Ising model, the XY model, the Heisenberg model and the O(4) model at the critical value of the temperature. To gain time I wanted to run the simulations in parallel.
An example of the input file I used is:
============================
LATTICE="simple cubic lattice" LATTICE_LIBRARY="lattices.xml" T=4.511441614 J=1 THERMALIZATION=200000 SWEEPS=1000000 UPDATE="cluster" MODEL="Ising" {L=32;} ============================
And the command I used to run the simulation on 4 processors is
mpirun -np 4 spinmc --mpi --Tmin 300 --time-limit 2400 --write-xml Ising3DL32mpiprocs4.out.xml (1)
To run the same simulation in a serial manner I use the command
spinmc --Tmin 300 --time-limit 2400 --write-xml Ising3DL32serial.out.xml (2)
In both cases the simulation runs properly BUT I the gain, in terms of time, of the parallel run with respect to the serial run is almost zero. This is true independentely on the number of processors that I used (2,4,8,12).
Am I doing some mistakes in the command line (1) ? Am I missing any flags or something like that? Or the parallelization of the program is done only at a compliler level (In the sense that the program spinmc can run on different processors but as a matter of fact it is not really optimized in this sense...)?
Thank you for your attention and for your answer.
With best regards,
Rachele
2012/7/1 Rachele Nerattini r.nerattini@gmail.com Thank you again for the quick and precise help.
2012/7/1 Rachele Nerattini r.nerattini@gmail.com ok, I'll try to run it on CINECA and I'll tell you if it works.
2012/7/1 Matthias Troyer troyer@phys.ethz.ch
On 1 Jul 2012, at 15:25, Rachele Nerattini wrote:
Thank you all very much! Yes, I think this could help. I'll send your mail to the CINECA-help-desk so that they will tell me if this is all we need and how to concatenate jobs.
In any case, if I understand well, all I have to do is:
Nearly
0)use parameter2xml to generate the file .*.in.xml;
- to run the first block inserting the flag ' --time-limit #sec ' in the command line wich tells the program to stop after #sec seconds;
to run the second block using again the flag ' --time-limit #sec ' in the command line and the file .out.xml as input file;
to go on with this till the end of the simulations.
Yes
Is that ok? For what concerns the walltime limit I think it is 24 hours (24:00:00)...
24 ho0urs will be 86400 seconds, but the code will need time to write the checkpoints, thus specify about 1000 seconds less to be on the safe side.
Thnak you again I'll let you know if everything works. Bye for now Rachele
2012/7/1 Fabien Alet alet@irsamc.ups-tlse.fr Dear Rachele,
if I understood correctly, what you need to do is to : 0) run for 10 seconds or so your job locally on the main server such that file Ising3DL10mpiprocs10.out.xml gets generated (e.g. something like spinmc --time-limit 10 --write-xml Ising3DL10mpiprocs10.in.xml, alternatively just stop the job with CTRL-C)
- add the time limit of 2.4 hours in the command line where you execute your observable, such as e.g.
mpirun -np 10 spinmc --mpi --Tmin 100 --time-limit 9000 --write-xml Ising3DL10mpiprocs10.out.xml [actually you should give slightly less than 2.4 hours such that files have the time to be written to disk, this is why I used 9000 seconds]
Remark that I used .out.xml , and not .in.xml such that your script really continues your ongoing jobs, and does not restart from scratch every time.
I hope this can help, Best Fabien
Le 1 juil. 2012 à 14:40, Rachele Nerattini a écrit :
Dear Mr. Troyer,
I read the page you suggested me but I still don't understand. It says how to restart a simulation stopped because the computer shut down or how to make it stop before its natural end in case you achieved the required error but I don't understad how to stop it in a controlled way.
For istance, let's suppose I have to run a simulation which is 24 hours long. I want to divide the long run in 10 runs of 2.4 hours each. The output of the first run must be the input of the following and I want to do all the runs in cascade.
What do I have to write in the input file to do that? Sorry but I didn't find it in the page
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
certeinly because I'm not an expert in these kind of things.
I copy and paste here in the following an example of input file I've wrote for the CINECA and an example of script I had to write to run a tet job.... Can you tell me what I have to change to make it stop after a certain numeber of seconds? Then I'll ask to CINECA assistence how to make all the block run in cascade.
Thank you and all the best,
Rachele Nerattini
input file = Ising3DL10mpiprocs10
LATTICE="simple cubic lattice" LATTICE_LIBRARY="lattices.xml" T=4.511441614 J=1 THERMALIZATION=200000 SWEEPS=1000000 UPDATE="cluster" MODEL="Ising" {L=10;}
script = Ising3DL10mpiprocs10.sh
#!/bin/bash #PBS -A name_of_the_project #PBS -l walltime=1:00:00 #PBS -l select=1:ncpus=10:mpiprocs=10:mem=40GB #PBS -q parallel #PBS -o Ising3DL10mpiprocs10.out #PBS -e Ising3DL10mpiprocs10.err # put the executable in the PATH module load autoload alps # cd in the directory where you have input e job.sh cd $PBS_O_WORKDIR # prep gli input parameter2xml Ising3DL10mpiprocs10
# it mounts openmpi to have mpirun in the PATH
module load profile/advanced openmpi/1.4.4--intel--co-2011.6.233--binary
mpirun -np 10 spinmc --mpi --Tmin 100 --write-xml Ising3DL10mpiprocs10.in.xml
qsub Ising3DL10mpiprocs10.sh
What do I have to add to have what I need?
Thank you again for the help,
I whish you all the best
Rachele Nerattini
2012/7/1 Rachele Nerattini r.nerattini@gmail.com Thank you very much for the help! I'll do it immediately. All the best Rachele Nerattini
2012/7/1 Matthias Troyer troyer@phys.ethz.ch It is explained here:
http://alps.comp-phys.org/mediawiki/index.php/Documentation:Running
Best regards
Matthias Troyer
On Jul 1, 2012, at 12:18 PM, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm using Monte Carlo simulations for classical O(n) spin models. To be more precise I'm using the spinmc algorithm for Ising, XY and Heisenberg models.
Thank you for the help,
all the best
Rachele Nerattini
2012/6/28 Matthias Troyer troyer@phys.ethz.ch Dear Rachele Nerattini,
Are you using Monte Carlo simulations or one of the other codes?
With best regards
Matthias Troyer
On 28 Jun 2012, at 16:59, Rachele Nerattini wrote:
Dear Mr.Troyer,
I'm running some simulations using ALPS at the CINECA cluster in Bologna. I will have to run really long simulations which go well beyond the walltime limit of the machine.
To do that I have to divide the whole run in several subsections and then run all the processes in cascade.
Can you tell me how can I do that with ALPS? Which are the commands of stop/restart that I have to use?
Thank you for your help,
Rachele Nerattini
comp-phys-alps-users@lists.phys.ethz.ch