Skip to content

Commit aa837a9

Browse files
authored
Update README.md
1 parent 2e93fde commit aa837a9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,28 @@ In the first case, it is used the Fortran SUM intrinsic function to compute the
1919

2020
+ Linux + nvfortran 23.5-0
2121
```
22-
nvfortran -O3 -march=native -fpic -c mod_sum.f90 -o mod_sum.o
22+
nvfortran -O3 -march=native -fpic -c mod_sum_c.f90 -o mod_sum.o
2323
nvfortran -shared -o mod_sum.so mod_sum.o
2424
```
2525

2626
+ Linux + ifort
2727
```
28-
ifort -O3 -march=native -fpic -c mod_sum.f90 -o mod_sum.o
28+
ifort -O3 -march=native -fpic -c mod_sum_c.f90 -o mod_sum.o
2929
ifort -shared -o mod_sum.so mod_sum.o
3030
```
3131

3232
+ Linux + ifx
3333
```
34-
ifx -O3 -march=native -fpic -c mod_sum.f90 -o mod_sum.o
34+
ifx -O3 -march=native -fpic -c mod_sum_c.f90 -o mod_sum.o
3535
ifx -shared -o mod_sum.so mod_sum.o
3636
```
3737

3838
The examples of calling the Fortran subroutine using the [pythom module ctypes](https://docs.python.org/3/library/ctypes.html), [CFFI](https://cffi.readthedocs.io/en/latest/) and [cython](https://cython.org) are defined in `ctypes_plain.py`, `cffi_plain.py` and `cython_plain.py`, respectively. In the last case, you have to compile the fortran module first (as shown in the first command line of the previous examples), and then run the following command before you can use the corresponding module
3939
```
40-
python setup.py build_ext --inplace
40+
CC=icx python setup.py build_ext --inplace
4141
```
4242

43-
By running any of these scripts you will get the same result, e.g.:
43+
Note you need to set `CC` with the proper compiler. By running any of these scripts you will get the same result, e.g.:
4444
```
4545
python ctypes_plain.py
4646
[2. 4. 6.]

0 commit comments

Comments
 (0)