moh'd tarek hammad | 12 Nov 2000 19:59

RE: mpb-discuss digest, Vol 1 #45 - 1 msg


help:
when I tried to install your provided software mpb using linux I found it
difficult to setup as it always gave me an error message "lost files" or
"link error" or "compilation error".
I used several copies of linux: (Mandrake linux, red hat linux, turbo
linux ) and the result was always the same.
Any usefull ideas.
Thank you.

Steven G. Johnson | 13 Nov 2000 01:31
Picon

Re: Installation problems

On Sun, 12 Nov 2000, moh'd tarek hammad wrote:
> help: when I tried to install your provided software mpb using linux I
> found it difficult to setup as it always gave me an error message
> "lost files" or "link error" or "compilation error". I used several
> copies of linux: (Mandrake linux, red hat linux, turbo linux ) and the
> result was always the same. Any usefull ideas. Thank you.

You don't really give enough information for me to diagnose your problem.  
Have you read the installation section of the manual?  Usually, MPB
installation problems fall into two categories: (1) you haven't installed
the required libraries; or (2) you've installed them, but the compiler
can't find them because you put them in a nonstandard location and the
compiler didn't know where to look.  Both of these issues are covered in
detail by the manual.

Steven

Theis Peter Hansen | 20 Nov 2000 18:11
Picon
Picon

Precission of calculated frequencies

Hi,

I am currently using your software to investigate the birefringence of a
crystal fiber design. To do this I need the difference between the modal
indices of the orthogonal modes. But as the program only outputs 6
significant digits of the eigenfrequencies I get hit by cancellation. Is
there any way to increase the number of digits? I tried to change %g to
%10g in the appropriate printf() call, but without success.

Would it be easier, or more "correct", to make these calculations from
my control-file? And how would I do this, when I need the birefringence
for a whole range of k-points.

Regards,

Theis P. Hansen

Steven G. Johnson | 20 Nov 2000 21:12
Picon
Favicon

Re: Precision of calculated frequencies

> I am currently using your software to investigate the birefringence of a
> crystal fiber design. To do this I need the difference between the modal
> indices of the orthogonal modes. But as the program only outputs 6
> significant digits of the eigenfrequencies I get hit by cancellation. Is
> there any way to increase the number of digits? I tried to change %g to
> %10g in the appropriate printf() call, but without success.

This just pads the numbers with spaces.  To add more digits in C, you
would do %0.10g. However...

> Would it be easier, or more "correct", to make these calculations from
> my control-file? And how would I do this, when I need the birefringence
> for a whole range of k-points.

I would certainly recommend doing these calculations from your control
file; all of the significant digits are available there, and this way
it will still work when you upgrade MPB to new and improved versions
(e.g. for the exciting dancing paperclip icon that users have demanded).

To call a function for each k-point, you should just define a band
function and pass it to (run).  The band functions are called for
*each band* at each k-point, so if you want to do something only once
per k, your function should just execute on the first band, or
something.  For example, here is a function to print the difference
between the 2nd and 3rd bands at each k:

(define (print-freq-diff b)
  (if (= b 1)
    (display-many "freq. diff at " current-k " = "
      (- (list-ref freqs 2) (list-ref freqs 1)) "\n")))
(Continue reading)

Christopher McKinney | 28 Nov 2000 22:49
Favicon

Difficulty with installation

Hello,

I am trying to install the MPB package. I have (I believe) installed all
the necessary libraries - BLAS, LAPACK, etc.). However, when I run
./configure to begin the final installation step, several of the libraries
are not regonized. Because of this, running "make" doesn't work either (the
process crashes because several variables are reference but undefined when
"blasglue.o" in src/matrices/matrices.a tries to run (they all begin with
the letter z if that has any relevance).

Below I have attached relevant enviroment variable definitions, the results
of my attempt to run configure, and the directory of /usr/local/lib on my
machine. I have also attached the results of "make" if anyone feels that
information might be important.

Thank you in advance for any assistance you might offer.

Christopher McKinney
cmckinne <at> ucsd.edu
(858) 534-0021  

**************************************************************
RELEVANT ENV VARIABLE DEFINITIONS

CPPFLAGS=-I/usr/local/include
LDFLAGS=-L/usr/local/lib
LD_LIBRARY_PATH=/usr/local/lib

RESULT OF "./config" IN THE DIRECTORY "~/pbgsim/mpb-0.12"

(Continue reading)

Dale Fried | 29 Nov 2000 21:36

multiprocessing

Hi

In the absence of full multiprocessor support for MPB, I'm looking for a  way to parallelize my scheme ctl files.  In particular, I'm envisioning a function such as "(parallellize t1 t2 t3 ...)" where each "t1" argument is a thread.  In the absence of multiple processors, the command would simply evaluate as "(map eval (list t1 t2 t3 ...))".

Have you written anything that does something like this?  Any suggestions for me as I delve into this?  Should I expect problems having multiple "(run)"'s called from the same script at the same time?

Thanks.

-Dale

--  Dr. Dale Fried Research & Development Engineer Clarendon Photonics 100 Boylston Street, suite 724 Boston, MA  02116 617-350-7504 x25 617-350-7052 (fax) fried <at> clarendonphotonics.com  
Cosimo Caraglia | 30 Nov 2000 09:03
Picon

*h5 files

Hello,

I think I've got some troubles with matrixio.
At the first time I tried... I got almost everything properly, now there is
something missed:
for example after running mpb *.ctl> *.out, I don't get any *.h5 file.

Someone has advices ?

Thank you,

Cosimo

Steven G. Johnson | 30 Nov 2000 17:18
Picon

Re: *h5 files

On Thu, 30 Nov 2000, Cosimo Caraglia wrote:
> I think I've got some troubles with matrixio. At the first time I
> tried... I got almost everything properly, now there is something
> missed: for example after running mpb *.ctl> *.out, I don't get any
> *.h5 file.

Probably, it didn't find the HDF5 library when you configured MPB (in
which case it disables HDF5 file output).   When you ran ./configure, it
should have included a line like:

checking for H5Pcreate in -lhdf5... yes

If it didn't, then either you haven't installed HDF5 or you've installed
it in a place that the compiler doesn't look.  See the installation
section of the manual for more information on setting up your installation
paths correctly.

Steven

Steven G. Johnson | 30 Nov 2000 17:41
Picon

Re: Difficulty with installation

On Tue, 28 Nov 2000, Christopher McKinney wrote:
> I am trying to install the MPB package. I have (I believe) installed all
> the necessary libraries - BLAS, LAPACK, etc.). However, when I run
> ./configure to begin the final installation step, several of the libraries
> are not regonized. Because of this, running "make" doesn't work either (the
> process crashes because several variables are reference but undefined when
> "blasglue.o" in src/matrices/matrices.a tries to run (they all begin with
> the letter z if that has any relevance).

Hi Christopher,

I suspect that it's getting confused because you are using the GNU C
compiler (gcc) with the Sun Fortran compiler (f77), and the configure
script may not be able to figure out how to link gcc-compiled C code with
f77-compiled Fortran code.  Try forcing it to use the Sun C compiler (cc),
by setting the CC environment variable to "cc" (then 'make distclean' and
re-configure and re-make).

(In general, if you want to know why a particular configure test fails,
you can look at the config.log file.)

Steven

PS. It's my fault that it uses f77 with gcc.  I set up the configure
script to prefer the vendor Fortran compiler, since it was probably used
to compile BLAS/LAPACK/etcetera, but I probably should have made it prefer
the vendor cc as well.

PPS. I will be in Australia for the next week, so I probably won't be
responding to email.

Steven G. Johnson | 30 Nov 2000 17:55
Picon

Re: multiprocessing

On Wed, 29 Nov 2000, Dale Fried wrote:
> Have you written anything that does something like this?  Any
> suggestions for me as I delve into this?  Should I expect problems
> having multiple "(run)"'s called from the same script at the same time?

Yes, the run function is not re-entrant, so it will not work if you call
it from multiple threads in parallel.  My plan was to parallelize MPB
using MPI, in which each process has a separate address space.   The
easiest way would be for them all to interpret the ctl file in
parallel; another alternative would be a master-slave model in which 
the slave processes sit around waiting for messages from the master
process.

In the meantime, one thing you could do is to just run multiple instances
of mpb.  This need not be as inconvenient as it sounds; in fact, you could
support semantics very similar to the ones you envision for your
"parallelize" function.  The parallelize function could depend upon two
global variables (via define-param) "np" (the number of processes) and
"ip" (the index of the current CPU), and execute only the corresponding
portion of the work.  You would then write a simple three-line wrapper
script around mpb that would call it multiple times with different values
of ip in parallel, concatenating the results.  The drawback of this scheme
is that the different processes couldn't communicate with one another
(easily).

Steven

PS. I'll be gone for the next week in Australia, so I probably won't be
responding to email.


Gmane