public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* gfortran and lapack problem
@ 2014-10-20  6:35 Christian
  2014-10-20  8:10 ` Tony Kelman
  0 siblings, 1 reply; 5+ messages in thread
From: Christian @ 2014-10-20  6:35 UTC (permalink / raw)
  To: cygwin

Hi all,

I'm having problems setting up gfrortran with lapack. I installed
lapack and liblapack-devel from cygwin, but when I try to compile I
cannot get any result, although I don't get any error. This a very
simple code I'm trying to compile:

PROGRAM MyTest
  IMPLICIT NONE
  DOUBLE PRECISION :: A(2,2) = RESHAPE( (/1, 2, 3, 4/), (/2,2/) )
  DOUBLE PRECISION :: B(2,1) = RESHAPE( (/5, 6/), (/2,1/) )
  INTEGER, DIMENSION(2) :: ipiv
  INTEGER :: n, info
  EXTERNAL DGESV
  PRINT *,'Printing the results'
  CALL DGESV(2, 1, A, 2, ipiv, B, 2, info)
  PRINT *, info
  PRINT *,'End printing'
END PROGRAM MyTest

I compile it as gfortran MyTest.f90 -o MyTest -llapack -lblas. I don't
get any errors (it says "compilation finished"), but the output file
doesn't print anything (neither the strings, or the variable info). If
I comment the "CALL DGESV" line, it does print everything (with
info=0, of course).

Am I doing something wrong or is there any problem in my lapack installation?

Best,
C

--
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] 5+ messages in thread

* Re: gfortran and lapack problem
  2014-10-20  6:35 gfortran and lapack problem Christian
@ 2014-10-20  8:10 ` Tony Kelman
  2014-10-20 15:42   ` Christian
  0 siblings, 1 reply; 5+ messages in thread
From: Tony Kelman @ 2014-10-20  8:10 UTC (permalink / raw)
  To: cygwin

> I compile it as gfortran MyTest.f90 -o MyTest -llapack -lblas. I don't
> get any errors (it says "compilation finished"), but the output file
> doesn't print anything (neither the strings, or the variable info). If
> I comment the "CALL DGESV" line, it does print everything (with
> info=0, of course).

32 bit or 64 bit Cygwin? Works for me, I get

$ gfortran MyTest.f90 -o MyTest -llapack -lblas

$ ./MyTest
Printing the results
           0
End printing

So no "compilation finished" message. Might you have some other
version of gfortran on your path? I believe cygcheck.out would
list some of this information. Other things to check:

which -a gfortran
which -a cygblas-0.dll


--
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] 5+ messages in thread

* Re: gfortran and lapack problem
  2014-10-20  8:10 ` Tony Kelman
@ 2014-10-20 15:42   ` Christian
  2014-10-20 15:57     ` Marco Atzeri
  0 siblings, 1 reply; 5+ messages in thread
From: Christian @ 2014-10-20 15:42 UTC (permalink / raw)
  To: cygwin

I'm using 64 bit Cygwin.
I guess that the "compilation finished" message I got is because of my
compiling interface, so I don't think is important.
Regarding the checks you suggested:

$ cygcheck gfortran
Found: D:\Cygwin64\bin\gfortran.exe
Found: D:\Cygwin64\bin\gfortran.exe
Found: D:\Cygwin64\bin\gfortran.exe
D:\Cygwin64\bin\gfortran.exe

And then a bunch of dll's. When I check gfortran I get

$ which -a gfortran
/usr/bin/gfortran
/usr/bin/gfortran
/usr/bin/gfortran

While for blas:

$ which -a cygblas-0.dll
/usr/lib/lapack/cygblas-0.dll

Thanks!


On Mon, Oct 20, 2014 at 4:10 AM, Tony Kelman <tony@kelman.net> wrote:
>> I compile it as gfortran MyTest.f90 -o MyTest -llapack -lblas. I don't
>> get any errors (it says "compilation finished"), but the output file
>> doesn't print anything (neither the strings, or the variable info). If
>> I comment the "CALL DGESV" line, it does print everything (with
>> info=0, of course).
>
>
> 32 bit or 64 bit Cygwin? Works for me, I get
>
> $ gfortran MyTest.f90 -o MyTest -llapack -lblas
>
> $ ./MyTest
> Printing the results
>           0
> End printing
>
> So no "compilation finished" message. Might you have some other
> version of gfortran on your path? I believe cygcheck.out would
> list some of this information. Other things to check:
>
> which -a gfortran
> which -a cygblas-0.dll
>
>
> --
> 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
>

--
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] 5+ messages in thread

* Re: gfortran and lapack problem
  2014-10-20 15:42   ` Christian
@ 2014-10-20 15:57     ` Marco Atzeri
  2014-10-20 16:25       ` Christian
  0 siblings, 1 reply; 5+ messages in thread
From: Marco Atzeri @ 2014-10-20 15:57 UTC (permalink / raw)
  To: cygwin

On 10/20/2014 5:42 PM, Christian wrote:
> I'm using 64 bit Cygwin.
> I guess that the "compilation finished" message I got is because of my
> compiling interface, so I don't think is important.

can you remove the interface usage an use only

    gfortran MyTest.f90 -o MyTest -llapack -lblas

For my it works fine

$ ./MyTest.exe
  Printing the results
            0
  End printing

Additional question, which terminal are you using ?


> Thanks!
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] 5+ messages in thread

* Re: gfortran and lapack problem
  2014-10-20 15:57     ` Marco Atzeri
@ 2014-10-20 16:25       ` Christian
  0 siblings, 0 replies; 5+ messages in thread
From: Christian @ 2014-10-20 16:25 UTC (permalink / raw)
  To: cygwin

It appears that it is a problem with the terminal I was using. I was
compiling my code using the smart-compile package for emacs, and then
printing the output using the emacs-shell. The compilation was not the
problem (I compiled it from the Cygwing terminal as well with the same
results). But when I used the Cygwin terminal to print the results
everything works. This is kind of odd because the emacs-shell had
worked for me before (w/o blas or lapack), but this is of course not a
Cygwin's problem. Sorry for wasting your time with this silly problem.
Thanks so much for your help.

On Mon, Oct 20, 2014 at 11:57 AM, Marco Atzeri <marco.atzeri@gmail.com> wrote:
> On 10/20/2014 5:42 PM, Christian wrote:
>>
>> I'm using 64 bit Cygwin.
>> I guess that the "compilation finished" message I got is because of my
>> compiling interface, so I don't think is important.
>
>
> can you remove the interface usage an use only
>
>    gfortran MyTest.f90 -o MyTest -llapack -lblas
>
> For my it works fine
>
> $ ./MyTest.exe
>  Printing the results
>            0
>  End printing
>
> Additional question, which terminal are you using ?
>
>
>> Thanks!
>
> 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
>

--
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] 5+ messages in thread

end of thread, other threads:[~2014-10-20 16:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-20  6:35 gfortran and lapack problem Christian
2014-10-20  8:10 ` Tony Kelman
2014-10-20 15:42   ` Christian
2014-10-20 15:57     ` Marco Atzeri
2014-10-20 16:25       ` Christian

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).