Installation of amrita

52 views
Skip to first unread message

Roger Mason

unread,
Dec 31, 2013, 9:04:55 AM12/31/13
to amrita...@googlegroups.com
Hello list,

I have installed AMRITAv3.05_R19-11-2011. Unfortunately it fails
thus:

amrita my.script
N/S boundaries improperly defined, check patch no. 2
cannot makefield: no boundary conditions!
cannot makefield: no boundary conditions!
cannot adapt: no boundary conditions!
cannot adapt: no field solution!
cannot makefield: no boundary conditions!
cannot makefield: no boundary conditions!
cannot adapt: no boundary conditions!
cannot adapt: no field solution!
cannot makefield: no boundary conditions!
cannot makefield: no boundary conditions!
***********************
Building Solver: roe_fl
***********************
creating Amrita bindings
compiling f77src/roe_fl
<<f77 on Linux/x86_32
>>
******************************************
Built: AMRSO/serial/Linux/x86_32/roe_fl.so
******************************************
cannot march: no boundary conditions!
cannot march: no field solution!
cannot march: no boundary conditions!
cannot march: no field solution!
cannot march: no boundary conditions!
cannot march: no field solution!
cannot march: no boundary conditions!
cannot march: no field solution!
cannot march: no boundary conditions!
cannot march: no field solution!

These are the steps I took to install amrita on an Arch Linux system.
Most, if not all of this is already documented in the mailing list,
but I think it may be useful to collect the steps in one place.

1. perlbrew switch perl-5.8.9
2. perl AMRITAv3.05_R19-11-2011 -unpack
3. eval `$HOME/AMRITA/AMRITAv3.05/tools/amrshell -setup bash`
4. Edit $AMRITA/SYSTEM/amrita.machines to contain 'default Linux/x86_32'
5. Edit $AMRITA/SYSTEM/Linux/x86_32 to contain:

$g77 = 'gfortran';
$gcc = 'gcc';
$gxx = 'g++';
$g2c = 'gfortran';

if($word eq '32') {
#$gcc = 'gcc'; # gcc-4.3 is broken!
}

6. ./AMRITAsystem -check all:

************************************
Testing: $AMRITA/SYSTEM/Linux/x86_32
************************************
syntax error at harness line 9, near "->callback qw(amrpp)"
Execution of harness aborted due to compilation errors.
syntax error at harness line 14, near "->callback qw(amrcc)"
syntax error at harness line 46, near "->callback qw(amrcc)"
syntax error at harness line 78, near "->callback qw(amrcc)"
syntax error at harness line 106, near "->callback qw(amrcc)"
....
Execution of harness aborted due to compilation errors.

The fix is to replace qw(...) with (qw(...)). These are all in
$AMRITA/SYSTEM/check/*/harness. In each subdir of check i did:

cp harness harness.orig
sed -i 's/qw(\(.*\))/(qw(\1))/g' harness

7. ./AMRITAsystem -check all:

************************************
Testing: $AMRITA/SYSTEM/Linux/x86_32
************************************
amrpp is broken
Can't locate object method "error_handler" via package "Amrita::SYSTEM"
at harness line 15.
Can't locate object method "error_handler" via package "Amrita::SYSTEM"
at harness line 12.
Can't locate object method "ARG" via package "Amrita::SYSTEM" at
/home/rmason/AMRITA/AMRITAv3.05/Amrita/Amrita/SYSTEM.pm line 870.
...

The fix is to change #! /usr/bin/perl in
$AMRITA/tools/{amrshell,amrperl} to:

/home/rmason/perl5/perlbrew/perls/perl-5.8.9/bin/perl

8. You may find ./AMRITAsystem -verbose -check amrld fails like this:

can't find libgfortran.a

On Arch linux it seems the static library is not provided (at least
with gcc 4.8.2; prior experience with 4.7.x did not produce this
error). After flapping around on this I downloaded and built the
subset of gcc 4.8.2 that provides gfortran:

mkdir -p gcc-build && cd gcc-build
../gcc-4.8.2/configure --disable-shared --enable-languages=fortran
make
make DESTDIR=/home/rmason/Software/gcc-final install
sudo cp ../gcc-final/usr/local/lib/libgfortran.a /usr/lib

9. amrmake amrita. Possibly you'll get 'src3p::origami failed!' at
the end. Make sure the file 'which-gcc' is correct and try again
using 'amrmake src3p::origami'. If something is still not working
use 'amrmake src3p::origami -verbose'. The output can be
redirected to a file if required. A failure here is usually
related to a missing libtermcap.a. On Arch Linux termcap is
available in the AUR.

Here is SYSTEM/Linux/x86_32/use/Termcap:

lib = termcap
ldir = /usr/lib /usr/lib/termcap

10. amrmake amrita. Possibly you'll get 'src3p::origami failed!'
because motif is not installed or some specific function is
missing from the version of motif that you have. On my Arch
system I elected not to install motif using the package manager
because of a conflict. Instead I installed motif-2.3.4 from
source. It is in /usr/local/lib/X11 and
/usr/local/include/{X11,Xm}. Here is SYSTEM/Linux/x86_32/use/Motif:

lib = Xm Xt Xext Xp X11 ncurses
ldir = /usr/local/lib/X11
inc = /usr/local/include/X11 /usr/local/include/Xm
ldir = /usr/lib/termcap

11. There was a problem with src3p::perl:

amrmake src3p::perl

Sanity Checks
Filter::amrita OK!
Compress::Zlib OK!
Inline:: BROKEN!
Inline::Python BROKEN!
Inline::Ruby BROKEN!
amrperl OK!

The fix is to cd src3p/perl/* then build each failed package
manually:

cd <package>\
perl Makefile.PL
make
su
make install
exit
(& repeat)

(su and exit are only necessary if you don't have write access to
the perl installation you are using).

I could not get successful compilation of Inline::Ruby with ruby
2.0.

12. Once 'amrmake amrita' completes without any failures:
a. amrmake site::fonts
If this fails install xlsfonts and try again.
b. amrmake site::images (might be slow)
c. amrmake site::cache (might be slow)
This downloads and installs items in $AMRITA/SITE/fonts etc.

13. Check correct functioning:
a. mkdir ~/AMRITA/TEST
b. cd ~/AMRITA/TEST
c. amrcp Chp2/my.script, then follow the instructions.
(gv must be installed).

On my system 'amrita my.script' fails as described at the top of this
long message. I have tried the installation with perl-5.10.1 and
gcc-4.7.x, with the same failure. In that attempt, Inline::Filter
failed in addition to Inline::Ruby. After the failed perl-5.10.1 +
gcc-4.8.2 installation I spent some time trying to pinpoint the
problem, without success.

If anyone can suggest how to proceed that would be most helpful. If
not, then at least my experience is documented for other amrita users.

Best wishes,
Roger

James Quirk

unread,
Dec 31, 2013, 11:36:59 AM12/31/13
to amrita...@googlegroups.com
Dear Roger,

Thank you for your detailed posting. The problems you are encountering
basically stem from backwards incompatibilities in third-party packages,
which I don't have the time to workaround at present. Or at least, I don't
have the stomach to address every foible in every Linux distribution under the sun.

The issues with migrating from Perl5.8 -> 5.10 -> 5.12 have been fixed
in my master AMRITA copy.  Ditto for gcc4.5 -> 4.6 -> 4.7, but I've not
yet looked at GCC4.8 . As regards Ruby, there's no reason to expect the
1.8 inline-glue to work with 2.0, for the major release has undoubtedly
changed much of Ruby's internals. 

Regarding how to proceed, we could iterate offline so as tweak my
master copy to make it more friendly towards your Arch linux,
but given my other commitments it is unlikely I could spare
the necessary time until near the end of January.

Best regards,

James




--
You received this message because you are subscribed to the Google Groups "amrita-ebook" group.
To unsubscribe from this group and stop receiving emails from it, send an email to amrita-ebook+unsubscribe@googlegroups.com.
To post to this group, send email to amrita...@googlegroups.com.
Visit this group at http://groups.google.com/group/amrita-ebook.
For more options, visit https://groups.google.com/groups/opt_out.

Roger Mason

unread,
Dec 31, 2013, 12:01:30 PM12/31/13
to amrita...@googlegroups.com
Dear James,

On 12/31/2013 01:06 PM, James Quirk wrote:
> Dear Roger,
>
> Thank you for your detailed posting. The problems you are encountering
> basically stem from backwards incompatibilities in third-party packages,
> which I don't have the time to workaround at present. Or at least, I don't
> have the stomach to address every foible in every Linux distribution
> under the sun.
I note that $AMRITA/SYSTEM contains an OSX directory. I have a couple
of (intel based) OSX machines. Would it be
worthwhile to attempt an install on those?
>
> The issues with migrating from Perl5.8 -> 5.10 -> 5.12 have been fixed
> in my master AMRITA copy. Ditto for gcc4.5 -> 4.6 -> 4.7, but I've not
> yet looked at GCC4.8 . As regards Ruby, there's no reason to expect the
> 1.8 inline-glue to work with 2.0, for the major release has undoubtedly
> changed much of Ruby's internals.
>
> Regarding how to proceed, we could iterate offline so as tweak my
> master copy to make it more friendly towards your Arch linux,
> but given my other commitments it is unlikely I could spare
> the necessary time until near the end of January.
>
Thank you, I appreciate your offer. I will contact you in about a month.

In the meantime, I wonder if it might be worthwhile to install whatever
distribution you use in a virtual machine.
That way I can be learning how to use amrita.

Best wishes,
Roger


James Quirk

unread,
Dec 31, 2013, 12:06:48 PM12/31/13
to amrita...@googlegroups.com
Roger,

A native OSX installation is not worth the effort, again owing to the vagaries
of third-party packages.  My current development setup, however, is an OSX 
machine where I run Ubuntu 12 and Mint 13 via virtual box. So the easiest
route would be to send you a virtual box appliance. I'll send you instructions
for how we might do this offline.

James






Best wishes,
Roger


Reply all
Reply to author
Forward
0 new messages