Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
The Intel sign-in experience is changing in February to support enhanced security controls. If you sign in, click here for more information.

Export multiple common blocks using dll

Liang_W_1
Beginner
241 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
241 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

2 Replies
Steven_L_Intel1
Employee
242 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.

Liang_W_1
Beginner
241 Views

Steve, thank you 

Reply