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

when compile grasp/src/lib/lib9290/iniest2.f90:82:23 #76

Open
hf6391964 opened this issue Nov 10, 2021 · 13 comments
Open

when compile grasp/src/lib/lib9290/iniest2.f90:82:23 #76

hf6391964 opened this issue Nov 10, 2021 · 13 comments

Comments

@hf6391964
Copy link

Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
make[2]: *** [src/lib/lib9290/CMakeFiles/9290.dir/build.make:933: src/lib/lib9290/CMakeFiles/9290.dir/iniest2.f90.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:652: src/lib/lib9290/CMakeFiles/9290.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

@hf6391964
Copy link
Author

79 | CALL DCOPY (NS, VEC(NS*(J-1)+1), 1, BASIS(NCF*(J-1)+1), 1)
| 2
......
82 | CALL DCOPY (NIV, EIGVAL, 1, BASIS(NIV*NCF+1), 1)
| 1

@mortenpi
Copy link
Member

Are you saying that you're actually getting a compilation error with unmodified GRASP here? Because I can't really replicate that.

@QuantumGuy
Copy link

QuantumGuy commented Nov 16, 2021 via email

@hf6391964
Copy link
Author

Thank you! Operating system is fedora35 and gfortran. Using default set and cmake.
The problem is without F77.
Since fedora35 without F77. Can you help me?

@mortenpi
Copy link
Member

mortenpi commented Nov 16, 2021

What's the gfortran version? It might be that it has become more picky about what it does and doesn't allow.

@hf6391964
Copy link
Author

gcc 11. We have changed to gcc 7. But no help. While lower version of gcc can't be accepted by fedora35.

@QuantumGuy
Copy link

QuantumGuy commented Nov 16, 2021 via email

@hf6391964
Copy link
Author

  1. with default step like readme.md
  2. ./configur.sh
  3. cd bulid
  4. make install
  5. 79 | CALL DCOPY (NS, VEC(NS*(J-1)+1), 1, BASIS(NCF*(J-1)+1), 1)
    | 2
    ......
    82 | CALL DCOPY (NIV, EIGVAL, 1, BASIS(NIV*NCF+1), 1)
    | 1
    Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
    make[2]: *** [src/lib/lib9290/CMakeFiles/9290.dir/build.make:933: src/lib/lib9290/CMakeFiles/9290.dir/iniest2.f90.o] Error 1
    make[1]: *** [CMakeFiles/Makefile2:652: src/lib/lib9290/CMakeFiles/9290.dir/all] Error 2
    make: *** [Makefile:146: all] Error 2

But when compile the grasp2018-12-03, it is ok.

@hf6391964
Copy link
Author

The problem is still the version of gcc.
https://gcc.gnu.org/gcc-10/porting_to.html
-fallow-argument-mismatch (implied by -std=legacy)
but how to add this in cmake?

@jongrumer
Copy link
Member

@mortenpi Do you mind answering this perhaps? You're the CMake expert here ;) Once we have settled on a way to customize the CMake build, this info should be given in the main page readme, just like how we describe it for the Makefile compilation with the Make.user files.

@mortenpi
Copy link
Member

Alright, so it is that the compiler has become more strict. It should be sufficient then to pass the appropriate CMAKE_Fortran_FLAGS to CMake. For that you need to bypass configure.sh and set up the CMake build manually:

mkdir build/
cd build/
cmake .. -DCMAKE_Fortran_FLAGS="-fallow-argument-mismatch"

@jongrumer I agree that we should update that section. I reckon we should just briefly describe how to invoke CMake directly in case you need to configure something (as opposed to making configure.sh more complex). In short: use ./configure.sh if the default works, but if you need to customise, invoke CMake directly.

@jagot
Copy link
Member

jagot commented Nov 23, 2021

I think this is a duplicate of #46

@mortenpi
Copy link
Member

Good catch @jagot!

@hf6391964 Have you had any luck with the proposed CMake workaround? If it looks like it is working, I would go ahead and close this in favour of #77 (which is for fixing the underlying issue).

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

No branches or pull requests

5 participants