Dear All I am using Worm to make some easy simulation with RESTRICT_MEASUREMENTS[N]=30
I understand that:
If I set up the chemical potential correctly, then the MC algorithm encounters enough trajectories with N=30 and the output files contain resuls averagen only over trajectories with N=30 - approximation of the canonical ensemble.
This is confirmed by user-experience and my weak recollecion of advide I have received here about oen year ago.
But if I set the chemical potential wrongly then the average number of particles from the Grand canonical point of view is for example 45, and there are not enough (maybe even 0) trajectories to sample with N=30.
In this case the output files contain somethink that makes the following python "result getter":
********************** get.py *********************** import pyalps import sys
rf=pyalps.getResultFiles(prefix=sys.argv[1]) data = pyalps.loadMeasurements(rf) obl=pyalps.loadObservableList(rf)
*******************************************************
behave rude: it says Floating point exception. and quits (even if only one of let say 500 output files is corrupt).
Of course adjusting the chemical pontential is the key, but this seems to be complicated in a case where the phase diagram is complicated (I would have to do some form of extrapolation or binary search to get the right mu). On the other hand I see no other way to solve it.
Another way to deal with that is to generate input files containing only one set of input parameters - this way each datapoint has its own prefix. It is not complicated, but somehow contrary to the idea behind the current format of the input data. Morover it is likely to make a bookkeeping mess.
I have two questions: 1. is there a way to read these "faulty", "undersampled" ouput files without "Floating point exception." (I could then set up calculations for let say 10 different values of mu an choose mu that gave the closes answer - the simplest to code). 2. is there some easy way to make the MC autoadjust the chemical potential ?
Regards, Mateusz Lacki
Why don't you try to load each file separately and catch exceptions?
On Dec 21, 2012, at 3:08 PM, Mateusz Łącki mateusz.lacki@gmail.com wrote:
Dear All I am using Worm to make some easy simulation with RESTRICT_MEASUREMENTS[N]=30
I understand that:
If I set up the chemical potential correctly, then the MC algorithm encounters enough trajectories with N=30 and the output files contain resuls averagen only over trajectories with N=30 - approximation of the canonical ensemble.
This is confirmed by user-experience and my weak recollecion of advide I have received here about oen year ago.
But if I set the chemical potential wrongly then the average number of particles from the Grand canonical point of view is for example 45, and there are not enough (maybe even 0) trajectories to sample with N=30.
In this case the output files contain somethink that makes the following python "result getter":
********************** get.py *********************** import pyalps import sys
rf=pyalps.getResultFiles(prefix=sys.argv[1]) data = pyalps.loadMeasurements(rf) obl=pyalps.loadObservableList(rf)
behave rude: it says Floating point exception. and quits (even if only one of let say 500 output files is corrupt).
Of course adjusting the chemical pontential is the key, but this seems to be complicated in a case where the phase diagram is complicated (I would have to do some form of extrapolation or binary search to get the right mu). On the other hand I see no other way to solve it.
Another way to deal with that is to generate input files containing only one set of input parameters - this way each datapoint has its own prefix. It is not complicated, but somehow contrary to the idea behind the current format of the input data. Morover it is likely to make a bookkeeping mess.
I have two questions:
- is there a way to read these "faulty", "undersampled" ouput files without "Floating point exception." (I could then set up calculations for let say 10 different values of mu an choose mu that gave the closes answer - the simplest to code).
- is there some easy way to make the MC autoadjust the chemical potential ?
Regards, Mateusz Lacki
A. Ok. Right. Thank you very much.
Regards, Mateusz Lacki
2012/12/21 Matthias Troyer troyer@phys.ethz.ch
Why don't you try to load each file separately and catch exceptions?
On Dec 21, 2012, at 3:08 PM, Mateusz Łącki mateusz.lacki@gmail.com wrote:
Dear All I am using Worm to make some easy simulation with RESTRICT_MEASUREMENTS[N]=30
I understand that:
If I set up the chemical potential correctly, then the MC algorithm
encounters enough trajectories with N=30 and
the output files contain resuls averagen only over trajectories with
N=30 - approximation of the canonical ensemble.
This is confirmed by user-experience and my weak recollecion of advide I
have received here about oen year ago.
But if I set the chemical potential wrongly then the average number of
particles from the Grand canonical point of view is for example 45, and there are not enough (maybe even 0) trajectories to sample with N=30.
In this case the output files contain somethink that makes the following
python "result getter":
********************** get.py *********************** import pyalps import sys
rf=pyalps.getResultFiles(prefix=sys.argv[1]) data = pyalps.loadMeasurements(rf) obl=pyalps.loadObservableList(rf)
behave rude: it says Floating point exception. and quits (even if only
one of let say 500 output files is corrupt).
Of course adjusting the chemical pontential is the key, but this seems
to be complicated in a case where the phase diagram is complicated (I would have to
do some form of extrapolation or binary search to get the right mu). On
the other hand I see no other way to solve it.
Another way to deal with that is to generate input files containing only
one set of input parameters - this way each datapoint has its own prefix. It is not complicated, but somehow contrary to the idea behind the current format of the input data. Morover it is likely to make a bookkeeping mess.
I have two questions:
- is there a way to read these "faulty", "undersampled" ouput files
without "Floating point exception." (I could then set up calculations for let say 10 different values of mu an choose mu that gave the closes answer
- the simplest to code).
- is there some easy way to make the MC autoadjust the chemical
potential ?
Regards, Mateusz Lacki
As for my second question : is there a nicer way of choosing the chemical potential. Except for doing binary search on function that prepares input for small worm calculation, performs it and reads out the input files?
Regards, Mateusz Lacki
2012/12/21 Mateusz Łącki mateusz.lacki@gmail.com
A. Ok. Right. Thank you very much.
Regards, Mateusz Lacki
2012/12/21 Matthias Troyer troyer@phys.ethz.ch
Why don't you try to load each file separately and catch exceptions?
On Dec 21, 2012, at 3:08 PM, Mateusz Łącki mateusz.lacki@gmail.com wrote:
Dear All I am using Worm to make some easy simulation with RESTRICT_MEASUREMENTS[N]=30
I understand that:
If I set up the chemical potential correctly, then the MC algorithm
encounters enough trajectories with N=30 and
the output files contain resuls averagen only over trajectories with
N=30 - approximation of the canonical ensemble.
This is confirmed by user-experience and my weak recollecion of advide
I have received here about oen year ago.
But if I set the chemical potential wrongly then the average number of
particles from the Grand canonical point of view is for example 45, and there are not enough (maybe even 0) trajectories to sample with N=30.
In this case the output files contain somethink that makes the
following python "result getter":
********************** get.py *********************** import pyalps import sys
rf=pyalps.getResultFiles(prefix=sys.argv[1]) data = pyalps.loadMeasurements(rf) obl=pyalps.loadObservableList(rf)
behave rude: it says Floating point exception. and quits (even if only
one of let say 500 output files is corrupt).
Of course adjusting the chemical pontential is the key, but this seems
to be complicated in a case where the phase diagram is complicated (I would have to
do some form of extrapolation or binary search to get the right mu). On
the other hand I see no other way to solve it.
Another way to deal with that is to generate input files containing
only one set of input parameters - this way each datapoint has its own prefix. It is not complicated, but somehow contrary to the idea behind the current format of the input data. Morover it is likely to make a bookkeeping mess.
I have two questions:
- is there a way to read these "faulty", "undersampled" ouput files
without "Floating point exception." (I could then set up calculations for let say 10 different values of mu an choose mu that gave the closes answer
- the simplest to code).
- is there some easy way to make the MC autoadjust the chemical
potential ?
Regards, Mateusz Lacki
One could change the code and during thermalization adapt the chemical potential until one gets to the right range. This feature might be added to the new worm code.
Matthias
On Dec 21, 2012, at 3:35 PM, Mateusz Łącki mateusz.lacki@gmail.com wrote:
As for my second question : is there a nicer way of choosing the chemical potential. Except for doing binary search on function that prepares input for small worm calculation, performs it and reads out the input files?
Regards, Mateusz Lacki
2012/12/21 Mateusz Łącki mateusz.lacki@gmail.com A. Ok. Right. Thank you very much.
Regards, Mateusz Lacki
2012/12/21 Matthias Troyer troyer@phys.ethz.ch Why don't you try to load each file separately and catch exceptions?
On Dec 21, 2012, at 3:08 PM, Mateusz Łącki mateusz.lacki@gmail.com wrote:
Dear All I am using Worm to make some easy simulation with RESTRICT_MEASUREMENTS[N]=30
I understand that:
If I set up the chemical potential correctly, then the MC algorithm encounters enough trajectories with N=30 and the output files contain resuls averagen only over trajectories with N=30 - approximation of the canonical ensemble.
This is confirmed by user-experience and my weak recollecion of advide I have received here about oen year ago.
But if I set the chemical potential wrongly then the average number of particles from the Grand canonical point of view is for example 45, and there are not enough (maybe even 0) trajectories to sample with N=30.
In this case the output files contain somethink that makes the following python "result getter":
********************** get.py *********************** import pyalps import sys
rf=pyalps.getResultFiles(prefix=sys.argv[1]) data = pyalps.loadMeasurements(rf) obl=pyalps.loadObservableList(rf)
behave rude: it says Floating point exception. and quits (even if only one of let say 500 output files is corrupt).
Of course adjusting the chemical pontential is the key, but this seems to be complicated in a case where the phase diagram is complicated (I would have to do some form of extrapolation or binary search to get the right mu). On the other hand I see no other way to solve it.
Another way to deal with that is to generate input files containing only one set of input parameters - this way each datapoint has its own prefix. It is not complicated, but somehow contrary to the idea behind the current format of the input data. Morover it is likely to make a bookkeeping mess.
I have two questions:
- is there a way to read these "faulty", "undersampled" ouput files without "Floating point exception." (I could then set up calculations for let say 10 different values of mu an choose mu that gave the closes answer - the simplest to code).
- is there some easy way to make the MC autoadjust the chemical potential ?
Regards, Mateusz Lacki
Just to be sure: it is not possible to do it without fpectl module (which requires python recompilation)?
Le Dec 21, 2012 à 3:16 PM, Matthias Troyer a écrit :
Why don't you try to load each file separately and catch exceptions?
On Dec 21, 2012, at 3:08 PM, Mateusz Łącki mateusz.lacki@gmail.com wrote:
Dear All I am using Worm to make some easy simulation with RESTRICT_MEASUREMENTS[N]=30
I understand that:
If I set up the chemical potential correctly, then the MC algorithm encounters enough trajectories with N=30 and the output files contain resuls averagen only over trajectories with N=30 - approximation of the canonical ensemble.
This is confirmed by user-experience and my weak recollecion of advide I have received here about oen year ago.
But if I set the chemical potential wrongly then the average number of particles from the Grand canonical point of view is for example 45, and there are not enough (maybe even 0) trajectories to sample with N=30.
In this case the output files contain somethink that makes the following python "result getter":
********************** get.py *********************** import pyalps import sys
rf=pyalps.getResultFiles(prefix=sys.argv[1]) data = pyalps.loadMeasurements(rf) obl=pyalps.loadObservableList(rf)
behave rude: it says Floating point exception. and quits (even if only one of let say 500 output files is corrupt).
Of course adjusting the chemical pontential is the key, but this seems to be complicated in a case where the phase diagram is complicated (I would have to do some form of extrapolation or binary search to get the right mu). On the other hand I see no other way to solve it.
Another way to deal with that is to generate input files containing only one set of input parameters - this way each datapoint has its own prefix. It is not complicated, but somehow contrary to the idea behind the current format of the input data. Morover it is likely to make a bookkeeping mess.
I have two questions:
- is there a way to read these "faulty", "undersampled" ouput files without "Floating point exception." (I could then set up calculations for let say 10 different values of mu an choose mu that gave the closes answer - the simplest to code).
- is there some easy way to make the MC autoadjust the chemical potential ?
Regards, Mateusz Lacki
Why fpectl? Can you please clarify: does the code crash or does it give a Python exception? Can you send the output error message that you get?
On Dec 21, 2012, at 6:19 PM, Mateusz Łącki mateusz.lacki@gmail.com wrote:
Just to be sure: it is not possible to do it without fpectl module (which requires python recompilation)?
Le Dec 21, 2012 à 3:16 PM, Matthias Troyer a écrit :
Why don't you try to load each file separately and catch exceptions?
On Dec 21, 2012, at 3:08 PM, Mateusz Łącki mateusz.lacki@gmail.com wrote:
Dear All I am using Worm to make some easy simulation with RESTRICT_MEASUREMENTS[N]=30
I understand that:
If I set up the chemical potential correctly, then the MC algorithm encounters enough trajectories with N=30 and the output files contain resuls averagen only over trajectories with N=30 - approximation of the canonical ensemble.
This is confirmed by user-experience and my weak recollecion of advide I have received here about oen year ago.
But if I set the chemical potential wrongly then the average number of particles from the Grand canonical point of view is for example 45, and there are not enough (maybe even 0) trajectories to sample with N=30.
In this case the output files contain somethink that makes the following python "result getter":
********************** get.py *********************** import pyalps import sys
rf=pyalps.getResultFiles(prefix=sys.argv[1]) data = pyalps.loadMeasurements(rf) obl=pyalps.loadObservableList(rf)
behave rude: it says Floating point exception. and quits (even if only one of let say 500 output files is corrupt).
Of course adjusting the chemical pontential is the key, but this seems to be complicated in a case where the phase diagram is complicated (I would have to do some form of extrapolation or binary search to get the right mu). On the other hand I see no other way to solve it.
Another way to deal with that is to generate input files containing only one set of input parameters - this way each datapoint has its own prefix. It is not complicated, but somehow contrary to the idea behind the current format of the input data. Morover it is likely to make a bookkeeping mess.
I have two questions:
- is there a way to read these "faulty", "undersampled" ouput files without "Floating point exception." (I could then set up calculations for let say 10 different values of mu an choose mu that gave the closes answer - the simplest to code).
- is there some easy way to make the MC autoadjust the chemical potential ?
Regards, Mateusz Lacki
The error message is just: "Floating point exception"
no other output is produced (neither in stdout nor stderr), except for this my print command does.
I guess this means this is os exception, not python exception.
For example: nothing even remotely similar to that: Traceback (most recent call last): File "<stdin>", line 1, in <module> ZeroDivisionError: integer division or modulo by zero
is shown.
Regards, Mateusz Lacki
Le Dec 21, 2012 à 6:22 PM, Matthias Troyer a écrit :
Why fpectl? Can you please clarify: does the code crash or does it give a Python exception? Can you send the output error message that you get?
On Dec 21, 2012, at 6:19 PM, Mateusz Łącki mateusz.lacki@gmail.com wrote:
Just to be sure: it is not possible to do it without fpectl module (which requires python recompilation)?
Le Dec 21, 2012 à 3:16 PM, Matthias Troyer a écrit :
Why don't you try to load each file separately and catch exceptions?
On Dec 21, 2012, at 3:08 PM, Mateusz Łącki mateusz.lacki@gmail.com wrote:
Dear All I am using Worm to make some easy simulation with RESTRICT_MEASUREMENTS[N]=30
I understand that:
If I set up the chemical potential correctly, then the MC algorithm encounters enough trajectories with N=30 and the output files contain resuls averagen only over trajectories with N=30 - approximation of the canonical ensemble.
This is confirmed by user-experience and my weak recollecion of advide I have received here about oen year ago.
But if I set the chemical potential wrongly then the average number of particles from the Grand canonical point of view is for example 45, and there are not enough (maybe even 0) trajectories to sample with N=30.
In this case the output files contain somethink that makes the following python "result getter":
********************** get.py *********************** import pyalps import sys
rf=pyalps.getResultFiles(prefix=sys.argv[1]) data = pyalps.loadMeasurements(rf) obl=pyalps.loadObservableList(rf)
behave rude: it says Floating point exception. and quits (even if only one of let say 500 output files is corrupt).
Of course adjusting the chemical pontential is the key, but this seems to be complicated in a case where the phase diagram is complicated (I would have to do some form of extrapolation or binary search to get the right mu). On the other hand I see no other way to solve it.
Another way to deal with that is to generate input files containing only one set of input parameters - this way each datapoint has its own prefix. It is not complicated, but somehow contrary to the idea behind the current format of the input data. Morover it is likely to make a bookkeeping mess.
I have two questions:
- is there a way to read these "faulty", "undersampled" ouput files without "Floating point exception." (I could then set up calculations for let say 10 different values of mu an choose mu that gave the closes answer - the simplest to code).
- is there some easy way to make the MC autoadjust the chemical potential ?
Regards, Mateusz Lacki
Yes, and this should not happen. Can you please send these output files in a private email and we will fix that bug.
Matthias
On Dec 21, 2012, at 18:36, Mateusz Łącki mateusz.lacki@gmail.com wrote:
The error message is just: "Floating point exception"
no other output is produced (neither in stdout nor stderr), except for this my print command does.
I guess this means this is os exception, not python exception.
For example: nothing even remotely similar to that: Traceback (most recent call last): File "<stdin>", line 1, in <module> ZeroDivisionError: integer division or modulo by zero
is shown.
Regards, Mateusz Lacki
Le Dec 21, 2012 à 6:22 PM, Matthias Troyer a écrit :
Why fpectl? Can you please clarify: does the code crash or does it give a Python exception? Can you send the output error message that you get?
On Dec 21, 2012, at 6:19 PM, Mateusz Łącki mateusz.lacki@gmail.com wrote:
Just to be sure: it is not possible to do it without fpectl module (which requires python recompilation)?
Le Dec 21, 2012 à 3:16 PM, Matthias Troyer a écrit :
Why don't you try to load each file separately and catch exceptions?
On Dec 21, 2012, at 3:08 PM, Mateusz Łącki mateusz.lacki@gmail.com wrote:
Dear All I am using Worm to make some easy simulation with RESTRICT_MEASUREMENTS[N]=30
I understand that:
If I set up the chemical potential correctly, then the MC algorithm encounters enough trajectories with N=30 and the output files contain resuls averagen only over trajectories with N=30 - approximation of the canonical ensemble.
This is confirmed by user-experience and my weak recollecion of advide I have received here about oen year ago.
But if I set the chemical potential wrongly then the average number of particles from the Grand canonical point of view is for example 45, and there are not enough (maybe even 0) trajectories to sample with N=30.
In this case the output files contain somethink that makes the following python "result getter":
********************** get.py *********************** import pyalps import sys
rf=pyalps.getResultFiles(prefix=sys.argv[1]) data = pyalps.loadMeasurements(rf) obl=pyalps.loadObservableList(rf)
behave rude: it says Floating point exception. and quits (even if only one of let say 500 output files is corrupt).
Of course adjusting the chemical pontential is the key, but this seems to be complicated in a case where the phase diagram is complicated (I would have to do some form of extrapolation or binary search to get the right mu). On the other hand I see no other way to solve it.
Another way to deal with that is to generate input files containing only one set of input parameters - this way each datapoint has its own prefix. It is not complicated, but somehow contrary to the idea behind the current format of the input data. Morover it is likely to make a bookkeeping mess.
I have two questions:
- is there a way to read these "faulty", "undersampled" ouput files without "Floating point exception." (I could then set up calculations for let say 10 different values of mu an choose mu that gave the closes answer - the simplest to code).
- is there some easy way to make the MC autoadjust the chemical potential ?
Regards, Mateusz Lacki
comp-phys-alps-users@lists.phys.ethz.ch