Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Export multiple common blocks using dll

Liang_W_1
Beginner
433 Views

Hello, 

I have read about the instructions to share data in dlls in this link 

https://software.intel.com/en-us/node/535307

However, I can not see how to share multiple common blocks in one statement. I did the following

	!DEC$ ATTRIBUTES DLLIMPORT :: /CMPNTR/,/GENC/,/NUMS/,/CONSMD/,
     +	/CMMASS/,/USRSTE/,/ORNTCR/,/CRPVAR/,/CONTVR/,/FFTCOM/,/RDUNIT/

and got no error. But only the first line become green, can I assume that I need multiple directives for each line?

Also, if the export directives are defined in this way, when other subroutines use one of these common block, do it have to follow the same declaration again, since it requires the detail definition of each common block when refered and it is not quite convenient.

Thank you

 

0 Kudos
1 Solution
Steven_L_Intel1
Employee
433 Views

You need to read the rules about continuing directives in the Language Reference - https://software.intel.com/en-us/node/580178 (Syntax Rules for Compiler Directives)

General compiler directives and OpenMP Fortran directives can be continued in the same way as Fortran statements can be continued:

  • In fixed form, the first line of the directive {initial line} has the directive prefix is in columns 1 through 5 and has a blank, a tab, or a zero in column 6; each continued line of the directive has the directive prefix in columns 1 through 5 and has a character other than a blank, a tab, or a zero in column 6.

  • In free form, the initial line of the directive ends with an ampersand followed by an optional comment beginning with an exclamation point. Each continued line of the directive has the directive prefix optionally preceded by blanks or tabs, followed by an ampersand optionally preceded by blanks or tabs.

View solution in original post

0 Kudos
2 Replies
Steven_L_Intel1
Employee
434 Views

You need to read the rules about continuing directives in the Language Reference - https://software.intel.com/en-us/node/580178 (Syntax Rules for Compiler Directives)

General compiler directives and OpenMP Fortran directives can be continued in the same way as Fortran statements can be continued:

  • In fixed form, the first line of the directive {initial line} has the directive prefix is in columns 1 through 5 and has a blank, a tab, or a zero in column 6; each continued line of the directive has the directive prefix in columns 1 through 5 and has a character other than a blank, a tab, or a zero in column 6.

  • In free form, the initial line of the directive ends with an ampersand followed by an optional comment beginning with an exclamation point. Each continued line of the directive has the directive prefix optionally preceded by blanks or tabs, followed by an ampersand optionally preceded by blanks or tabs.

0 Kudos
Liang_W_1
Beginner
433 Views

Steve, thank you 

0 Kudos
Reply