# create hello_world_mod.mod and hello_world.o > gfortran -c -fimplicit-none -Werror=implicit-interface hello_world.f90 # create main.o > gfortran -c -fimplicit-none -Werror=implicit-interface main.f90 # link and create hello_world binary > gfortran main.o hello_world.o -o hello_world # Execute the program > ./hello_world
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"schemaVersion":1,"label":"Coverage","message":"75%","color":"hsl(75, 100%, 40%)"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use as python3 REW_to_ACDf.py filter.txt | |
# where filter.txt is the text exported REW filters | |
# License GPLv3.0 | |
# Copyright Victor Azizi 2022 | |
import sys | |
import re | |
#Header | |
print("""pcm.!default { | |
type plug |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define SIZE 100000000 | |
program test_openmp | |
real :: a(SIZE), b(SIZE), c(SIZE) | |
integer :: n | |
!$omp target teams | |
do n = 1, SIZE | |
c(n) = a(n) + b(n) | |
end do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module hello_world_mod | |
contains | |
subroutine hello_world(name) | |
implicit none ! This should be present in all procedures | |
character(len=*) :: name | |
write(*,*) "Hello World: ", name | |
end subroutine | |
end module |
# We will come back to the -fimplicit-none later > gfortran -c -Werror=implicit-interface hello_world.f90 > gfortran -Werror=implicit-interface main.f90 -o hello_world main.f90:3:31: 3 | call hello_world("You there") | 1 Error: Type mismatch in argument ‘name’ at (1); passed CHARACTER(1) to INTEGER(4)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module hello_world_mod | |
contains | |
subroutine hello_world(name) | |
implicit none | |
write(*,*) "Hello World: ", name | |
end subroutine | |
end module |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program main | |
interface | |
subroutine hello_world(name) | |
character(len=*) :: name | |
end subroutine | |
end interface | |
implicit none | |
call hello_world("You there") | |
end program |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program main | |
implicit none | |
call hello_world("You there") | |
contains | |
include 'hello_world.f90' | |
end program |
> gfortran -fimplicit-none -Werror=implicit-interface main.f90 hello_world.f90 -o hello_world main.f90:2:31: 2 | call hello_world("You there") | 1 Error: Procedure ‘hello_world’ called with an implicit interface at (1) [-Werror=implicit-interface]
NewerOlder