Re: [Meep-discuss] organic material in meep

2013-06-04 Thread Nizamov Shawkat
Hello,

You do not need DL model to describe organic materials, they are  described
using regular dielectric permittivity (complex if you want to account for
dielectric losses). You can determine them from the known refractive
indices. For ITO it might be different, because it is conductive and in
some spectral bands should be considered as metal. However, for your
application, depending on the spectral properties of ITO in required
spectral band, you might be able to describe it as a dielectric media as
well. I think that in visible range it should be possible.

With best regards,
Shavkat
___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Re: [Meep-discuss] python-meep install on Mac OS 10.7.4

2012-05-11 Thread Nizamov Shawkat
Hi,

Messages like:

custom.hpp:18:30: error: numpy/npy_common.h: No such file or directory
custom.hpp:19:31: error: numpy/arrayobject.h: No such file or directory

suggest that you should install numpy and try again.

Hope it helps,
S.Nizamov

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] Define sphere in python-meep

2012-03-02 Thread Nizamov Shawkat
Hi,

As far as I remember, geometric primitives are defined in Scheme
wrapper, not in the underlying meep library. Therefore they can not be
wrapped by python layer. So the answer to your question is No, there
is no geometric primitives in python-meep. In simplest case you can
define the sphere in following manner:

class epsilon(Callback):
def __init__(self):
Callback.__init__(self)
def double_vec(self,v):
v = vec
r = v.x() ** 2 + v.y() ** 2 + v.z ** 2
dr = sqrt(r)
if dr > 0.7:
return 12.0
return 1.0

Note that due to the numerical averaging, initialization of simulation
volume might take much longer, than in the case of Scheme with
geometric primitives (they use analytical averaging). Simulation
itself should take the same time.

With best regards,
S.Nizamov

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] libctl for mpb and meep in higher versions of ubuntu 11 and 12

2012-01-17 Thread Nizamov Shawkat
2012/1/17 yogesh :
> Dear MPB and MEEP users,
>
> We may know that installing mpb and meep in ubuntu version is very easy, as
> it can be done with the help of synaptic package manager. However, recently,
> I have installed it on higher version of ubuntu like 11 and 12. There I
> faced problem due to higher version of libctl3-3.1.0-5, where mpb and meep
> failed to work (error:  missing file) . To sort out this, I have manually
> installed  libctl3-3.1.0.2. This works fine and fix the problem. I want to
> know, whether this is the only solution or any other method is there for it
> ?. If we use the older version, the up-gradation need to be stopped in order
> use meep and mpb.
>
> Any solution. Please share it.
>

1) If the built package from official Ubuntu repos does not work out
of the box after installation, then it is a bug. Please, report it
accordingly in the Ubuntu bug tracker at https://bugs.launchpad.net/.

2) If you want to install libctl3-3.1.0.2 and prevent it from being
upgraded to later version (e.g. to libctl3-3.1.0-5) then use apt-get
pinning. https://help.ubuntu.com/community/PinningHowto

Hope it helps,
S.Nizamov

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] python meep import error

2011-11-14 Thread Nizamov Shawkat
Hello!

Please note that this list is general meep mailing list. There is a
dedicated list for python-meep on launchpad, however, there is no much
activity.

>
> ImportError: /usr/lib/python2.7/site-packages/_meep.so: undefined symbol: 
> harminv_data_create
>
> I'm using archlinux with harminv installed and I can find harminv.h in 
> /usr/include.
>

Most probably this means that you had compiled meep without harminv.
python-meep itself does not directly call harminv library, at most it
may use  related functions in libmeep.

with best regards,
S.Nizamov

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] about meep-mpi

2011-10-06 Thread Nizamov Shawkat
2011/10/6 Konstantin Ladutenko :
> Hi,
>
>  Nizamov Shawkat, thank your for your reply and conforming not 1 to 1 scaling 
> of meep stepping for MPI on your setup.
>
>  I`ve checked scaling from problem size on two systems. Results are in LaTeX 
> format at the end of my letter. You can download them in several formats 
> http://194.85.163.135/meep-bench.[pdf,tex,ods] , I guess files should be 
> available for several months.
>
>  Short sum: scaling with increasing of used cores goes down with increase of 
> problem size. On both tested systems best gain (1.85 for 8 Xeon cores, 1.25 
> for 4 i5 cores relative to 1 core simulation)   was for 50 points per unit 
> (size of model 15x15 units) with common trend to decrease for larger problems 
> (for resolution 400 on i5 gain is about 1.18, for resolution 200 on Xeon gain 
> is about 1.54).
>  Short note: One 4 core i5-2400@3.1Ghz is 3-4 times faster than two 4-cores 
> E5345@2.33 Ghz with meep-1.1.1.
>
>  Any ideas? More benchmarking?
>

Hello,

for me it looks like that you really have problems with
compilation/setup. If your set up your environment in similar way on
different hardware and always have bad scaling that should mean that
something is messed in your setup. Can you install some version of
Ubuntu with precompiled meep/openmpi and try there? Also, please post
your simulation file so that I could try it on my PC and compare the
scaling that I have.

Best regards,
S.Nizamov

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] about meep-mpi

2011-10-05 Thread Nizamov Shawkat
2011/10/4 Konstantin Ladutenko :
> Hi,
>
>  I`ve continued benchmarking meep 1.1.1, now on a single 2 CPU (4 cores each) 
> host to exclude my network setup...
>
> Simulating drop filter.
>
> procs --- set_eps --- set_eps_1 /procs* --- step --- step_time --- 
> step_time_1/procs*
> 8 --- 14,80 --- 15,98* --- 0,01630 --- 67,16 --- 14,20*
> 4 --- 31,80 --- 31,95* --- 0,01600 --- 70,33 --- 28,40*
> 2 --- 65,00 --- 63,91* --- 0,02080 --- 88,70 --- 56,80*
> 1 --- 127,81 --- 127,81* --- 0,02680 --- 113,60 --- 113,60*
>
> * expected values
>
> So just the same. Set_epsilon is scaling, time stepping is not. Any ideas? My 
> problem with scaling on Xeon?
> I will try to check just the same on my home i5 in few days...
>

Hello!

You results anyway show that your simulation is accelerating with
adding cores. Yes, it is not 1 to 1 acceleration, and with 8 cores it
becomes only twice faster in time stepping (67.16 vs 113.60). My guess
is that your simulation is not large enough. Setting epsilon values is
really parallel operation because each chunk does not depend on the
other therefore there you see a good scaling.  On the other side the
time stepping code is not completely parallelized - calculation of
fields on their boundaries requires the interprocess communication
over MPI. Because of such overheads these may actually slow down the
simulation process. How much one will gain from parallelizing
calculation of the fields in the chunks and suffer from slow down
because of calculations on their boundaries actually depends on the
size of simulation cell, used processor cores etc. Increase resolution
a few times and you should see better scaling.

One more reason that one have to consider is MPI realization itself -
if I remember it correctly, it is generally recommended to use openmpi
over mpich, especially on the SMP.

Another problem, more hardware related, is the cache of processors.
More processes actively using the memory - the less effective is cache
and more stress on the memory bus. If you consider how epsilon
population is performed you will see that this is relatively short
function which takes a lot time for calculation and slowly populates
the memory array. Time stepping, on the other side, performs less
calculations but aggressively uses the memory (the memory bus speed
may become a bottleneck) therefore making cache much less effective.
In my own experience I noticed that on my 8 core system it was better
to use 4 core simulation.

As a bottom line - what you see is quite normal and you have to play
with your settings to obtain the best result. There is no single and
universal recipe.

Hope it helps,
S.Nizamov

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] std::bad_alloc error even though enough memory

2011-09-28 Thread Nizamov Shawkat
2011/9/27 Malu :
> Hi Steven G. Johnson and Meepers,
>
> I have got some questions in order to solve some problems I had with memory
> and bad_alloc.
>
> Although I've got enough memory I get the "std::bad_alloc" error. My
> computer has 8GB (4 x 2GB) RAM, it runs on Ubuntu 32bits with PAE (the bash
> command "$free -m" returns me "Mem: 8034 total...", that mean it recognizes
> up to 8GB).

As far as I remember, PAE mode means that the total amount of memory
will be over 32-bit limit, however, any single process can still
allocate memory within 32-bit limitation. Most probably this is what
do you observe - you simulation is limited by 32-bit per-process
address space, not by the total amount of memory. That means that you
must either run in 64bit OS (for single CPU core simulation allocating
more than 4 gb) or setup a SMP simulation in such way that any single
core obeys 32-bit limitation (2 core simulation will allocate each 4
gb at most, 8 gb in total). Besides, for security reasons Linux OS may
restrict the amount of user allocatable memory (ulimit).

With kind regards,
S.Nizamov

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] best approach for building complicated 3D models for MEEP?

2011-07-27 Thread Nizamov Shawkat
Hello!

As far as I know there is no standard file that meep could import as a
3D model.  If you do not mind python then I would suggest you to use

1) Free-cad  http://sourceforge.net/projects/free-cad/files/FreeCAD%20Linux/
2) python-meep

You still have to write a layer that would transform cad files
structures to numpy array or to set up a simulation directly with
python-meep using the structure in the free-cad. The advantage here is
that everything what you need will be done in single environment
(python).  Though this is not required and you can as well use a
free-cad, make a python (or whatever) script to translate your
structure to ctl file that can be understood by ordinary meep.
Free-cad itself seems relatively mature and appropriate for this task.

You can also look for SALOME. This looks like a mature and
professional software, however, I found that community and support are
not very helpful.

Hope it helps,
Shavkat Nizamov

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] meep - Debian conflict

2010-11-17 Thread Nizamov Shawkat
Once upon a time I had prepared packages of meep for ubuntu at Launchpad.
Most probably, they can be with a very small effort installed on a Debian.
If not, you can just fetch deb src from that repository, and rebuild it for
you system with e.g. pbuilder or prevu.

With best regards,
Shawkat Nizamov
___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Re: [Meep-discuss] meep installation

2010-11-05 Thread Nizamov Shawkat
2010/11/5 朱孔涛 

> Hi everyone,
> I have a problem in meep installation.I have installed the file
> libhdf5-serial-1.6.6-0_1.6.6-4_i386.deb.
>

You should also install corresponding -dev package.

With best regards,
Shawkat Nizamov
___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Re: [Meep-discuss] gaussian src in scheme and C++

2010-10-21 Thread Nizamov Shawkat
A quick glance at your examples reveals several differences in your examples.

1) In C++ case, the source is very close to the PML area (remember
that origin is in the corner, that's why source at 1.1 is very close
to the PML, which ends at 1.0). In Scheme example source is alsmost in
the center of the cell, far from adsorbing layer.
2) Look's like that you are aware that C++ uses complex fields by
default. But Scheme by default uses real valued fields.

with best regards,
Shawkat Nizamov

2010/10/22, Bin Huang :
> Hi guys,
>
> I have been trying to implement some example problems from
> http://ab-initio.mit.edu/wiki/index.php/Meep_Tutorial/Band_diagram%2C_resonant_modes%2C_and_transmission_in_a_holey_waveguide
> in C++. Most of it works out, however, the amplitude of harminv result in
> the Resonant Mode example is different from what is on the website.
> Therefore, I started to doubt that the initialization of gaussian src is
> different in Scheme and C++. I tried out the simplest problem on C++
> tutorial, which just constructs a gaussian src and run. I simply output the
> field at the source coordinate.
>
> A simple display of the sources constructed in C++ and scheme is here, with
> both programs attached as well.
> https://docs.google.com/fileview?id=0B7K7CoKpx-RcMmU0OGIxNTgtNjE1MC00ZTNjLThhMzEtMDVlYTdmZWVhNWQx&hl=en
>
> The amplitude is the problem here. Anyone has any idea on why the source is
> different in C++ vs Scheme?
>
> Many thanks!
> Bin Huang (Bryan)
> MIT Graduate Student '10
> Computation for Design and Optimization
> (+65)98947649
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
>

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] MEEP development

2010-09-12 Thread Nizamov Shawkat
Hi!

If I correctly understand you, you want to extend the simulation and
perform custom specific fields calculations, made on specified
regions, along the FDTD calculations.

In this case you have several choices, all of them are undocumented,
but may be figured out looking through sources. If you deliberately
want to use Scheme for this, I think you have to figure the correct
sequence of timestepping code, implement it in Scheme and perform your
code when appropriate. You may also locate the timestepping code in
the C++ library and insert the callback for external procedure in
Scheme, but it is quite challenging.
All C++  implementation would be much easier.

Maybe meep developers can suggest better approaches ?

Hope it helps,
Shavkat Nizamov

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] MEEP development

2010-09-09 Thread Nizamov Shawkat
main() is supposed to be the part  of the user written program (meep
core is just a library). So you are supposed to implement main() on
your one, specifying all simulation details step by step. Look through
meep test programs to find usual sequence of simulation setup.

Hope it helps,
Shawkat Nizamov

2010/9/9, bin huang :
> Bin Huang  writes:
>
>>
>> Hi guys,
>>
>> I am wondering if there is any documentation or brief explanation of each
> class file in the program? A
>> overview of the structure is good enough for me to understand the flow of
>> the
> program.
>>
>> Sphere_quad.cpp seems to produce the grid point coordinates. I am
>> wondering
> how the program proceeds from
>> there. Basically if I can get some help on the flow of the program, it
>> would
> be great. Something like what
>> does the program do in the first step, the second step, then does it use
>> some
> external solver to solve the
>> fields etc etc.
>>
>> I guess this question is directed to the original developer of this
>> program.
> Thanks a lot for your help.
>> --
>> Bin Huang (Bryan)
>> MIT Graduate Student '10
>> Computation for Design and Optimization
>> (+65)98947649
>>
>
> It seems like Sphere_quad.cpp is only used to output the file Sphere_quad.h.
>
> I only found one main function in Sphere_quad.cpp, which is why I thought
> the
>
> program starts running from there.
>
> However, when i found out that it is not the case, I try to search some
>
> words in the output of MEEP, anything in the following file.
>
> ---
> Initializing structure...
> Working in Cylindrical dimensions.
> Computational cell is 8 x 0 x 0 with resolution 10
>  block, center = (1.5,0,0)
>   size (1,1e+20,1e+20)
>   axes (1,0,0), (0,1,0), (0,0,1)
>   dielectric constant epsilon diagonal = (11.56,11.56,11.56)
> time for set_epsilon = 0.00140896 s
>
>
> However, I am not able to locate where MEEP prints out all these results
>
> Can someone pls enlighten me?
>
> Rgds,
> Bin Huang
>
>
>
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
>

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] meep-mpi scaling perf with more than 2 processors

2010-07-16 Thread Nizamov Shawkat
> In your case, have you witnessed this kind of unbalanced behavior (unbalanced 
> memory, I
> mean)?

Sorry, I do not remember exact details.

Let's see once again:

1817525   0  353m 221m 6080 R  99.8  1.4   1:10.41  1  meep-mpi
1817425   0  354m 222m 6388 R 100.2  1.4   1:10.41  6  meep-mpi
1817225   0 1140m 1.0g 7016 R  99.8  6.3   1:10.41  2  meep-mpi
1817325   0 1140m 1.0g 6804 R  99.5  6.3   1:10.40  4  meep-mpi

Tasks: 228 total,   5 running, 222 sleeping,   0 stopped,   1 zombie
Cpu1  : 23.9%us, 76.1%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu6  : 23.3%us, 76.7%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu2  : 99.7%us,  0.3%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu4  : 99.7%us,  0.3%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st

Well, it may be possible, that simulation space is divided unevenly.
In this case, results seem quite natural - bigger simulation volumes
(cpu2 and cpu4) run at their full speed, 3-4 times smaller volumes
(cpu1 and cpu6) complete their simulation steps circa 3 times faster
and waste the time waiting for two other cores.

If this is correct interpretation, then there is nothing wrong with
you setup and:

1) it should mean that splitting of overall simulation volume onto
separate per core simulation volumes was not performed optimally by
meep. Any meep developer to comment ? I remember that splitting
algorithms took into account the structure and optimized
correspondingly the splitting volumes. E.g., cores 1 and 6 may be
actually simulating the slab volume, while cores 2 and 4 are
calculating the free space/PML. Try without slab to see if in that
case the distribution will be even.

2) scaling might be much better when you further increase the  number
of cores, because simulation volume may be divided more evenly.  Can
you try it ?

Actually, it would be interesting to compare how simulation volume is
divided at different number of processor cores, with and without slab,
and this may give a clue how splitting works. Another option is to
look at the sources :)

With best regards
Shawkat Nizamov

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] h5topng problem in 3d dataset

2010-07-15 Thread Nizamov Shawkat
> h5topng -z 1 -R -Zc dkbluered -a yarg -A ez-000200.00.h5
>
> -A  : overlay data from , as specified by -y

If you are using -A, you have to specify 2 files, one for -A feature
(don't know what is it) and one as an actual datafile. h5topng sees
only one and attributes it to -A. So, you didn't specify any actual
data file, and h5topng is complaining.

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] meep-mpi scaling perf with more than 2 processors

2010-07-15 Thread Nizamov Shawkat
1) You didn't provide any details on the layout of your cluster. It is
hard to guess if you have a  several dual-cores with 16Gb memory, or
they are 6 cores and you are running only on one of them.
2) I resemble that using 4 (or was it 8?) core Athlon in single PC
there were no acceleration beyond 3 cores. In my case the limitation
was most probably memory bandwidth, but it is not  your case. I would
anyway see in my case all cores running at almost 100%.
3) Are you sure that you are accounting for actual simulation and not
the initialization? Populating the memory with epsilons is not
parallel, I mean, that every core populates only some simulation
space. If it is uniformly filled it completes fast. If it has some
structure, especially if subpixel averaging is turned on,  it may take
much longer time, during which other cores will just simply wait.
Print some debug information like "structure initialization"
"simulation started" etc and compare the timing distribution. From
"runtime0=2" I conclude that your simulation time is actually rather
short.

With best regards,
Shawkat Nizamov

2010/7/15, gdem...@physics.utoronto.ca :
> Dear Meep users and developer,
>
> I'm getting strange scaling performance using meep-mpi compiled with
> IntelMPI on our cluster. When I go from 1 to 2 processors, I'm getting
> an almost ideal scaling (i.e. runtime is divided by almost 2 as shown
> below for various problem sizes), but the scaling becomes very weak
> when using more than 2 processors. I should say that meep-mpi results
> agree with the one I am getting on my PC with meep-serial (in other
> words, our compilation seems all right).
>
> nb_proc  runtime-res=20   runtime-res=40 runtime-res=60  runtime-res=80
>  1  20.5 135449 1086
>  2  11.47 73230  551
>  4  11.52 68219  530
>  8  12.9  67222  528
>
> Let's go for some more details with a job size of ~3Gb (3D stuff). I
> am showing below the stats obtained when requesting 4 processors:
> mpirun -np 4 meep-mpi res=100 runtime0=2 norm-run?=true slab3D.ctl
>
> -
> Mem:  16411088k total,  4015216k used, 12395872k free,  256k buffers
> Swap:0k total,0k used,0k free,   283692k cached
>  PIDPR  NI  VIRT  RES  SHR S %CPU %MEMTIME+P  COMMAND
> 1817525   0  353m 221m 6080 R  99.8  1.4   1:10.41  1  meep-mpi
> 1817425   0  354m 222m 6388 R 100.2  1.4   1:10.41  6  meep-mpi
> 1817225   0 1140m 1.0g 7016 R  99.8  6.3   1:10.41  2  meep-mpi
> 1817325   0 1140m 1.0g 6804 R  99.5  6.3   1:10.40  4  meep-mpi
>
> Tasks: 228 total,   5 running, 222 sleeping,   0 stopped,   1 zombie
> Cpu1  : 23.9%us, 76.1%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,
> 0.0%st
> Cpu6  : 23.3%us, 76.7%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,
> 0.0%st
> Cpu2  : 99.7%us,  0.3%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,
> 0.0%st
> Cpu4  : 99.7%us,  0.3%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,
> 0.0%st
> [...]
> -
>
> So what we see here is that while the processors are all running flat
> out, for CPU 1 and 6 (which are the two running processes light on
> memory) only 1/4 of the time is in user code, and 3/4 is in system
> time -- normally I/O, but here probably MPI communications. It
> explains why I don't get shorter runtimes with more than 2 processors.
>
> So we have a fairly clear load-balance issue; Have you experienced
> this kind of situation? I was wondering if there may be meep-mpi
> parameters I can set to affect the domain decomposition into chunks in
> a helpful way.
>
> I can send more details if needed.
>
> Thanks in advance!
>
> Best regards,
>
> Guillaume Demésy
>
> 
> This message was sent using IMP, the Internet Messaging Program.
>
>
>
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
>

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] meep-mpi on mac

2010-07-06 Thread Nizamov Shawkat
My guess is that mpirun tries to setup the connection to all nodes
(every cpu core is counted as a single node) and fails. OpenMPI may
use different methods for connection to nodes - ssh, rsh, shared
memory etc. In your case it looks like trying rsh - this is AFAIK
default OpenMPI behaviour. Read OpenMPI docs about running with e.g.
shared memory (should be fastest) or over ssh (but then you have to
install and configure ssh). Or you can also install rsh.

Hope it helps,
Shawkat Nizamov

2010/7/6, Ajith R :
> Dear Steven,
> I have installed meep-mpi on mac using fink.
> It works fine with single core.
> But when I try to run it parallel, it shows error message.
> I couldn't understand the problem. The error message is given below.
> Please help me.
> Thanking you in advance,
> Ajith
>
>
>
> Administrators-Mac-Pro:1 admin$ mpirun -np 8 meep-mpi a.ctl | tee a.out
> [Administrators-Mac-Pro.local:01265] Error: unknown option "--bootproxy"
> input in flex scanner failed
> [Administrators-Mac-Pro.local:01263] [0,0,0] ORTE_ERROR_LOG: Timeout
> in file
> /SourceCache/openmpi/openmpi-8/openmpi/orte/mca/pls/base/pls_base_orted_cmds.c
> at line 275
> [Administrators-Mac-Pro.local:01263] [0,0,0] ORTE_ERROR_LOG: Timeout
> in file
> /SourceCache/openmpi/openmpi-8/openmpi/orte/mca/pls/rsh/pls_rsh_module.c
> at line 1158
> [Administrators-Mac-Pro.local:01263] [0,0,0] ORTE_ERROR_LOG: Timeout
> in file
> /SourceCache/openmpi/openmpi-8/openmpi/orte/mca/errmgr/hnp/errmgr_hnp.c
> at line 90
> [Administrators-Mac-Pro.local:01263] ERROR: A daemon on node
> Administrators-Mac-Pro.local failed to start as expected.
> [Administrators-Mac-Pro.local:01263] ERROR: There may be more
> information available from
> [Administrators-Mac-Pro.local:01263] ERROR: the remote shell (see above).
> [Administrators-Mac-Pro.local:01263] ERROR: The daemon exited
> unexpectedly with status 2.
> [Administrators-Mac-Pro.local:01263] [0,0,0] ORTE_ERROR_LOG: Timeout
> in file
> /SourceCache/openmpi/openmpi-8/openmpi/orte/mca/pls/base/pls_base_orted_cmds.c
> at line 188
> [Administrators-Mac-Pro.local:01263] [0,0,0] ORTE_ERROR_LOG: Timeout
> in file
> /SourceCache/openmpi/openmpi-8/openmpi/orte/mca/pls/rsh/pls_rsh_module.c
> at line 1190
> --
> mpirun was unable to cleanly terminate the daemons for this job.
> Returned value Timeout instead of ORTE_SUCCESS.
> --
> Administrators-Mac-Pro:1 admin$
>
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
>

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] Performance of meep-mpi on multicore processors

2010-05-15 Thread Nizamov Shawkat
It is well known - small simulations are better with single core than
multicore. In order to get a reasonable speed-up on a multicore a
simulation should exceed e.g. 100 Mb (in occupied memory). Just use a
higher resolution and see how the speedup will change. If increase of
resolution leads to better speedup then there is nothing wrong with
your setup.
Besides, MPICH is known to have poor performance with multicore
systems, use OpenMPI instead, it is much better.

2010/5/14, Jonathan Hodges :
> **Dear Meep Users,
>
> I have a quick question about using meep-mpi on a multicore processor,
> specifically the new CORE i5 from Intel.  MPICH2 recognizes the availability
> of the multicore processor and initializing the meep-mpi command using (from
> the apt-get binaries):
>
> mpirun -np 4 /usr/bin/meep-mpi some_structure.mpi
>
> successfully starts meep, recognizes the 4 processors and is off
> calculating.
>
> The problem is that the performance is worse with 4 cores than it is with
> one core.  For example, running the holey-wvg-cavity.ctl example takes 27s
> and 76s with 1 and 4 cores, respectively.
>
> Am I doing something wrong in configuring mpirun that causes the performance
> to suffer?  Am I missing some critical idea about MPI/MPICH2 on multicores
> that can explain the performance degradation?
>
> Thank You,
> Jonathan Hodges
> Columbia University
>

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] giving motion to an object in meep

2010-05-04 Thread Nizamov Shawkat
2010/5/4, Shravan S :
> Hi,
> I want to simulate a doppler radar in meep. I would like to how I could give
> motion (uniform or radial motion in real-time) to an object in meep. So, the
> scenario I am trying to simulate will be as follows: an antenna will send
> some pulses for a certain time and along the frontal view of the antenna
> (down-range) there will be a moving object, which will give a doppler and a
> stationary object which won't give any doppler. Please give your advice on
> its implementation.
>

Did you estimated simulation time that you will need ? e.g., for how
much time you should simulate, so that moving object will shift its
position just by one wavelength. I guess such simulation would be
realistic only if speed of wave and speed of object are comparable.
Considering if it actually possible - yes, AFAIK, with meep it is
quite possible to change the material distribution during the
simulation, but there is no documentation on it.

WBR,
Shawkat Nizamov

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] SFCW (Stepped frequency continuous wave) source in meep

2010-05-04 Thread Nizamov Shawkat
Hi!

Stepped frequency continuous wave, as you describe it, seems
inpractical for me. Any coarse frequency change will cause high
harmonics wave, which may lead to numerous artifacts. Even using very
small frequency steps you should still make sure that any such change
will not cause abrupt change of fields. For example, you may sync any
frequency change to zero crossing, but even in such case there will be
unwanted distortions.
I mean, that cos( 2*pi* (fo + i*delta_f) *t) -  cos( 2*pi* (fo +
(i+1)*delta_f) *t)  may be anything from -1 to +1 (in other words,
phase difference between them is oscillating), and not close to 0, as
one would expect.

Chirped source, as described in http://en.wikipedia.org/wiki/Chirp may
be better suited for your task and doesn't have such problem. In my
previous experience I found that exponentially chirped source is
better that the linear because the number of oscillations at any given
frequency is more or less comparable, unlike linearly chirped source.
I had implemented it in python, but, of course, custom sources are
also easily implementable with scheme or c++ .

Hope it helps,
Shawkat Nizamov

2010/5/4, Shravan S :
> Hi,
> I am interested in simulating an SFCW (Stepped frequency continuous wave)
> source in meep. So, for every interval of time, the frequency of the
> transmitted signal changes by a small value delta_f. The number of intervals
> go up to 400 or even 4000, so specifying a start time and end time for each
> frequency step seems impractical. I wanted to know if I could loop it in
> some way. The equation for SFCW is given as,
> Ao cos( 2*pi* (fo + i*delta_f) *t ).. where i=1,2,3 N; N=no. of
> frequency steps
>
> Thank you,
> Shravan
>

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] problems with material dispersion of gold (metal) in meep C++

2010-03-02 Thread Nizamov Shawkat
2010/3/2, Renaud Vallée :
> Dear Steven, everybody,
>
> I want to obtain the transmission/reflection spectra of a single gold
> spherical nanoparticle located at the center of the simulation box.
> Everything works fine except for the polarizability, which is not taken
> into account. I use the Drude-Lorentz model described in Vial et al.,
> PHYSICAL REVIEW B 71, 085416 (2005͒) with units adapted to my case. The
> functions sigma_1 and sigma_2 here below are defined accordingly, and
> the add-polarizability terms are called in the program. However, they
> are not taken into account in the calculation, i.e. if I remove the
> add-polarizability terms in the program, everything works the same way.
> Owing to the fact that the same program written with the libctl
> interface works perfectly, i.e. it reproduces adequately the expected
> plasmon resonance peak(s), I guess something is wrong with my C++
> implementation. Does anybody know why? The way the sigma_1 and sigma_2
> functions are defined is not correct or is it due to the call of the
> add-polarizability that is not fine?

Check your coordinates origin - they are different for libctl (center
of volume) and c++ (corner of volume).

Hope it helps,
Shavkat Nizamov

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Re: [Meep-discuss] Errors when compiling the Meep and MPB packages.

2010-02-05 Thread Nizamov Shawkat
Hi!

> /usr/local/lib/libblas.a(dznrm2.o): In function `dznrm2_':
> fort77-21091-72.c:(.text+0xd8): undefined reference to `d_imag'

Google says that you don't have g2c library (or didn't linked it in) .
AFAIK, this is mostly a case when fortran sources have been translated
to C before being compiled to binary (e.g. by gcc/f2c or so).

I wonder what distribution you use if it doesnt't have even libblas compiled.
If it has, why you do not simply install them ?

wbr,
Shawkat Nizamov

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] Python bindings for Meep released

2010-01-15 Thread Nizamov Shawkat
2010/1/15, Kristian Medri :
> I looked at the Python bindings when you first posted about them, thank-you
> for your effort. I have returned to them today since I have been trying to
> figure out whether there is a command such as "stop-when-fields-decayed" for
> the C++ interface. I was unable any reference to it in the C++ documentation
> of Meep nor Meep++. I did note that in the following files that you use
> "runUntilFieldsDecayed" but I was unable to locate where it has been
> implemented in the source:
> python-meep-launchpad-1.0/doc/html/python_meep_documentation.html
> python-meep-launchpad-1.0/doc/html-sources/python_meep_documentation.txt
> python-meep-launchpad-1.0/doc/html/_sources/python_meep_documentation.txt
>

The functionality you are talking about is implemented in pure Python,
look in this file
http://bazaar.launchpad.net/~python-meep/python-meep/LATEST_RELEASE/annotate/head:/meep-common.py.

wbr,
Shawkat Nizamov

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] How to manipulate the output file name in c++ interface

2009-09-22 Thread Nizamov Shawkat
You can use open_h5file() method of field class to obtain a filehandle
for arbitrarily named datafile. Then you can supply it as h5file
argument (not dataname) for any output_hdf5 method. dataname has
different meaning - it is a name of dataset in datafile.



2009/9/19, 李志强 :
> Hi all!
>
> I want to manipulate the output filename in c++ interface. I have browsed
> the meep source code and find the function output_hdf5 is overloaded, it
> contained one which I think may be used manipulate the output name:
>
>
> void
>
> output_hdf5 (const char *dataname, int num_Fields, const component
> *components, field_rfunction fun, void *fun_data_, const Geometric_Volume
> &where, H5file *file=0, bool append_data=false, bool single_precision=false,
> const char *prefix=0)
>
> I guess the first parameter const char* maybe the output filename which can
> be defined by user arbitrarily. The problem is I do not know how to set
> field_rfunction fun and void* fun_data_. Can anyone help?
>
>

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Re: [Meep-discuss] Use of custom_src_time function

2009-09-11 Thread Nizamov Shawkat
Probably, you would better look at generic src_time class. AFAIK, you
just have to override its dipole(time) function to whatever function
you need. I don't have a working c++ example and would be glad if
anyone provides it.

wbr
Shawkat

2009/9/11, Chintha Handapangoda :
> Dear All,
>
> I am trying to simulate a two dimensional photonic crystal with a square
> lattice composed of cylinders, using the C++ interface to meep. My source is
> in the form of discrete values in both spatial and time domains (stored in
> an array). I tried to use the "custom_src_time" function defined in the
> meep.hpp header file but came across the following problem:
>
> The function is defined in meep.hpp as custom_src_time(complex
> (*func) (double t, void *), void *data, double st, double et).
> What information is passed as the second argument (void *data) to this
> function?
>
> Thanks very much.
>
> Chintha Handapangoda.
>
>
>
>

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] Reflection computation for a thin film

2009-06-19 Thread Nizamov Shawkat

Adam Isom:
As an addendum to my earlier post, here is a link to some C++ source 
code I'm trying to use.  Even though the computation prints out 
results for a number of frequencies, I'm looking specifically at the 
result for 1.81 which should correspond to 45 degrees and 550nm light 
with the k-value I have chosen.  I expect 11% but get around 31%.


http://pastebin.com/m6731fd4a

~Adam Isom

On Fri, Jun 19, 2009 at 10:30 AM, Adam Isom > wrote:


Hello everyone,

I am trying to compute reflection coefficients for a very simple
scenario using Meep: plane wave source and a single, free thin
film.  My original setup used a 2D grid with PML along all
boundaries and a plane source across the top of the grid, with the
film at the bottom (I set eps to be the IOR squared).  



Did you visualize the fields? I doubt that you actually have the plane 
wave source, because it is set like a point source.


WBR,
Shawkat

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] also about open-mpi

2009-06-18 Thread Nizamov Shawkat

liu:

Hi,
everyone, my opetating system is Redhat Linux as4.0, on a cluster 
computers. I am just common user and do not have ROOT privilege. I 
only have the right to install openmpi in my space of my account,
I have installed open-mpi exe files in /home/myname/bin, *.h files in 
/home/myname/include and lib files in /home/myname/lib.
when I run "mpirun", the "mpirun" says it can only find one node where 
I have login.

So, should I install open-meep on each node?
But I can login each node, without password, and each node seems no 
different to me, and I can run "mpirun" at each node.

why does this happen?


If I recoll correctly, you should clearly specify hosts for mpirun - 
either via its configuration file or as a command-line option. But 
before you should copy your binary to all that hosts. I may be wrong, 
though.


With respect,
Shawkat

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Re: [Meep-discuss] how to install GNU Guile?

2009-06-13 Thread Nizamov Shawkat

liu:

I extract the include headers from rpm file into myname directory, and
use the commands:
setenv LDFLAGS -L/home/myname/usr/lib


This is probably wrong - library itself is not in your home, it is still 
in system location (/usr/lib ?). You shouldn't change this.



setenv CPPFLAGS -I/home/myname/meep-back/usr/include


And this looks OK (it is a place where headers being looked for)


./configure --prefix=/home/myname
It shows that

checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for indent... indent
checking for ANSI C header files... (cached) yes
checking for guile... guile
checking for guile-config... guile-config
checking if linking to guile works... no
configure: error: Guile could not be found



It may be a consequence of setting wrong LDFLAGS. configure tries to 
link with library in the /home/myname/usr/lib (as you set) but it is not 
there.


My question is that Guile have been installed in Redhat Linux as4.0, 
but why it can not find Guile?

Thank you!

Liu


Best wishes,
Shawkat

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Re: [Meep-discuss] how to install GNU Guile?

2009-06-11 Thread Nizamov Shawkat

liu:

Hi, everybody,

The opetating system is Redhat Linux as4.0, on a cluster computers. 
while, guile 1.6.4 has been install in this system(after typing "guile 
-version", I see it), libctl can not find guile files(perhaps no 
programming headers ).

So I should install guile myself.
But the "guile-devel" or "guile-dev" files are always rpm files. I am 
just common user under Redhat Linux as4.0, and do not have ROOT 
privilege to install rpm files(If I click the rpm, a bar appears 
demanding me the ROOT privilege to install it).


You can extract the include headers from rpm file into some directory in 
your home. It doesn't require root privileges.
Then, you can specify this directory during the build process (e.g. in 
configure script, as a predefined environment variable for compiler etc).
This way you will use system guile libraries, but their headers will be 
under your home directory.


Hope it helps
Shawkat

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Re: [Meep-discuss] flux through gold

2009-05-29 Thread Nizamov Shawkat

Yang Xiang:

Hi everyone,

I am trying to simulate the penetration depth of light into gold. From 
previous discussion I know that to do this, resolution in the order of 
lambda/1000 is needed. As the limitation of my computer, however, I 
cannot use such a high resolution. So I tried to calculate the flux in 
the depth of 0.25*lambda which is much deeper than the  penetration 
depth of gold, and the result I got is around 0.001 times of the flux 
on the surface, but the result I expected to get should be much 
smaller than that.




What is your geometry ? In SPR geometry conditions flux may be even 
higher. Also check how do you set up the properties of gold.
Lambda/1000 probably is too much - I see surface plasmons for 
p-polarisation and no plasmons with s-polarization (as expected) already 
at ca labmda/50.



WBR,
Shawkat

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] Repository

2009-05-23 Thread Nizamov Shawkat



On Apr 14, 2009, at 12:46 AM, nizamov.shaw...@gmail.com wrote:

Dear meep users !

There is a repository for meep (version 0.20.4), built for uniprocessor
and openmpi, i386 and amd64 architectures, Ubuntu 8.04, 8.10 and 9.04.
(Though not every possible combination was tested, most should be OK)

How to install:
https://launchpad.net/~nizamov-shawkat/+archive/ppa

libmeep binding for python is available at
https://code.launchpad.net/python-meep


Thanks!   Have you talked to the maintainer of the official Debian 
(and Ubuntu) package?  Maybe, if help is provided, they can update the 
official package.


Steven



Unfortunately, Debian and Ubuntu policy do not allow updating package 
versions in the releases. That means that Meep-1.0 will never make its 
road to past releases like Debian Lenny or even Ubuntu 9.04.  What I do 
is actually a "backporting" and (AFAIK) it will not be supported 
officially by any major binary distribution. IMHO, the most appropriate 
way for binary distribution of up-todate Meep version would be using 
OpenSUSE build service (OBS). Using that service, Meep binary 
distributions can be provided for almost all currently supported major 
binary distributions/releases/arch's from single source package 
(actually two -  one for RPM and another for DPKG).


With respect,
Shawkat

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] configure error

2009-05-22 Thread Nizamov Shawkat

Yang Xiang:

Hi everyone,

I am trying to install the meep-1.0.
My operating system is ubuntu 9.04, and I have installed both 
guile-1.6 and guile-1.6-dev. However, when I tried to ./configure the 
meep, it display the error:


checking for guile-config... yes
checking if linking to guile works... no
configure: error: guile-config is broken

Is anyone who can help?
Thank you very much!


1)  Why not guile 1.8 ? It is also available in Ubuntu 9.04.
AFAIK, guile is not directly required by meep, so  maybe you are missing 
libctl,
which is linked with guile ? 
2) I published the prebuilt packages for MEEP-1.0 in

https://edge.launchpad.net/~nizamov-shawkat/+archive/ppa
Ubuntu 8.04/8.10/9.04, amd64/i386 supported.
3) Also, you can download the sources deb package from
this ppa and build them on your own, e.g. with pbuilder or prevu.
It is very easy and straightforward like :
pbuilder --create (to create the build environment)
pbuilder --build meep.dsc  (to actually build the package, point to 
the actual .dsc file)

prevu is even more easier.

WBR
Shawkat

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] h5util configure problem (with log)

2009-04-16 Thread Nizamov Shawkat

Hua Bao:
Dear All, 


I am trying to compile h5util but encountered a problem during
configuration. 
"cannot compute sizeof (unsigned long)" 
Based on the description on the wiki page, this is because I did not install
HDF5 library properly. 


However, I already installed HDF5 1.8.2. There is no major problem during
the "configure/make/make install" process. I am not an admin of the computer
so I have to install it in my home directory. Also, I have no access of
/etc/ld.so.conf or run /sbin/ldconfig 


The path, lib, etc are specified as (I don't have much experience on linux,
so I can only guess what I should set).  Path hbao/apps is where I installed
HDF5.

LD_LIBRARY_PATH=-L/home/nanoenergy/a/hbao/apps/lib 
LDFLAGS=-L/home/nanoenergy/a/hbao/apps/lib 
CPPFLAGS=-I/home/nanoenergy/a/hbao/apps/include 
CFLAGS=-I/home/nanoenergy/a/hbao/apps/include 

Can anyone point out what I should do to make things correct? 




 checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sin in -lm... yes
checking for snprintf... yes
checking for inflate in -lz... yes
checking for png_create_write_struct in -lpng... yes
checking for evaluator_get_variables in -lmatheval... no
configure: WARNING: can't find libmatheval: won't be able to compile h5math
checking for h4toh5... no
checking for h5toh4... no
checking for jpeg_start_compress in -ljpeg... yes
checking for DFSDgetdata in -ldf... no
configure: WARNING: can't find libdf (HDF4): won't be able to compile
h5fromh4 or h4fromh5
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking hdf.h usability... no
checking hdf.h presence... no
checking for hdf.h... no
checking hdf/hdf.h usability... no
checking hdf/hdf.h presence... no
checking for hdf/hdf.h... no
checking for H5Fopen in -lhdf5... yes
checking for mkoctfile... mkoctfile
checking for octave... octave
checking where octave plugins go... error: `DEFAULT_LOADPATH' undefined near
line 1 column 1
unknown
configure: WARNING: can't find where to install octave plugins: won't be
able to compile h5read.oct
checking for v5dCreate in -lv5d... no
checking vis5d/v5d.h usability... no
checking vis5d/v5d.h presence... no
checking for vis5d/v5d.h... no
checking vis5d+/v5d.h usability... no
checking vis5d+/v5d.h presence... no
checking for vis5d+/v5d.h... no
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for htons... yes
checking for unsigned long... yes
checking size of unsigned long... configure: error: cannot compute sizeof
(unsigned long)
See `config.log' for more details.

  



You have a lot of include error's, probably this error

configure:3564: gcc -E -I/home/nanoenergy/a/hbao/apps/include conftest.c
conftest.c:10:28: error: ac_nonexistent.h: No such file or directory

leads to the

configure:6109: error: cannot compute sizeof (unsigned long)
See `config.log' for more details.

because of

| typedef unsigned long ac__type_sizeof_;
| static long int longval () { return (long int) (sizeof 
(ac__type_sizeof_)); }
| static unsigned long int ulongval () { return (long int) (sizeof 
(ac__type_sizeof_)); }



My guess is that Autoconf's own include files are unaccessible for your 
configure script.


I may be wrong, hope it helps.


WBR
Shawkat

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] h5util configure problem

2009-04-14 Thread Nizamov Shawkat

Hua Bao:


Dear All,

I am trying to compile h5util but encountered a problem during 
configuration.

"cannot compute sizeof (unsigned long)"



Please, attach full configure log


___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


[Meep-discuss] How to to set planewave in box with PML on all sides ?

2009-02-19 Thread Nizamov Shawkat
I am trying to simulate Rayleigh scattering. Computational cell is 4 *
4 * 10 (x,y,z correspondingly) , scatterer is in the center,
resolution 20.
Incident planewave generated as volume source at z=2 propagating along
z, with Ex and Hy polaization. Here comes the problem - I can set up
PML only on both sides of Z. If I set PML on all sides, planewave gets
ugly, but if I don't set PML on X and Y sides - scattered fields
reflect at boundaries, create wrong pattern and decay much slower than
incident wave.

I belive that this is because of way how planewave was created , I did
it as found in mailing list archive (single gaussian envelope volume
source) . AFAIK this approach is valid only for incident planewave
with periodic boundaries on X and Y, and pml in Z.

So how can I overcome this problem - create a planewave inside a box
with PML on all sides ? I found messages mentioning several point
sources with crafted parameters, but no details on it.

WBR,
Nizamov Shawkat

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


[Meep-discuss] Python binding for libmeep

2009-02-10 Thread Nizamov Shawkat
Dear Meep users !

As you know, previously (December 2008) we anounced a python binding
for libmeep. Our ongoing efforts in this direction passed another
milestone and we are gladly presenting greatly improved python binding
for libmeep. Higlights for current release are:
- Support for MPI (currently compiled with OpenMPI)
- Tests, included in Meep source, are rewritten in python. So, all
libmeep functionality, necessary to pass those tests (excluding
integrate.cpp and h5test.cpp) is available now. The major limitation
of this release is that field_functions are still not implemented.
IMHO, given the python flexibility, it is more viable to implement
such functionality in pure python.

Additionaly, our repository for 32-bit Ubuntu 8.10 contains
h5utils-1.11.1 (no more that annoying bug with "colormap not found"),
libctl 3.0.3, openmpi-1.2.8 and swig 1.3.36. To use these packages,
add following line to your /etc/apt/sources.list:
deb http://nanolab.phys.msu.ru/files/python-meep/debs ./

then use 'apt-get update' and corresponding 'apt-get install' commands.
Amd64 binaries and generic debian-style repository are next goals.

More files:

http://nanolab.phys.msu.ru/files/python-meep/tests.tar.gz - tests in
python, can be used as a reference to write your own scripts

http://nanolab.phys.msu.ru/files/python-meep/swig.tar.gz
http://nanolab.phys.msu.ru/files/python-meep/swig-mpi.tar.gz - source
files for swif, if you want to compile binding on your own

http://nanolab.phys.msu.ru/files/python-meep/python-meep-0.1.linux-i686.tar.gz
http://nanolab.phys.msu.ru/files/python-meep/python-meep-mpi-0.1.linux-i686.tar.gz
- binary binding files (system-wide paths). Untar files without paths
into current directory, if you don't want to make them system-wide
available (they will be available only for scripts in current
directory).

All techical questions about web-site and availability of files should
be adressed to tsema at nanolab dot ru. BTW, previous release moved to
http://nanolab.phys.msu.ru/files/python-meep.old/

With best regards,
Nizamov Shawkat

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


[Meep-discuss] Ответ: FIELD

2009-01-26 Thread Nizamov Shawkat
Hi!

You are looking the wrong way. To initialize fields from some preset
value you should use field.initialize_field() function. There are two
examples on using this function in C++ under the tests subdirectory in
meep source - cylindrical.cpp and one_dimensional.cpp. Don't know if
it is also implemented in libctl interface.

WBR,
Nizamov Shawkat






2009/1/26, Michal Martinů :
> Hello,
>
> please help me. I would like to start my Meep computing with initialized
> magnetic field
> and I do not know, how to do it. I do not understand this:
> http://ab-initio.mit.edu/wiki/index.php/Meep_field-function_examples
> I can translate Hx, Hy (intenzity of magnetic field) from static
> 2D analyses from another software to some file. What format of data
> should I to translate it to?
>
> Michal
>
> P.S.My Rachnaninov Prelude C#-minor can be listen to as present for you
> http://www.free-motor.org/musics.htm
>
>

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] Meep using mpi in Ubuntu Dapper

2009-01-22 Thread Nizamov Shawkat
2009/1/23 Nathan 

> Hello list,
>
> I am trying to install meep on a linux cluster running Ubuntu 6,
> (Dapper).  Meep isn't in the repositories, so I need to compile itfrom
> the source.  My problem is getting the --with-mpi flag to work.  I have
> installed the Dapper implementation of mpich-bin and verified that all
> of the libraries are installed.  When I run
> ./configure --with-mpi ...  I get the following errors
> checking for mpic++..no
> checking for mpiCC.no
> checking for mpicxx no
> checking for hcpno
> checking for mpxlCno
> checking for mpxlC_rno
> checking for cmpic++...no
> checking for MPI_Initno
> checking for MPI_Init in -lmpi ...no
> checking for MPI_Init in -lmpich ...no
> configure: error: could not find mpi library for --with-mpi
>
> Is there another mpi package I need install?  Or do I need to set a flag
> somewhere?
>


You should install -dev packages for your choice of MPI - e.g libmpich-dev,
lam4-dev, openmpi-dev, with corresponding library. On 6.06 they may have
slightly different names.
There is another choice to build mpi - download source paskages for newer
ubuntu distro's and rebuild them for older (backporting) - look for pbuilder
and prevu packages - they do it almost automagically.

WBR
Nizamov SHawkat
___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Re: [Meep-discuss] MPI efficiency

2009-01-12 Thread Nizamov Shawkat
source for python script - it is not equivalent to 1.ctl

#!/usr/bin/python
import meep
import getopt
import sys

m=meep.MPI(sys.argv)
if meep.my_rank()==0:
print 'Count processors:', meep.count_processors(), 'My rank is',
meep.my_rank()

class epsilon(meep.Callback):
def __init__(self,inner_eps=1.0,outer_eps=1.0):
meep.Callback.__init__(self)
self.inner_eps=inner_eps
self.outer_eps=outer_eps
def eps(self,vec):
if
abs(vec.y()-4)<=0.5:

return
self.inner_eps


else:

return
self.outer_eps


vl=meep.vol2d(16,8,10)
eps=epsilon(12)
meep.setCallback(eps.__disown__())
pml=meep.pml(1.0)

#st=meep.structure(vl,meep.EPS,pml)
st=meep.structure(vl,meep.EPS,pml, meep.identity(),2)

fl=meep.fields(st)
sr=meep.continuous_src_time(0.15)
r_pos=meep.vec(1.0,4.0)
fl.add_point_source(meep.Ey,sr,r_pos)
fl.output_hdf5(meep.Dielectric,vl.interior())
while fl.t<=1:
fl.step()
print m.xxx.elapsed_time()
___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

[Meep-discuss] MPI efficiency

2009-01-12 Thread Nizamov Shawkat
Dear Meep users !

Lately I was trying to implement pythonic interface for libmeep. My current
goal is enabling mpi feature of libmeep in python scripts. While enabling
mpi is as straight as just calling mpi_init with correct arguments, the
actual mpi acceleration do not meet my expectations. I did some tests with
meep-mpi and c++ tasks also and found that the results are essentially the
same - mpi efficiency is lower than expected.  For mpich the overall
calculation speed on dual-core pentium was actually slower than on single
core (mpi interconnection took way too much time). With openmpi, things got
better. My simple tests, performed with meep-mpi (scheme), c++ compiled
testfiles (available in meep source) and pythonic interface all show approx
20-30% acceleraton (at best, 40% in time stepping code, see below) comparing
dual-core pentium to single-core on the same PC. My  expectation for such
SMP system was much higher - about 75-80%

So the first question is - what mpi efficiency do you observe on your
systems? Can someone provide simple benchmark (ctl preferred), which do not
take hours to run on desktop PC and clearly demonstrates advantage of mpi?

Next question - there is a special argument - num_chunks in class structure.
Is it supposed to be the number of available processor cores, so that
calculation domain optimally split among nodes ?

And the last - Are there any hints for using meep with mpi support ?

With best regards
Nizamov Shawkat





Supplementary:

> cat 1.ctl
(set! geometry-lattice (make lattice (size 16 8 no-size)))
(set! geometry (list
(make block (center 0 0) (size infinity 1 infinity)
  (material (make dielectric (epsilon 12))
(set! sources (list
   (make source
 (src (make continuous-src (frequency 0.15)))
 (component Ez)
 (center -7 0
(set! pml-layers (list (make pml (thickness 1.0
(set! resolution 10)
(run-until 2000
   (at-beginning output-epsilon)
   (at-end output-efield-z))


> mpirun -np 1 /usr/bin/meep-mpi 1.ctl
Using MPI version 2.0, 1 processes
---
Initializing structure...
Working in 2D dimensions.
 block, center = (0,0,0)
  size (1e+20,1,1e+20)
  axes (1,0,0), (0,1,0), (0,0,1)
  dielectric constant epsilon = 12
time for set_epsilon = 0.054827 s
---
creating output file "./1-eps-00.00.h5"...
Meep progress: 230.95/2000.0 = 11.5% done in 4.0s, 30.6s to go
on time step 4625 (time=231.25), 0.000865026 s/step
Meep progress: 468.55/2000.0 = 23.4% done in 8.0s, 26.2s to go
on time step 9378 (time=468.9), 0.000841727 s/step
Meep progress: 705.8/2000.0 = 35.3% done in 12.0s, 22.0s to go
on time step 14123 (time=706.15), 0.000843144 s/step
Meep progress: 943.35/2000.0 = 47.2% done in 16.0s, 17.9s to go
on time step 18874 (time=943.7), 0.000841985 s/step
Meep progress: 1181.4/2000.0 = 59.1% done in 20.0s, 13.9s to go
on time step 23635 (time=1181.75), 0.00084028 s/step
Meep progress: 1418.85/2000.0 = 70.9% done in 24.0s, 9.8s to go
on time step 28384 (time=1419.2), 0.000842386 s/step
Meep progress: 1654.05/2000.0 = 82.7% done in 28.0s, 5.9s to go
on time step 33088 (time=1654.4), 0.000850374 s/step
Meep progress: 1891.5/2000.0 = 94.6% done in 32.0s, 1.8s to go
on time step 37837 (time=1891.85), 0.000842369 s/step
creating output file "./1-ez-002000.00.h5"...
run 0 finished at t = 2000.0 (4 timesteps)

Elapsed run time = 33.9869 s

> mpirun -np 2 /usr/bin/meep-mpi 1.ctl
Using MPI version 2.0, 2 processes
---
Initializing structure...
Working in 2D dimensions.
 block, center = (0,0,0)
  size (1e+20,1,1e+20)
  axes (1,0,0), (0,1,0), (0,0,1)
  dielectric constant epsilon = 12
time for set_epsilon = 0.0299381 s
---
creating output file "./1-eps-00.00.h5"...
Meep progress: 328.85/2000.0 = 16.4% done in 4.0s, 20.4s to go
on time step 6577 (time=328.85), 0.00060946 s/step
Meep progress: 656.1/2000.0 = 32.8% done in 8.0s, 16.4s to go
on time step 13123 (time=656.15), 0.000611187 s/step
Meep progress: 985.9/2000.0 = 49.3% done in 12.0s, 12.4s to go
on time step 19719 (time=985.95), 0.000606462 s/step
Meep progress: 1315.1/2000.0 = 65.8% done in 16.0s, 8.3s to go
on time step 26302 (time=1315.1), 0.000608525 s/step
Meep progress: 1644.95/2000.0 = 82.2% done in 20.0s, 4.3s to go
on time step 32911 (time=1645.55), 0.000605277 s/step
Meep progress: 1975.0/2000.0 = 98.8% done in 24.0s, 0.3s to go
on time step 39512 (time=1975.6), 0.000606022 s/step
creating output file "./1-ez-002000.00.h5"...
run 0 finished at t = 2000.0 (4 timesteps)

Elapsed run time = 24.57 s


For python script:
(skipped harmless warnings like   [ubuntu:24234] mca: base: component_find:
unable to open osc pt2pt: file not found (ignored))


> mpirun -np 1 ./test-tut1-mpi.py
Using MPI version 2.0, 1
processes
Count processors: 1 My rank is
0
ti

Re: [Meep-discuss] MEEP-0.20.3

2009-01-07 Thread Nizamov Shawkat
2009/1/7 Michal Martinů 

>  *Please*, can anybody help me?
>
> * *
>
> *configure* script of meep-0.20.3 does not create Makefile
>
> *from Makefile.in file and I do not know why.*
>
> *Under newest Cygwin.*
>
> *   I can not to compile and install it.*
>
> *What* stall I do? Thank you.
>
> * *
>
> *Michal Martinů*
>
> *   Czech Republic*
>

Please, provide specific details !
What is the output of configure script ? It will not create a makefile,
until all build requirements satisfied.  Most probably, you didn't install
something essential.

With respect,
Nizamov Shawkat
___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

[Meep-discuss] Python interface for libmeep-0.20-3 released !

2008-12-23 Thread Nizamov Shawkat
Dear Meep users !

Research team at nanolab.phys.msu.ru (Moscow State University, Physics 
department) uses Meep for different simulations. As a side-effect of 
researches, we created python interface for libmeep (current version - 
0.20-3, also available for legacy 0.10-2) using SWIG. Currently, it is 
in the alpha state and not recommended for actual simulations, presented 
for testing and as a proof-of-concept. Hopefully, in the case of public 
interest in pythonic interface for libmeep, we will continue our efforts 
and offer Meep community a simpler way for simulations, that do not 
require C++ or Scheme experience.  The license is the same as for Meep 
itself, so it is GPL.

Unfortunately, even fresh Ubuntu release (8.10) and soon to be released 
Debian Lenny contain the legacy 0.10 version of Meep. Packages with 
current version 0.20-3 were backported for Ubuntu 8.10 and are also 
available at our site. Most probably, they can also be installed in 
Debian Lenny and Ubuntu 8.04. At least, backporting of Meep-0.20-3 for 
them is not difficult and may be performed on demand.

To use this packages, add following line to your /etc/apt/sources.list:
deb http://nanolab.phys.msu.ru/files/python-meep/intrepid-debs ./

then use 'apt-get update' and 'apt-get install meep' (or 'apt-get 
install libmeep2' for library only). MPI-version is also available 
(untested!).

Python interface is in 
http://nanolab.phys.msu.ru/files/python-meep/python-meep.tar.gz. This 
file also contains two simple tests, analogical to first two tests in 
Meep tutorial (simple waveguide and bent waveguide, 
http://ab-initio.mit.edu/wiki/index.php/Meep_Tutorial). Obtained 
simulation results are similar to these mentioned tutorials, but 
resulting png's are somewhat distorted (compared to those on Meep 
web-site).

Untar it, and look at test scripts for reference. C++ classes, methods, 
constants names, etc are mostly preserved. Following is the simplest 
waveguide simulation with comments (using "from meep import *" much 
shorter and cleaner script can be obtained, but AFAIK it is not 
generally recommended) :

#!/usr/bin/env python
import meep

class epsilon(meep.Callback):
def __init__(self,inner_eps=1.0,outer_eps=1.0):
meep.Callback.__init__(self)
self.inner_eps=inner_eps
self.outer_eps=outer_eps
def test(self):
print 'test message'
print 'our material class can have own functions and variables !'
def eps(self,vec):
# this is our material distribution - for any Y in range 3.5-4.5 
=> width=1 , indefinitely long along the X
if abs(vec.y()-4)<=0.5:
return self.inner_eps
else:
return self.outer_eps

# create a volume, x=16 cells, y=8 cells, resolution = 10
vl=meep.vol2d(16,8,10)
#origin is in the corner, but we can change it by calling vl.shift_origin

#set our material function as callable from libmeep
eps=epsilon(12)
meep.setCallback(eps.__disown__())

# create a perfect matching layer, 1 cell deep
pml=meep.pml(1.0)

# meep.EPS is our pointer to our callback material function
# this hack allows only 1 callback function at any given time
 
st=meep.structure(vl,meep.EPS,pml)

# initialize simulation, populate initial values
fl=meep.fields(st)

# create a point source, take care about pml !
sr=meep.continuous_src_time(0.15)
r_pos=meep.vec(1.0,4.0)
fl.add_point_source(meep.Ey,sr,r_pos)
# of course,  we could also write fl.add_point_source(meep.Ey, 
meep.continuous_src_time(0.15), meep.vec(1.0,4.0) )

# let's see what we have
fl.output_hdf5(meep.Dielectric,vl.interior())

#let the simulation start
while fl.t<=1000:
fl.step()

# what is the magnetic field distribution at the end?
fl.output_hdf5(meep.Hz,vl.surroundings())

# get_field can be used to determine value of specified fields at any point
print fl.get_field(meep.Hz,meep.vec(2,4.2))


I should note, that MPI is not tested and fl.get_eps() breaks for 
unknown reason. Of course, there could be other unnoticed bugs and 
shortcomings.
Please, do not hesitate to contact me for questions and suggestions. 
With technical questions about nanolab.phys.msu.ru contact Boris Tsema 
(tsema at nanolab.phys.msu.ru).

This work was at least partially supported by Russian Foundation for 
Basic Research, grant #08-02-90902mob_sng_st.


With best regards,
Nizamov Shawkat

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] h5 file size

2008-10-03 Thread Nizamov Shawkat
Szymon Lis:
> Hi,
>
> I'm trying 3d modeling. And my h5 file is quite huge. (50GB or more). So I 
> don't have enough disk space for it. Is some method to make this files 
> smaller? I also wandering that maybe I have some mistake in my code. Has 
> anyone similar problem?
>
> Thank you.
> Szymon
>   

Check if the following is applicable for you:
http://ab-initio.mit.edu/wiki/index.php/Meep_Tutorial#Output_tips_and_tricks

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] Need to install Meep

2008-09-19 Thread Nizamov Shawkat

> First, I am not a physicist - I am a comp sysadmin.  Which means, I have 
> no idea (nor concerns) about what the program does :-)
>
> Q1: where to install?
> We have a "general use" linux box which provides shell access.  The vast 
> majority of folks use it for pine (upwards of 50 simultaneous users). 
> It does have Xwindows for folks running a Xwin server (such as Xwin). 
> We also have a student lab with computers running linux (ubuntu w/ 
> gnome).  My main concerns are the resources used on the computer: if it 
> is CPU/memory instensive, I'd rather not have it on the shared resource 
> system.
>
>   

Meep is computer simulation software and is _very_ CPU/memory intensive,
it will consume every free CPU cycle and demand even more :)
Using meep on shared system will slow down everything.

> Q2: doing the install?
> Looking at http://ab-initio.mit.edu/wiki/index.php/Meep_download 
> indicates we can do apt-get to install the package, but I assume we need 
> to point to a repository?
>
>   
Meep is in "universe" section of ubuntu repository, you should just 
enable it.
No need for third-party repositories.

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss