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

Add support for Intel and NAG compilers #21

Merged
merged 14 commits into from
Dec 29, 2023

Conversation

yanjen
Copy link
Contributor

@yanjen yanjen commented Dec 28, 2023

Hello and happy holiday.

This PR makes FortUTF works for Intel (ifort) and NAG (nagfor) compilers.
What have to be changed:

  1. KIND variables has to be assigned by selected_<type>_kind to work for NAG compiler. Reference here
  2. Some widths for edit descriptors cannot be neglected or be 0 for NAG compiler.
  3. CALL EXIT is a GNU specific function, change to STOP

This PR also adds a workflow for Intel compiler.
The NAG compiler is not opensource, but I have checked the validation locally.
Here is the compile message for NAG compiler.

Scanning dependencies of target FortUTF
[  2%] Building Fortran object CMakeFiles/FortUTF.dir/src/utilities.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[  4%] Building Fortran object CMakeFiles/FortUTF.dir/src/suite.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[  6%] Building Fortran object CMakeFiles/FortUTF.dir/src/assertions.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[  9%] Building Fortran object CMakeFiles/FortUTF.dir/src/specials.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 11%] Building Fortran object CMakeFiles/FortUTF.dir/src/string_check.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 13%] Building Fortran object CMakeFiles/FortUTF.dir/src/test_suite.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 16%] Linking Fortran static library libFortUTF.a
[ 16%] Built target FortUTF
Scanning dependencies of target FortUTF_Tests
[ 18%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_aequal_int.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 20%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_aequal_real.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 23%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_assert_bool.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 25%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_equal_char.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 27%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_equal_complex.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 30%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_equal_int.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 32%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_equal_logical.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 34%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_equal_real.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 37%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_gt_int.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 39%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_gt_real.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 41%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_gteq_int.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 44%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_gteq_real.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 46%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_ischar.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 48%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_iscomplex.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 51%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_isint.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 53%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_isreal.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 55%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_lt_int.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 58%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_lt_real.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 60%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_lteq_int.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 62%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_lteq_real.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 65%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_nequal_char.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 67%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_nequal_int.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 69%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_nequal_logical.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 72%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_nequal_real.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 74%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_assertions/test_val_in_arr.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 76%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_specials/test_specials.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 79%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_string_check/test_string_compare.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 81%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_suite/test_failing.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 83%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_utilities.f90/test_utilities.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 86%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/tests/test_suite/unfinished_test_check.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 88%] Building Fortran object CMakeFiles/FortUTF_Tests.dir/run_tests.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 90%] Linking Fortran executable FortUTF_Tests
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[ 90%] Built target FortUTF_Tests
Scanning dependencies of target DEMO_PROJ_Tests
[ 93%] Building Fortran object examples/demo_project/CMakeFiles/DEMO_PROJ_Tests.dir/src/demo_functions.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 95%] Building Fortran object examples/demo_project/CMakeFiles/DEMO_PROJ_Tests.dir/tests/test_functions.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[ 97%] Building Fortran object examples/demo_project/CMakeFiles/DEMO_PROJ_Tests.dir/run_tests.f90.o
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[NAG Fortran Compiler normal termination]
[100%] Linking Fortran executable DEMO_PROJ_Tests
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
[100%] Built target DEMO_PROJ_Tests

This PR also fixes:

  1. CHAR length error for logging in specials and test_failing
  2. missing assertions in test_isint

@yanjen yanjen changed the title Add GitHub action to Intel compiler Add GitHub action for Intel compiler Dec 28, 2023
@yanjen yanjen changed the title Add GitHub action for Intel compiler Add support for Intel and NAG compilers Dec 28, 2023
@artemis-beta
Copy link
Owner

@yanjen this is fantastic! Thanks for this, and you even included some CI I am very grateful for that!

@artemis-beta artemis-beta merged commit 8486192 into artemis-beta:main Dec 29, 2023
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.

None yet

2 participants