Connecting to ARCHER2 and transferring data
|
We should all understand and follow the [ARCHER2 Code of Conduct][archer2-tcoc] to ensure this course is conducted in the best teaching environment.
The course will be flexible to best meet the learning needs of the attendees.
Feedback is an essential part of our training to allow us to continue to improve and make sure the course is as useful as possible to attendees.
ARCHER2’s login address is login.archer2.ac.uk .
You have to change the default text password the first time you log in
MFA is mandatory in ARCHER2
|
Arrays
|
Fortran supports both static- and dynamic-sized arrays
Fortran arrays are objects, allowing out of bounds accesses to be checked
The bounds of an array can be set by the programmer
|
Arrays as arguments
|
Arrays passed as arguments retain their size, not their bounds
Array arguments behave as though passed by reference, however array sections may require copy-in, copy-out
|
More on pointers
|
Fortran pointers describe what they are pointing to, not only its address.
We must take care when programming with pointers to avoid aliasing.
Procedure pointers create a binding between a variable and a procedure.
|
Derived types
|
|
Interfaces and overloading
|
Interfaces allow us to write generic, high-level code.
Designing a generic interface requires care, particularly for generic operators.
|
Type extension and polymorphism
|
|
Type-bound procedures
|
Type-bound procedures allow Fortran objects to implement behaviour
Redefining type-bound procedures allows behaviour to be specialised
Types can prevent extended types from redefining type-bound procedures
Generic type-bound procedures enable generic methods on types
|
Generic input/output for derived types
|
|
Abstract types
|
|
Modules again
|
|
Unlimited polymorphic entities
|
Unlimited polymorphic entities provide a void * -like type in Fortran
Without determining the unlimite polymorphic entity’s dynamic type, it cannot be used
|
Type parameters
|
|
Intrinsic modules
|
|
Interoperability with C
|
The iso_c_binding module allows a programmer to write Fortran that is interoperable with C.
Care must be taken with pointers and arrays, and with variables which are to be passed to C by value.
|