Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes for NAG natfor #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

fixes for NAG natfor #1

wants to merge 2 commits into from

Conversation

dimpase
Copy link

@dimpase dimpase commented Sep 28, 2021

this is resolving a part of issues in scipy/scipy#13222

@ThemosTsikas
Copy link

The =unifyprecision tool in nagfor can do these automatically but it will not work on files needing preprocessing. One way through is to have all the preprocessing in a simple file that Includes a foo_ser.f90 or a foo_par.f90. To create those you start with just a preprocessing step:
nagfor foo.f -fpp -otype=F -openmp -o foo_par.f
and then
nagfor =unifyprecision -openmp -dcfuns foo_par.f -o foo_par.f90

For the serial file
nagfor -otype=F -fpp foo.f -Wp,-U_OPENMP,-P -o foo_ser.f
and then
nagfor =unifyprecision -dcfuns foo_ser.f -o foo_ser.f90

Might need some small fix up after that for Complex-returning functions (eliminate COMPLEX*16 in favour of Complex(Kind=wp))

ones in lapack can be used (hopefully)
@dimpase
Copy link
Author

dimpase commented Sep 29, 2021

@ThemosTsikas - can you comment on the last commit: removing second() in order to avoid dealing with non-strandard etime, and assuming second() is available on Lapack. Is this sound?

@ThemosTsikas
Copy link

@ThemosTsikas - can you comment on the last commit: removing second() in order to avoid dealing with non-strandard etime, and assuming second() is available on Lapack. Is this sound?

Yes, provided the subroutine second(t) in Lapack takes a default real argument.

@mckib2
Copy link
Collaborator

mckib2 commented Dec 30, 2021

Removing the second.F files causes 32-bit builds to segfault and best case propagate lots of NaNs (tested on Ubuntu 16 i386 VM), so I'm not sure if we're going to be able to remove those completely

@dimpase
Copy link
Author

dimpase commented Jan 30, 2022

What blas/lapack are you using on Ubuntu 16 i386 VM ?

@mckib2
Copy link
Collaborator

mckib2 commented Feb 6, 2022

I get the following warning:

/venvs/scipy38/lib/python3.8/site-packages/numpy/distutils/system_info.py:2026: UserWarning: 
    Optimized (vendor) Blas libraries are not found.
    Falls back to netlib Blas library which has worse performance.
    A better performance should be easily gained by switching
    Blas library.

I believe that means I'm using Netlib BLAS/LAPACK?

@dimpase
Copy link
Author

dimpase commented Feb 7, 2022

I believe that means I'm using Netlib BLAS/LAPACK?

Perhaps you're using an obsolete version of BLAS/LAPCK (Lapack 3.6.0, I suppose)? One way or another, Ubuntu 16 is past EOL, and its gfortran (4.5 or so) is long past EOL, too. Surely one can find an even older system on which this will break...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants