CosmoMC compilation problem, G5/XLF

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
Hiranya Peiris
Posts: 54
Joined: September 28 2004
Affiliation: University College London

CosmoMC compilation problem, G5/XLF

Post by Hiranya Peiris » August 13 2005

Hi,

I am trying to compile CosmoMC on a G5/Tiger environment with the IBM XLF compiler. I get the following error when trying to compile propose.f90 (see below, its long).

You can see my compile command below as well.

Has anyone encountered this before? I have modified CosmoMC to add parameters, but I haven't touched propose.f90.

Thanks a lot!

Cheers
Hiranya

[nefertiti:COSMOMC_JUL05/source] hiranya% make all
/opt/ibmcmp/xlf/8.1/bin/xlf90 -qsuffix=f=f90:cpp=F90 -qthreaded -O3 -qstrict -qarch=auto -qtune=auto -qunroll=auto -framework Accelerate -I../CAMB_JUL05_WIPP_INTERPOL -lessl -c propose.f90
** propose === End of Compilation 1 ===
EXCEPTION terminates program: no handler for exception.
Exception of type: SIGBUS 10 at 0005BBE0. Regs:
0005BBB4 BFFFE930 00405010 00000000 BFFFE9D8 00000002 00051AEC 0005BA3C
00000002 0041E000 00297BDC 0016CE50 9011DEC0 00000000 002EEB40 00000000
00294388 00000000 00000000 0000000B 00000000 00000000 BFFFEC20 00000012
002764D0 0025D56C 0005B394 0000049F 00000000 00000000 0040C84C 0005BB60
resume: cr: lr: ctr: xer: fpscr: msr: mq:
00000000 44042278 0005BBB4 00000000 00000000 82020000 0000D930 00000000
Traceback:
Line ? Disp 0005BBE0 ??? Dsa: BFFFE930
Line ? Disp 00144F00 ??? Dsa: BFFFE9C0
Line ? Disp 001446CC ??? Dsa: BFFFEA30
Line ? Disp 000B89B0 ??? Dsa: BFFFEAF0
Line ? Disp 000A1254 ??? Dsa: BFFFEB70
Line ? Disp 000A27C0 ??? Dsa: BFFFEC60
Line ? Disp 000A29DC ??? Dsa: BFFFECC0
Line ? Disp 00188DC0 ??? Dsa: BFFFED90
Line ? Disp 001891D8 ??? Dsa: BFFFEE30
Line ? Disp 00188848 ??? Dsa: BFFFEED0
Line ? Disp 00145AB4 ??? Dsa: BFFFEF50
Line ? Disp 0004A828 ??? Dsa: BFFFEFF0
Line ? Disp 000AF2E8 ??? Dsa: BFFFF090
Line ? Disp 0004BEB0 ??? Dsa: BFFFF110
Line ? Disp 0004C2E0 ??? Dsa: BFFFF170
Line ? Disp 0000214C ??? Dsa: BFFFF220
Line ? Disp 00001C0C ??? Dsa: BFFFF2E0
--- End of call chain ---
1501-511 Compilation failed for file propose.f90.
make: *** [propose.o] Error 217

Andrew Jaffe
Posts: 7
Joined: September 25 2004
Affiliation: Imperial College

Re: CosmoMC compilation problem, G5/XLF

Post by Andrew Jaffe » August 13 2005

Hiranya et al,
Hiranya Peiris wrote: I am trying to compile CosmoMC on a G5/Tiger environment with the IBM XLF compiler. I get the following error when trying to compile propose.f90.
I get the same error, on a powerbook G4, with the old, free, beta version of XLF. But looking on the XLF web page, they say that they do not support OS X Tiger, so that could be the problem.

Has ayone else managed it with XLF or anything else on OS X?

Andrew

Hiranya Peiris
Posts: 54
Joined: September 28 2004
Affiliation: University College London

CosmoMC compilation problem, G5/XLF

Post by Hiranya Peiris » August 13 2005

Hi Andrew,

I got it to work under Tiger (but I have the commercial 8.1 version).

Install the update at:

http://www-1.ibm.com/support/docview.ws ... wg24009766

I also had to modify my compile command:

#IBM XL Fortran, single-processor
F90C = /opt/ibmcmp/xlf/8.1/bin/xlf90
FFLAGS = -WF,-DIBMXL -qsuffix=f=f90:cpp=F90 -O3 -qstrict \
-qarch=auto -qtune=auto -qunroll=auto -framework Accelerate
INCLUDE = -I../CAMB_JUL05_WIPP_INTERPOL #-lessl
#LAPACKL =

Hope this helps,
Hiranya

Pablo Fosalba
Posts: 29
Joined: September 25 2004
Affiliation: Institut d'Estudis Espacials de Catalunya
Contact:

Re: CosmoMC compilation problem, G5/XLF

Post by Pablo Fosalba » August 18 2005

Hiranya Peiris wrote:Hi,

I am trying to compile CosmoMC on a G5/Tiger environment with the IBM XLF compiler. I get the following error when trying to compile propose.f90 (see below, its long).

You can see my compile command below as well.

Has anyone encountered this before? I have modified CosmoMC to add parameters, but I haven't touched propose.f90.

Thanks a lot!

Cheers
Hiranya

[nefertiti:COSMOMC_JUL05/source] hiranya% make all
/opt/ibmcmp/xlf/8.1/bin/xlf90 -qsuffix=f=f90:cpp=F90 -qthreaded -O3 -qstrict -qarch=auto -qtune=auto -qunroll=auto -framework Accelerate -I../CAMB_JUL05_WIPP_INTERPOL -lessl -c propose.f90
** propose === End of Compilation 1 ===
EXCEPTION terminates program: no handler for exception.
Exception of type: SIGBUS 10 at 0005BBE0. Regs:
0005BBB4 BFFFE930 00405010 00000000 BFFFE9D8 00000002 00051AEC 0005BA3C
00000002 0041E000 00297BDC 0016CE50 9011DEC0 00000000 002EEB40 00000000
00294388 00000000 00000000 0000000B 00000000 00000000 BFFFEC20 00000012
002764D0 0025D56C 0005B394 0000049F 00000000 00000000 0040C84C 0005BB60
resume: cr: lr: ctr: xer: fpscr: msr: mq:
00000000 44042278 0005BBB4 00000000 00000000 82020000 0000D930 00000000
Traceback:
Line ? Disp 0005BBE0 ??? Dsa: BFFFE930
Line ? Disp 00144F00 ??? Dsa: BFFFE9C0
Line ? Disp 001446CC ??? Dsa: BFFFEA30
Line ? Disp 000B89B0 ??? Dsa: BFFFEAF0
Line ? Disp 000A1254 ??? Dsa: BFFFEB70
Line ? Disp 000A27C0 ??? Dsa: BFFFEC60
Line ? Disp 000A29DC ??? Dsa: BFFFECC0
Line ? Disp 00188DC0 ??? Dsa: BFFFED90
Line ? Disp 001891D8 ??? Dsa: BFFFEE30
Line ? Disp 00188848 ??? Dsa: BFFFEED0
Line ? Disp 00145AB4 ??? Dsa: BFFFEF50
Line ? Disp 0004A828 ??? Dsa: BFFFEFF0
Line ? Disp 000AF2E8 ??? Dsa: BFFFF090
Line ? Disp 0004BEB0 ??? Dsa: BFFFF110
Line ? Disp 0004C2E0 ??? Dsa: BFFFF170
Line ? Disp 0000214C ??? Dsa: BFFFF220
Line ? Disp 00001C0C ??? Dsa: BFFFF2E0
--- End of call chain ---
1501-511 Compilation failed for file propose.f90.
make: *** [propose.o] Error 217
Hi Hiranya and Andrew,

If it means any confort to you, I found the same bug when compiling with XLF free beta-version in a PowerBookG4. Couldn't figure out a way to fix this at that time.
So, any tips for xlf beta and G4 other than buying a license
are wellcome ;-)

Antony Lewis
Posts: 1498
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: CosmoMC compilation problem, G5/XLF

Post by Antony Lewis » March 30 2006

Here's some info from an IBM expert:


One of our customers encountered an internal compiler bug when he tried
to compile 64-bit version of CosmoMC on our IBM eServer Cluster 1600
(AIX 5.2, p690 nodes, POWER4 processors) using IBM XL Fortran Enterprise
Edition V9.1. This occcured in the module file propose.f90:

Code: Select all

mpxlf90_r -WF,-DIBMXL -qsmp=omp -qsuffix=f=f90:cpp=F90 -q64 -qessl -O3
-qstrict -qarch=pwr4 -qtune=pwr4 -qunroll=yes
-I../cfitsio/include
-I../Healpix_2.01/include
-I../wmap_likelihood -I../camb -lesslsmp
-llapack -c propose.f90
** propose   === End of Compilation 1 ===
1585-100  Internal compiler error -- please contact your service
representative.
1501-511  Compilation failed for file propose.f90.
gmake: *** [propose.o] Error 255
I doubt that this is similar to an error discussed in the CosmoCoffee
computers and sofware forum:

http://cosmocoffee.info/viewtopic.php?t=326

where compilation was done on a G5/Tiger environment with the IBM XLF
compiler V8.1. I didn't answer to this mail, because it requires
registration.

I studied this problem (CosmoMC Version March 2006 without WMAP3) and
found that the internal compiler error was caused by the matmul()
function in this statement:

Code: Select all

    tmp%P(params_used) =  tmp%P(params_used) + &
       sigmas * matmul (propose_matrix(:,slow_evecs), vec(1:num_slow))
which is in this if construct

Code: Select all

  if (has_propose_matrix) then
     vec = 0
     if (fast) then
       vec(1:num_fast) =  Rot_fast(:,i) * dist * propose_diag_fast
       tmp%P(fast_params_used) =  tmp%P(fast_params_used) + &
         sigmas(num_slow+1:num_slow+ num_fast) * matmul 
(propose_matrix_fast, vec(1:num_fast))
     else
       vec(1:num_slow) =  Rot_slow(:,i) * dist * propose_diag(slow_evecs)
       tmp%P(params_used) =  tmp%P(params_used) + &
          sigmas * matmul (propose_matrix(:,slow_evecs), vec(1:num_slow))
     end if
   else
....
in the subroutine UpdateParamsDirection(tmp, fast, dist,i) of
the propose.f90 module file.

The compiler can handle the matmul function in the if block
but not the mutmul function in the following else block.

However, this bug is partially fixed in V9.1 compiler, because
it occures only in 64-bit mode. Compilation of 32-bit
version of this module file succeeds. In the IBM XL Fortran Enterprise
Edition V10.1 for AIX this bug is fully fixed, because compilation
goes through both in 32- and 64-bit modes. Now our customer
is using this compiler version V10.1 and has succeeded to compile
the full package of CosmoMC (with WMAP3 also).

This is only for your information, because bug is corrected in
later versions of this compiler, but someone may have older
versions still in use.

Christophe Ringeval
Posts: 17
Joined: November 07 2004
Affiliation: Theoretical and Mathematical Physics Group, CP3, Louvain University
Contact:

Re: CosmoMC compilation problem, G5/XLF

Post by Christophe Ringeval » March 31 2006

ISo, any tips for xlf beta and G4 other than buying a license
are wellcome ;-)
Hi,
in propose.f90, in UpdateParamsDirection(tmp, fast, dist,i)
one might write this:

Code: Select all

real, dimension(:,:), allocatable :: propose_matrix_temp 
...
allocate(propose_matrix_temp(num_params_used, num_slow)) 
propose_matrix_temp(:,1:num_slow) = propose_matrix(:,slow_evecs(1:num_slow)) 
tmp%P(params_used) =  tmp%P(params_used) + & 
            sigmas * matmul (propose_matrix_temp(:,:), vec(1:num_slow)) 
deallocate(propose_matrix_temp) 

instead of:

Code: Select all

vec(1:num_slow) =  Rot_slow(:,i) * dist * propose_diag(slow_evecs) 
tmp%P(params_used) =  tmp%P(params_used) + &
            sigmas * matmul (propose_matrix(:,slow_evecs), vec(1:num_slow))
It is not really nice, but works on SP4.
Cheers,
Chris.

Maria Beltran
Posts: 2
Joined: November 23 2004
Affiliation: University of Chicago

CosmoMC compilation problem, G5/XLF

Post by Maria Beltran » March 31 2006

Hi,

I am using a IBM XL Fortran Enterprise Edition for PowerPC V7.1 for compiling the latest version of cosmoMC (march 2006).

The propose.f90 problem is solved, and I can compile allright everything.

However, when I run the code, it stops when it calls
PASS2_COMPUTE_LIKELIHOOD(cltt,clte,clee,clbb,like) from the
MAPLnLike(cl) function, in cmbdata.f90.
No errors reported or anything like that. Just stops running!

It sounds like an easy bug (and I hope it is!), but I have not been able to detect what is wrong.
Has anybody had any similar bug? Any ideas?

Cheers,
Maria

Post Reply