public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* What updates done after October 3 may affect gfortran built binaries?
@ 2011-11-09 12:15 Edvardsen Kåre
  2011-11-09 13:07 ` Marco Atzeri
  2011-11-15 15:54 ` [SOLVED] " Dave Korn
  0 siblings, 2 replies; 9+ messages in thread
From: Edvardsen Kåre @ 2011-11-09 12:15 UTC (permalink / raw)
  To: cygwin

This is again related to the failure of execution of a gfortran built
binary ("cannot execute binary", see thread
http://cygwin.com/ml/cygwin/2011-11/msg00034.html )

In short, the main problem is that I can't build a successful binary
from the FLEXPART fortran code (just google "FLEXPART nilu" if you are
curious of what FLEXPART is) on a cygwin installation I did just over a
week ago, but it builds and run without problem on an installation from
October 3. I get no differences in warnings from the bad build compared
to the good one, so I really don't know what to look for.

So far I have come to the conclusion that this must be related to one or
several changes in the cygwin distribution done after October 3. Through
try and failure testing I found that this is not affected by
gfortran/gcc as both gcc 4.3.4 and gcc 4.5.3 works. The latter hangs on
'$EGREP' calls in the 'grib_api' (required library) configure script,
but the workaround of changing to 'egrep' works fine.

I have posted the output from strace, objdump and cygcheck for some of
you to look at in the former thread, but it seem like this is far from a
straight forward problem.

I can see from the [ANNOUNCEMENT] posts that a few things in this cygwin
distro have been updated since October 3 and I kindly ask if someone
have an idea of what updates since then may cause a badly gfortran built
binary if it has nothing to do with gcc alone? 

I will now start going through the updates and change back to versions
yielding October 3 if possible. I think this is important since cygwin
will give the opportunity to run and develop FLEXPART on Windows
machines the way linux-users are used to. In addition, I also see a
potential problem of other fortran software that people want to run
under cygwin.

Regards,
Kåre

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What updates done after October 3 may affect gfortran built binaries?
  2011-11-09 12:15 What updates done after October 3 may affect gfortran built binaries? Edvardsen Kåre
@ 2011-11-09 13:07 ` Marco Atzeri
  2011-11-15 15:54 ` [SOLVED] " Dave Korn
  1 sibling, 0 replies; 9+ messages in thread
From: Marco Atzeri @ 2011-11-09 13:07 UTC (permalink / raw)
  To: cygwin

On 11/9/2011 1:15 PM, Edvardsen KÃ¥re wrote:
> This is again related to the failure of execution of a gfortran built
> binary ("cannot execute binary", see thread
> http://cygwin.com/ml/cygwin/2011-11/msg00034.html )
>
> In short, the main problem is that I can't build a successful binary
> from the FLEXPART fortran code (just google "FLEXPART nilu" if you are
> curious of what FLEXPART is) on a cygwin installation I did just over a
> week ago, but it builds and run without problem on an installation from
> October 3. I get no differences in warnings from the bad build compared
> to the good one, so I really don't know what to look for.
>
> So far I have come to the conclusion that this must be related to one or
> several changes in the cygwin distribution done after October 3. Through
> try and failure testing I found that this is not affected by
> gfortran/gcc as both gcc 4.3.4 and gcc 4.5.3 works. The latter hangs on
> '$EGREP' calls in the 'grib_api' (required library) configure script,
> but the workaround of changing to 'egrep' works fine.
>
> I have posted the output from strace, objdump and cygcheck for some of
> you to look at in the former thread, but it seem like this is far from a
> straight forward problem.
>
> I can see from the [ANNOUNCEMENT] posts that a few things in this cygwin
> distro have been updated since October 3 and I kindly ask if someone
> have an idea of what updates since then may cause a badly gfortran built
> binary if it has nothing to do with gcc alone?
>
> I will now start going through the updates and change back to versions
> yielding October 3 if possible. I think this is important since cygwin
> will give the opportunity to run and develop FLEXPART on Windows
> machines the way linux-users are used to. In addition, I also see a
> potential problem of other fortran software that people want to run
> under cygwin.
>
> Regards,
> KÃ¥re

my guess binutils
http://cygwin.com/ml/cygwin-announce/2011-10/msg00028.html

or some BLODA.

I downloaded the
http://zardoz.nilu.no/~flexpart/flexpart/flexpart_82-3.tar.gz

but it is not clear to me how to replicate your build.

  make -f makefile.gfs_gfortran_32

fails here:
---------------------------------------------------------------
$ make -f makefile.gfs_gfortran_32
gfortran -O2 -m32 -fconvert=little-endian -frecord-marker=4 
-I/nilu2/home/flexpart/lib/gfortran/include  -c -o writeheader.o 
writeheader.f
includecom:685.22:
     Included at writeheader.f:50:

       common /globalr/             ! REAL
                       1
Error: The equivalence set for 'pplev' cause an invalid extension to 
COMMON 'globalr' at (1)
......
---------------------------------------------------------------

Regards
Marco

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [SOLVED] Re: What updates done after October 3 may affect gfortran built binaries?
  2011-11-09 12:15 What updates done after October 3 may affect gfortran built binaries? Edvardsen Kåre
  2011-11-09 13:07 ` Marco Atzeri
@ 2011-11-15 15:54 ` Dave Korn
  2011-11-15 16:21   ` Ryan Johnson
  1 sibling, 1 reply; 9+ messages in thread
From: Dave Korn @ 2011-11-15 15:54 UTC (permalink / raw)
  To: cygwin

On 09/11/2011 12:15, Edvardsen KÃ¥re wrote:
> This is again related to the failure of execution of a gfortran built
> binary ("cannot execute binary", see thread
> http://cygwin.com/ml/cygwin/2011-11/msg00034.html )
> 
> In short, the main problem is that I can't build a successful binary
> from the FLEXPART fortran code 


  I helped Edvardsen to track this down off-list.  It turns out that FLEXPART
is one of those huge number-crunching Fortran programs that's just jam-packed
with ginormous multi-dimensional arrays.  The final linked executable had 3.38
GB of .bss space!  So, it's not too surprising that it didn't load on 32-bit
Windows; and it's not, as I was worrying, any explicit bug in the compiler or
binutils (although it may be arguable that ld could be helpful if it issued
some kind of warning in these circumstances).

    cheers,
      DaveK

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [SOLVED] Re: What updates done after October 3 may affect gfortran built binaries?
  2011-11-15 15:54 ` [SOLVED] " Dave Korn
@ 2011-11-15 16:21   ` Ryan Johnson
  2011-11-15 22:55     ` Dave Korn
  0 siblings, 1 reply; 9+ messages in thread
From: Ryan Johnson @ 2011-11-15 16:21 UTC (permalink / raw)
  To: cygwin

On 15/11/2011 10:53 AM, Dave Korn wrote:
> On 09/11/2011 12:15, Edvardsen KÃ¥re wrote:
>> This is again related to the failure of execution of a gfortran built
>> binary ("cannot execute binary", see thread
>> http://cygwin.com/ml/cygwin/2011-11/msg00034.html )
>>
>> In short, the main problem is that I can't build a successful binary
>> from the FLEXPART fortran code
>
>    I helped Edvardsen to track this down off-list.  It turns out that FLEXPART
> is one of those huge number-crunching Fortran programs that's just jam-packed
> with ginormous multi-dimensional arrays.  The final linked executable had 3.38
> GB of .bss space!  So, it's not too surprising that it didn't load on 32-bit
> Windows; and it's not, as I was worrying, any explicit bug in the compiler or
> binutils (although it may be arguable that ld could be helpful if it issued
> some kind of warning in these circumstances).
Out of curiosity, how then was the OP ever able to make *any* version run?

Ryan


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [SOLVED] Re: What updates done after October 3 may affect gfortran built binaries?
  2011-11-15 16:21   ` Ryan Johnson
@ 2011-11-15 22:55     ` Dave Korn
  0 siblings, 0 replies; 9+ messages in thread
From: Dave Korn @ 2011-11-15 22:55 UTC (permalink / raw)
  To: cygwin

On 15/11/2011 16:20, Ryan Johnson wrote:
> On 15/11/2011 10:53 AM, Dave Korn wrote:
>> On 09/11/2011 12:15, Edvardsen KÃ¥re wrote:
>>> In short, the main problem is that I can't build a successful binary
>>> from the FLEXPART fortran code

>> FLEXPART is one of those huge number-crunching Fortran programs that's
>> just jam-packed with ginormous multi-dimensional arrays. The final linked
>> executable had 3.38 GB of .bss space!

> Out of curiosity, how then was the OP ever able to make *any* version run?

  Not clear yet but probably owing to changes in one or more of the array
dimensions in the upstream source that he didn't notice taking place.

    cheers,
      DaveK


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What updates done after October 3 may affect gfortran built binaries?
@ 2011-11-10  9:55 Edvardsen Kåre
  0 siblings, 0 replies; 9+ messages in thread
From: Edvardsen Kåre @ 2011-11-10  9:55 UTC (permalink / raw)
  To: cygwin


> Thanx a lot, Marco for takng time!
> 
> In order to replicate my build you need to install latest version of the
> grib_api library
> (http://www.ecmwf.int/products/data/software/download/grib_api.html)
> and istall it with jasper
> 
> tar xvfz grib_api-1.9.9.tar.gz
> ./configure [--with-jasper=<jasper path>]
> make
> make install
> 
> You then have to edit the makefile.ecmwf_gfortran_32 to have the right
> lib and include path's set for gfortran to find jasper and grib_api. The
> path's found in makefile.ecmwf_gfortran_32 are just showing where the
> programmers installed those lib's before distributing the FLEXPART
> software.
> If you get a successful build, it will still prompt an error since you
> will still miss some expected settings, but you will clearly see whether
> this is a bad binary or not.
> 
> I will definitely try reinstalling an older version of binutils and give
> it a try.
> 
> Thanx again for the advice.
> 
> Regards,
> KÃre
> 
I forgot to say that the file includepar in the FLEXPART folder need to
be edited to look like this in the section:

**********************************************
C Maximum dimensions of the input mother grids
**********************************************

      integer nxmax,nymax,nuvzmax,nwzmax,nzmax,nxshift
      parameter(nxmax=361,nymax=181,nuvzmax=92,nwzmax=92,nzmax=92)
c     parameter(nxmax=361,nymax=181,nuvzmax=61,nwzmax=61,nzmax=61)
c     parameter(nxmax=721,nymax=361,nuvzmax=27,nwzmax=27,nzmax=27)
      parameter(nxshift=359)  ! for ECMWF
c     parameter(nxshift=0)    ! for GFS
      integer nconvlevmax,na 
      parameter (nconvlevmax = nuvzmax-1)
      parameter (na = nconvlevmax+1)



otherwise you will get a crash with some error messages during the make
procedure.

Thanx,
Kåre


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What updates done after October 3 may affect gfortran built binaries?
@ 2011-11-10  9:49 Edvardsen Kåre
  0 siblings, 0 replies; 9+ messages in thread
From: Edvardsen Kåre @ 2011-11-10  9:49 UTC (permalink / raw)
  To: cygwin


> > In order to replicate my build you need to install latest version of the
> > grib_api library
> > (http://www.ecmwf.int/products/data/software/download/grib_api.html)
> > and istall it with jasper
> 
>   What is "jasper"?  Wikipedia lists four entirely different open source
> projects by that name!
> 
>   Also, how big is your build directory?  If of a manageable size, please
> zip/tar it up and send me a copy off-list; if it's huge, please just send me a
> copy of the broken executable (also off-list).
> 
>     cheers,
>       DaveK

Sorry for my lack of info...

jasper is a JPEG 2000 library. It's shipped with cygwin so for
installing grib_api, you just have to specify

./configure prefix=<some-preferred-install-dir> --with-jasper

if you have chosen the jasper package in your cygwin setup. You will
probably experience a hang on

Checking for ANSI C header files...

during ./configure, like I referred to in an earlier thread.
Reinstalling gcc 4.3.4 will solve that for you.

Right now, I'm trying to rebuild my problem code with both earlier
versions of binutils and gcc, like when I could build a working binary.
If it fails, I will send you off-list copies and proper instructions for
a successful build that will give you (probably) a broken binary.

Thanx for your patience,
Kåre


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What updates done after October 3 may affect gfortran built binaries?
  2011-11-09 13:32 Edvardsen Kåre
@ 2011-11-10  5:24 ` Dave Korn
  0 siblings, 0 replies; 9+ messages in thread
From: Dave Korn @ 2011-11-10  5:24 UTC (permalink / raw)
  To: cygwin

On 09/11/2011 13:31, Edvardsen KÃ¥re wrote:

> In order to replicate my build you need to install latest version of the
> grib_api library
> (http://www.ecmwf.int/products/data/software/download/grib_api.html)
> and istall it with jasper

  What is "jasper"?  Wikipedia lists four entirely different open source
projects by that name!

  Also, how big is your build directory?  If of a manageable size, please
zip/tar it up and send me a copy off-list; if it's huge, please just send me a
copy of the broken executable (also off-list).

    cheers,
      DaveK


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What updates done after October 3 may affect gfortran built binaries?
@ 2011-11-09 13:32 Edvardsen Kåre
  2011-11-10  5:24 ` Dave Korn
  0 siblings, 1 reply; 9+ messages in thread
From: Edvardsen Kåre @ 2011-11-09 13:32 UTC (permalink / raw)
  To: cygwin

[...]
>         
>         I will now start going through the updates and change back to versions
>         yielding October 3 if possible. I think this is important since cygwin
>         will give the opportunity to run and develop FLEXPART on Windows
>         machines the way linux-users are used to. In addition, I also see a
>         potential problem of other fortran software that people want to run
>         under cygwin.
>         
>         Regards,
>         KÃre
> 
> my guess binutils
> http://cygwin.com/ml/cygwin-announce/2011-10/msg00028.html
> 
> or some BLODA.
> 
> I downloaded the
> http://zardoz.nilu.no/~flexpart/flexpart/flexpart_82-3.tar.gz
> 
> but it is not clear to me how to replicate your build.
> 
> make -f makefile.gfs_gfortran_32
> 
> fails here:
> ---------------------------------------------------------------
> $ make -f makefile.gfs_gfortran_32
> gfortran -O2 -m32 -fconvert=little-endian -frecord-marker=4
> -I/nilu2/home/flexpart/lib/gfortran/include -c -o writeheader.o
> writeheader.f
> includecom:685.22:
> Included at writeheader.f:50:
> 
> common /globalr/ ! REAL
> 1
> Error: The equivalence set for 'pplev' cause an invalid extension to
> COMMON 'globalr' at (1)
> ......
> ---------------------------------------------------------------
> 
> Regards
> Marco
> 

Thanx a lot, Marco for takng time!

In order to replicate my build you need to install latest version of the
grib_api library
(http://www.ecmwf.int/products/data/software/download/grib_api.html)
and istall it with jasper

tar xvfz grib_api-1.9.9.tar.gz
./configure [--with-jasper=<jasper path>]
make
make install

You then have to edit the makefile.ecmwf_gfortran_32 to have the right
lib and include path's set for gfortran to find jasper and grib_api. The
path's found in makefile.ecmwf_gfortran_32 are just showing where the
programmers installed those lib's before distributing the FLEXPART
software.
If you get a successful build, it will still prompt an error since you
will still miss some expected settings, but you will clearly see whether
this is a bad binary or not.

I will definitely try reinstalling an older version of binutils and give
it a try.

Thanx again for the advice.

Regards,
Kåre





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-11-15 22:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-09 12:15 What updates done after October 3 may affect gfortran built binaries? Edvardsen Kåre
2011-11-09 13:07 ` Marco Atzeri
2011-11-15 15:54 ` [SOLVED] " Dave Korn
2011-11-15 16:21   ` Ryan Johnson
2011-11-15 22:55     ` Dave Korn
2011-11-09 13:32 Edvardsen Kåre
2011-11-10  5:24 ` Dave Korn
2011-11-10  9:49 Edvardsen Kåre
2011-11-10  9:55 Edvardsen Kåre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).