Code Monkey home page Code Monkey logo

Comments (5)

jvdp1 avatar jvdp1 commented on June 12, 2024 1

You can build locally a version of stdlib with up to rank 7 as described here. This would need to first modify the variable maxrank in fpm-deployment.sh.

@jalvesz is working on an alternative Python script (see #791 for more details). Unfortunately I didn't get a chance to test it. Don't hesitate to provide feedback in #791 too.

from stdlib.

RJaBi avatar RJaBi commented on June 12, 2024

Thanks! I'll have a look and see how I get on.

Unfortunately the computer I want to use is down for a few days, so it'll take a little time.

from stdlib.

RJaBi avatar RJaBi commented on June 12, 2024

I was able to use #791 to generate a pre-processed version with the approriate max rank and add that dependency as

[dependencies]
stdlib = {path = 'temp/stdlib/stdlib-fpm/'}

which seems to work (it compiles at least which I suspect will do the trick as I'm not asking for anything complicated).

I did however stumble across something else that may have been appropriate, but can't find it now. In the fpm.toml of stdlib on the stdlib-fpm branch there is

[preprocess]
[preprocess.cpp]

and FPM documentation suggests that this could be modified in the dependencies of another project, i.e.

[dependencies]
fftpack = { git="https://github.com/fortran-lang/fftpack.git", preprocess.cpp.macros = ["REAL32"] }

At some point, I saw the maxrank in there for the stdlib preprocess, but I can't find the exact form for it now. Clearly being able to do

[dependencies]
stdlib = { git="https://github.com/fortran-lang/stdlib", branch="stdlib-fpm",  preprocess.cpp.macros = ["DMAXRANK=7"]}

Would be a neat way to do what I need. Like I say, I can't find that now though (the above line does not work).

from stdlib.

jalvesz avatar jalvesz commented on June 12, 2024

@RJaBi glad to know the script was useful to you! as this an early stage proposal your feedback is highly useful to consider before pushing further with it.

In your comment #791 (comment) you mention not being able to use Cray compilers, I have personally never worked with them (and have no means to). So I was wondering if on your system are you able to set the environment variables FPM_FC, FPM_CC and FPM_CXX to point to the Cray compilers before building?

Clearly being able to do

[dependencies]
stdlib = { git="https://github.com/fortran-lang/stdlib", branch="stdlib-fpm",  preprocess.cpp.macros = ["DMAXRANK=7"]}

Would be a neat way to do what I need.

This is an interesting use case which I did not think about when working out the script, as the main target was to preprocess stdlib in-place. I think that to enable what you want to do, fpm should be able of handling fypp on its own to recursively apply fypp preprocessing to a project and any dependencies within.

from stdlib.

RJaBi avatar RJaBi commented on June 12, 2024

...able to set the environment variables FPM_FC, FPM_CC and FPM_CXX to point to the Cray compilers before building?

Yes I can set these. If I do, than the script crashes at the line:
flags = preprocessor[FPM_FC]

as there is no crayftn entry in the preprocessor variable. I think that the appropriate flag is just '-c', but I'm not 100% sure. This still doesn't make it compile, but that's cause the cray compiler is very picky (I think the error might be related to a variable called module) and not a problem with your script.

Yes, that's clearly a FPM thing.

from stdlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.