conv
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
conv [2023/03/06 12:33] – [c002] oschuett | conv [2023/11/14 10:49] (current) – [c012] oschuett | ||
---|---|---|---|
Line 4: | Line 4: | ||
===== c001 ===== | ===== c001 ===== | ||
⚠️ '' | ⚠️ '' | ||
+ | |||
+ | ✅ Please always check the content of the variable passed to '' | ||
+ | |||
+ | ---- | ||
===== c002 ===== | ===== c002 ===== | ||
Line 11: | Line 15: | ||
This message can also appear when a module is used without an '' | This message can also appear when a module is used without an '' | ||
+ | |||
+ | ---- | ||
+ | |||
===== c003 ===== | ===== c003 ===== | ||
⚠️ '' | ⚠️ '' | ||
Line 18: | Line 25: | ||
In Fortran, assigning a variable at declaration implicitly adds the [[https:// | In Fortran, assigning a variable at declaration implicitly adds the [[https:// | ||
As an [[https:// | As an [[https:// | ||
+ | |||
+ | ---- | ||
===== c004 ===== | ===== c004 ===== | ||
⚠️ '' | ⚠️ '' | ||
+ | |||
+ | ✅ Please start every Fortran module with '' | ||
+ | |||
+ | ---- | ||
===== c005 ===== | ===== c005 ===== | ||
⚠️ '' | ⚠️ '' | ||
+ | |||
+ | ✅ Please don't use thread-private variables because they break easily. | ||
+ | |||
+ | |||
+ | The OpenMP standard guaranteed the persistence of thread-private variables only between consecutive parallel regions and only under very specific conditions. Since any subroutine can open a parallel regions (or might in the future) this construct is very brittle. | ||
+ | |||
+ | As a workaround simply allocate an array of size '' | ||
+ | |||
+ | ---- | ||
===== c006 ===== | ===== c006 ===== | ||
⚠️ '' | ⚠️ '' | ||
+ | |||
+ | ✅ Please always include '' | ||
+ | |||
+ | ---- | ||
===== c007 ===== | ===== c007 ===== | ||
⚠️ '' | ⚠️ '' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | ===== c008 ===== | ||
+ | ⚠️ '' | ||
+ | |||
+ | ✅ Please don't use [[https:// | ||
+ | |||
+ | See [[https:// | ||
+ | |||
+ | ---- | ||
===== c012 ===== | ===== c012 ===== | ||
⚠️ '' | ⚠️ '' | ||
+ | |||
+ | ✅ Please don't writing to stdout directly, but instead use a [[dev: | ||
+ | |||
+ | |||
+ | Printkeys allow the user to [[printkey|control]] the verbosity of the output. | ||
+ | |||
+ | ---- | ||
===== c013 ===== | ===== c013 ===== | ||
⚠️ '' | ⚠️ '' | ||
+ | |||
+ | ✅ Please don't '' | ||
+ | |||
+ | A failed deallocation is always indicative of a bug (e.g. double free or segmentation fault) and the program should not continue afterwards. | ||
+ | |||
+ | ---- | ||
===== c014 ===== | ===== c014 ===== | ||
⚠️ '' | ⚠️ '' | ||
+ | |||
+ | ---- | ||
===== c015 ===== | ===== c015 ===== | ||
⚠️ '' | ⚠️ '' | ||
+ | |||
+ | ---- | ||
===== c016 ===== | ===== c016 ===== | ||
Line 50: | Line 105: | ||
<code Fortran> | <code Fortran> | ||
TYPE foo_type | TYPE foo_type | ||
+ | ! Primitive types. | ||
| | ||
| | ||
| | ||
| | ||
- | TYPE(bar_type) | + | |
- | REAL(dp), DIMENSION(3,3) :: my_array | + | |
- | | + | |
- | | + | |
- | END TYPE foo_type | + | |
- | TYPE bar_type | + | ! Arrays can also be initialized via broadcasting of a scalar. |
- | INTEGER | + | |
- | END TYPE bar_type | + | |
+ | ! Pointers should be nullified. | ||
+ | | ||
+ | TYPE(bar_type), POINTER | ||
+ | |||
+ | ! Derived types can be initialized through their constructor. | ||
+ | | ||
+ | |||
+ | ! Allocatables get automatically nullified. | ||
+ | | ||
+ | |||
+ | ! Allocatables of derived types get auto initialized upon allocation. | ||
+ | TYPE(bar_type), ALLOCATABLE | ||
+ | END TYPE foo_type | ||
</ | </ | ||
+ | ---- | ||
===== c101 ===== | ===== c101 ===== | ||
Line 71: | Line 137: | ||
✅ Please don't call '' | ✅ Please don't call '' | ||
It allows for [[inp> | It allows for [[inp> | ||
+ | |||
+ | ---- | ||
===== c102 ===== | ===== c102 ===== | ||
Line 76: | Line 144: | ||
✅ Please don't call '' | ✅ Please don't call '' | ||
+ | |||
+ | ---- | ||
===== c103 ===== | ===== c103 ===== | ||
Line 81: | Line 151: | ||
✅ Please don't call '' | ✅ Please don't call '' | ||
+ | |||
+ | ---- | ||
===== c104 ===== | ===== c104 ===== | ||
Line 86: | Line 158: | ||
✅ Please don't call '' | ✅ Please don't call '' | ||
+ | |||
+ | ---- | ||
===== c105 ===== | ===== c105 ===== | ||
Line 91: | Line 165: | ||
✅ Please don't call '' | ✅ Please don't call '' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== c106 ===== | ||
+ | ⚠️ '' | ||
+ | |||
+ | ✅ Please don't call '' | ||
+ | |||
+ | ---- | ||
+ | |||
===== c201 ===== | ===== c201 ===== | ||
Line 96: | Line 180: | ||
✅ Please don't use the '' | ✅ Please don't use the '' | ||
+ | |||
+ | ---- | ||
===== c202 ===== | ===== c202 ===== | ||
Line 101: | Line 187: | ||
✅ Please don't use the '' | ✅ Please don't use the '' | ||
+ | |||
+ | ---- | ||
===== c203 ===== | ===== c203 ===== | ||
Line 106: | Line 194: | ||
✅ Please don't call '' | ✅ Please don't call '' | ||
+ | |||
+ | ---- | ||
===== c204 ===== | ===== c204 ===== | ||
Line 111: | Line 201: | ||
✅ Please don't call '' | ✅ Please don't call '' | ||
+ | |||
+ | ---- | ||
===== c205 ===== | ===== c205 ===== | ||
Line 116: | Line 208: | ||
✅ Please don't call '' | ✅ Please don't call '' | ||
+ | |||
+ | ---- | ||
conv.1678105987.txt.gz · Last modified: 2023/03/06 12:33 by oschuett