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

Error stop improvements #473

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

scivision
Copy link
Member

I originally authored this error_stop routine. The logic selecting it in CMake was no
longer relevant. I made a driver for the error stop test to make it more reliable.

oneAPI 2021.1 on MacOS has bugs breaking stdlib_error, so I update CI to latest oneAPI for MacOS.

Copy link
Member

@jvdp1 jvdp1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. LGTM.

@jvdp1 jvdp1 requested review from awvwgk and milancurcic July 23, 2021 16:10
I originally authored this routine, which is updated
for supported compilers. The logic selecting it in CMake was no
longer relevant.
@awvwgk
Copy link
Member

awvwgk commented Jul 31, 2021

I think there is some value in keeping the pre-Fortran 2018 error stop workaround. The current default branch still compiles with Intel 19, with this patch we would drop support for all Intel versions before 2021.3.

❯ ifort -V
Intel(R) Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.0.5.281 Build 20190815
Copyright (C) 1985-2019 Intel Corporation.  All rights reserved.

❯ ninja -C _build_i19/ -j1
ninja: Entering directory `_build_i19/'
[1/184] Building Fortran object src/CMakeFiles/fortran_stdlib.dir/stdlib_error.f90.o
FAILED: src/CMakeFiles/fortran_stdlib.dir/stdlib_error.f90.o src/mod_files/stdlib_error.mod 
/opt/intel/2019/compilers_and_libraries_2019.5.281/linux/bin/intel64/ifort  -I../src -Isrc/mod_files -module src/mod_files/ -warn declarations,general,usage,interfaces,unused -stand f18 -c src/CMakeFiles/fortran_stdlib.dir/stdlib_error.f90-pp.f90 -o src/CMakeFiles/fortran_stdlib.dir/stdlib_error.f90.o
../src/stdlib_error.f90(39): error #6345: Either a PAUSE, STOP or ERROR STOP statement has an invalid argument.   [MSG]
    if(.not.present(code)) error stop msg
--------------------------------------^
../src/stdlib_error.f90(42): error #6345: Either a PAUSE, STOP or ERROR STOP statement has an invalid argument.   [CODE]
    error stop code
---------------^
compilation aborted for src/CMakeFiles/fortran_stdlib.dir/stdlib_error.f90-pp.f90 (code 1)
ninja: build stopped: subcommand failed.

Also, while Intel 2021.1 compiles stdlib, the support for Fortran 2018 error stop is buggy and will always report exit status 128 even if zero is passed as exit code.

@awvwgk awvwgk added the reviewers needed This patch requires extra eyes label Jul 31, 2021
@milancurcic
Copy link
Member

@scivision can you explain in a sentence or two what this PR changes or improves? I understand the part about the more robust test driver. What is the tradeoff for dropping support for earlier Intel compilers?

@milancurcic milancurcic added waiting for OP This patch requires action from the OP and removed reviewers needed This patch requires extra eyes labels Sep 7, 2021
@awvwgk awvwgk added build: cmake Issue with stdlib's CMake build files refactoring Internal change for better maintainablility labels Sep 18, 2021
@awvwgk awvwgk removed their request for review December 17, 2021 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build: cmake Issue with stdlib's CMake build files refactoring Internal change for better maintainablility waiting for OP This patch requires action from the OP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants