MSC.Marc and compiler Intel XE 2015 Fortran, demonstration example e8x94c.dat

MSC.Marc and compiler Intel XE 2015 Fortran, demonstration example e8x94c.dat

Hello. In MSC.Marc with the Intel XE 2015 Fortran compiler there is the demonstration example e8x94c.dat on deformation of a plate. Without use of file u8x94c.f on Fortran with the method usplit_mesh, shown below, deformation of a plate is run without a splitting of faces of the hexagon finite elements. After adding file u8x94c.f, deformation of a plate is run with a splitting of faces (written above in code in the method usplit_mesh) of hexagon finite elements.

In file u8x94c.f is declared the method usplit_mesh with ten parameters, stated below. From the theory of programming it is known, that the method usplit_mesh is not run, until it is called with a task of certain values for all ten parameters, for example with the value “1” for the variable “icall”. At running of the demonstration example e8x94c.dat on deformation of a plate with use of file u8x94c.f with method usplit_mesh, somewhere is called the method usplit_mesh with the certain values for all ten parameters, but where is called, it is unknown.

What code should be written in the method usplit_mesh, shown below, to learn, where the method usplit_mesh is called? Thanks.

      subroutine usplit_mesh(icall,nodelist,nlist,iedgelist,nedgelist,

     $     ifacelist,nfacelist,inc,time,timeinc)

#ifdef _IMPLICITNONE

      implicit none

#else

      implicit logical (a-z)

#endif

      integer nodelist,nlist,iedgelist,nedgelist,ifacelist,nfacelist

      integer icall,inc

      real*8  time,timeinc

      dimension nodelist(*),iedgelist(2,*),ifacelist(4,*)

      integer num,i,alt

      if (icall.eq.1) then

        alt=3

c  alternative 1: specify a sequence of nodes

        if (alt.eq.1) then

          nlist=7

          num=0

          do i=57,63

            num=num+1

            nodelist(num)=i

          enddo

        elseif (alt.eq.2) then

c alternative 2: specify a list of edges in any order

          nedgelist=6

          iedgelist(1,1)=57

          iedgelist(2,1)=58

          iedgelist(1,2)=62

          iedgelist(2,2)=63

          iedgelist(1,3)=59

          iedgelist(2,3)=60

          iedgelist(1,4)=58

          iedgelist(2,4)=59

          iedgelist(1,5)=60

          iedgelist(2,5)=61

          iedgelist(1,6)=61

          iedgelist(2,6)=62

        elseif (alt.eq.3) then

c  3d: give a list of faces

          nfacelist=4

          ifacelist(1,1)=819

          ifacelist(2,1)=817

          ifacelist(3,1)=822

          ifacelist(4,1)=824

c    

          ifacelist(1,2)=817

          ifacelist(2,2)=57

          ifacelist(3,2)=58

          ifacelist(4,2)=822

c    

          ifacelist(1,3)=829

          ifacelist(2,3)=827

          ifacelist(3,3)=822

          ifacelist(4,3)=824

c

          ifacelist(1,4)=822

          ifacelist(2,4)=827

          ifacelist(3,4)=58

          ifacelist(4,4)=59

        endif

      endif

      return

      end

Zone: 

Thread Topic: 

Question
121 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

You can add a USE IFPORT statement in the subroutine that you want and CALL TRACEBACKQQ() at a selected location in the subroutine. You may also pass optional arguments to that routine if you wish, especially if you want the program to print a traceback and continue execution; see the TRACEBACKQQ documentation for details. You should compile with the /traceback option if you use this approach and you want line numbers in the traceback.

Note that if you build a DLL with such a call to TRACEBACKQQ and that DLL is called by a package such as MARC, Fluent, etc., you may not find the traceback information to be of much use since there are no debug symbols in the caller chain.

Thanks for your recommendations.

On this subject on the USE IFPORT statement, I have seen the corresponding links:

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

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

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

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

https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux...

https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux...

https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux...

https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux...

https://software.intel.com/en-us/comment/1904093

https://software.intel.com/en-us/articles/the-intel-fortran-compiler-ran...

https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux...

 

In MSC.Marc with the Intel XE 2015 Fortran compiler in the usplit_mesh method, given above, after the line

#endif

 

I wrote the statement

USE IFPORT

 

and in the *.log file I received the following error message:

 

u8x94c.f(104): error #6278: This USE statement is not positioned correctly within the scoping unit.

      USE IFPORT

 

Write, please, how it is correct to write USE IFPORT and CALL TRACEBACKQQ() in the usplit_mesh method, given above? Thanks.

See the Fortran documentation; specifically, see https://software.intel.com/en-us/node/678493 regarding the rules on the placement of USE statements.

In general, unqualified Web searches often yield too many "results" to be useful. This is especially true of searches related to the syntax rules of a programming language.

Following the page:

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

in the usplit_mesh method, given above, after the line:

subroutine usplit_mesh(icall,nodelist,nlist,iedgelist,nedgelist,

     $     ifacelist,nfacelist,inc,time,timeinc)

I wrote the line:

USE IFCORE

and after the line:

      if (icall.eq.1) then

        alt=3

I wrote a line:

CALL TRACEBACKQQ()

After start on running of a demonstration example of e8x94c.dat with u8x94c.f, Marc with the Intel XE 2015 Fortran compiler solved this task, however a traceback report is absent.

How to define, where the method usplit_mesh is called by specific parameters? Thanks.

That seems to be an ill-considered location for a call to TRACEBACKQQ. What do you expect the value of ICALL to be? If that is anything different from 1, there will be no traceback printed.

It would probably be better to make the call to TRACEBACKQQ the very first executable statement in the subroutine.

I wrote  the line CALL TRACEBACKQQ() in different places, but there is no answer to a question.

The question remains open: Where in Marc, to the usplit_mesh method, the concrete parameters are set? Thanks.

The tracebackqq report is probably sent to one of the Marc output files or alternatively into a blackhole. The environment variable FOR_DIAGNOSTIC_LOG_FILE=c:\mylog.txt can be set to direct the output to a named file.

 

but do you even know if usplit_mesh is even called my marc in your tests? Write some output to a file to prove that.....

 

Thanks for answers.

We carry out: Marc, File, Import, Marc Input, and we import the Marc demonstration file e8x94c.dat. In a graphic window, the plate appears. We add the file u8x94c.f to the Run Job panel, and we click the Submit button. In several seconds, the solution of a task comes to an end. After the choice of commands File, Results, Open Default, Monitor results file, the plate begins to be deformed with the splitting of the faces, set above in the usplit_mesh method for alt=3.

To two files e8x94c.dat, u8x94c.f are added more the 6 files: *_job1.dat, *_job1.log, *_job1.out, *_job1.sts, *_job1.t16, *_job1.t16.mud.

What of these files to show me for you? Thanks.

Valery, please realize that most of us do not have Marc or any other FEA, so your reporting details on running such packages is not of much use. As Andrew remarked, at this point you should focus on finding out whether or not the subroutine usplit_mesh() is called. If it is not called, the questions of where it was called from and with what arguments are pointless.

It is only after you have succeeded in getting Marc to call the subroutine that you can look at the details regarding the calling sequence and argument values. I for one, and most users in this forum probably, will not be able to help you regarding those details. You really should look for a different, Marc related, forum.

Thanks for answers.

In the subroutine usplit_mesh, provided above, I wrote

      write(*,*) '"icall" is:'

      write(6,*) icall

but after a task solution in Marc with the Intel XE 2015 Fortran compiler, in three files *_job1.log, *_job1.out, * _job1.sts, which can be opened in Nodepad, there is no value for “icall”?

How to me to display the value “icall”? Thanks.

It is possible that Marc captures outputs to STDOUT. If it does, the output of WRITE(*,... statements would not appear on the console. What you can try to overcome this problem is to (i) OPEN a text file with a name such as ICALL.TXT, a unit number such as, say, 51, that is not already associated, (ii) write a message such as "ICALL - ..." to it, and close the file. If, after the Marc run, the file ICALL.TXT does not exist, that would be an indication that the subroutine was never called.

Thanks for answers.

Excuse me, please, but I understood nothing. Write, please, in more detail, how to answer a question:

How to me to display the value “icall”? Thanks.

Add these lines of code to the subroutine, after any existing declaration statements, and run as before. Look for the file icall.log after the run.

C
      integer lun
C
      lun=0
      open(file='icall.log',newunit=lun,status='replace')
      if (lun .lt. 0) then
         write(lun,'(1x,I6,2x,A,2x,i12)')lun,'ICALL = ',icall
         close(lun)
      end if
      

 

Thanks for the lines of code.

In MSC.Marc with the Intel XE 2015 Fortran compiler, in file u8x94c.f, I wrote the code, which you kindly provided, in the subroutine usplit_mesh (shown above), I executed this demonstration example e8x94c.dat of Marc, in the folder C, Users, Valery, I opened the file icall.log in Notepad, and I received the record:

   -150  ICALL =              3

In this subroutine usplit_mesh from lines:

      if (icall.eq.1) then

        alt=3

follows, that the parameter icall should be equal to 1. For value icall=3, the code, given in this subroutine, will not be run, but it is run.

Why the parameter icall is equal 3 in the file icall.log instead of 1? Thanks.

Your findings in #16 establish that

  1. the subroutine usplit_mesh() is, indeed, called by Marc,
  2. The value of ICALL is not 1, as you may have expected, but 3,
  3. The subroutine has no provision for handling the case ICALL = 3

The question of why ICALL=3 is one that I cannot answer, not being a Marc user. You should, however, be able to call TRACEBACKQQ as the first statement in the subroutine and obtain a traceback listing that you can use in a Marc forum.

Thanks for answers.

Following the page:

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

in the subroutine usplit_mesh, given above, after the line:

subroutine usplit_mesh(icall,nodelist,nlist,iedgelist,nedgelist,

     $     ifacelist,nfacelist,inc,time,timeinc)

I wrote the line:

USE IFCORE

and after the line:

      if (icall.eq.1) then

        alt=3

I wrote the line:

CALL TRACEBACKQQ("My application message string")

After start on running of a demonstration example of e8x94c.dat with u8x94c.f, Marc with the Intel XE 2015 Fortran compiler stopped a solution of this task.

In the folder C, Windows, Temp appeared the file MpCmdRun.log of the following contents:

MpCmdRun: Command Line: "c:\program files\windows defender\MpCmdRun.exe" SpyNetService -RestrictPrivileges -AccessKey D9367E57-FA6C-E32D-1801-71013217DD95

 Start Time: 11:41:20

MpCmdRun: End Time: 11:41:20

 

Write, please, where it is correct to write the lines:

USE IFCORE

CALL TRACEBACKQQ("My application message string")

to receive the useful messages? Thanks.

1] Firstly your Fortran code is only very small, attaching your code is MUCH better than using words to describe what you did

2] Please please use the {code} Fortran option (like below) to add code, it makes it readable

3] If you call TRACEBACKQQ without user_exit_code=-1 it will assume user_exit_code=0 and terminate the program.

4] With MARC user Fortran make a "test" main program so you can use the debugger to step through the code to make sure it does what you want it to before trying ruin run MARC.

4] I have added some source that should help you (and tested it)

      subroutine usplit_mesh(icall,nodelist,nlist,iedgelist,nedgelist,
     $     ifacelist,nfacelist,inc,time,timeinc)
      use ifport, only: setenvqq
      use ifcore, only: TRACEBACKQQ
      implicit none
 
      integer nodelist,nlist,iedgelist,nedgelist,ifacelist,nfacelist
      integer icall,inc
      real*8  time,timeinc
      dimension nodelist(*),iedgelist(2,*),ifacelist(4,*)
      integer num,i,alt
      integer lun
      logical lret
C
      lun = 0
      open( file='icall.log', newunit=lun, status='unknown',
     +      access='append' )
      if (lun /= 0) then
         write(lun,'(1x,I6,2x,A,2x,i12)') lun,'ICALL = ',icall
         close(lun)
         lret = setenvqq("FOR_DIAGNOSTIC_LOG_FILE=icall.log")
         CALL TRACEBACKQQ("My application message string",
     +                     user_exit_code=-1)        
      end if
c      
      if (icall.eq.1) then
        alt=3
c  alternative 1: specify a sequence of nodes
        if (alt.eq.1) then
          nlist=7
          num=0
          do i=57,63
            num=num+1
            nodelist(num)=i
          enddo
        elseif (alt.eq.2) then
c alternative 2: specify a list of edges in any order
          nedgelist=6
          iedgelist(1,1)=57
          iedgelist(2,1)=58
          iedgelist(1,2)=62
          iedgelist(2,2)=63
          iedgelist(1,3)=59
          iedgelist(2,3)=60
          iedgelist(1,4)=58
          iedgelist(2,4)=59
          iedgelist(1,5)=60
          iedgelist(2,5)=61
          iedgelist(1,6)=61
          iedgelist(2,6)=62
        elseif (alt.eq.3) then
c  3d: give a list of faces
          nfacelist=4
          ifacelist(:,1) = [819,817,822,824]
          ifacelist(:,2) = [817,57,58,822]
          ifacelist(:,3) = [829,827,822,824]
          ifacelist(:,4) = [822,827,58,59]
        endif
      endif
      return
      end
program main
      implicit none
      integer :: nlist, nedgelist, nfacelist
      integer :: nodelist(7), iedgelist(2,6), ifacelist(4,6)
      integer :: icall, inc
      real(8) ::  time, timeinc  
      do ICALL = 1, 3
        call usplit_mesh(icall,nodelist,nlist,iedgelist,nedgelist,ifacelist,nfacelist,inc,time,timeinc)
      enddo
end program main
   -129  ICALL =              1
My application message string
Image              PC        Routine            Line        Source             
libifcoremdd.dll   5C295B1B  Unknown               Unknown  Unknown
functest.exe       008C12AA  _USPLIT_MESH               22  Source2.for
functest.exe       008C1081  _MAIN__                     8  Source1.f90
functest.exe       008C18AF  Unknown               Unknown  Unknown
functest.exe       008C4209  Unknown               Unknown  Unknown
functest.exe       008C434D  Unknown               Unknown  Unknown
KERNEL32.DLL       76F062C4  Unknown               Unknown  Unknown
ntdll.dll          77A50FD9  Unknown               Unknown  Unknown
ntdll.dll          77A50FA4  Unknown               Unknown  Unknown
   -130  ICALL =              2
My application message string
Image              PC        Routine            Line        Source             
libifcoremdd.dll   5C295B1B  Unknown               Unknown  Unknown
functest.exe       008C12AA  _USPLIT_MESH               22  Source2.for
functest.exe       008C1081  _MAIN__                     8  Source1.f90
functest.exe       008C18AF  Unknown               Unknown  Unknown
functest.exe       008C4209  Unknown               Unknown  Unknown
functest.exe       008C434D  Unknown               Unknown  Unknown
KERNEL32.DLL       76F062C4  Unknown               Unknown  Unknown
ntdll.dll          77A50FD9  Unknown               Unknown  Unknown
ntdll.dll          77A50FA4  Unknown               Unknown  Unknown
   -131  ICALL =              3
My application message string
Image              PC        Routine            Line        Source             
libifcoremdd.dll   5C295B1B  Unknown               Unknown  Unknown
functest.exe       008C12AA  _USPLIT_MESH               22  Source2.for
functest.exe       008C1081  _MAIN__                     8  Source1.f90
functest.exe       008C18AF  Unknown               Unknown  Unknown
functest.exe       008C4209  Unknown               Unknown  Unknown
functest.exe       008C434D  Unknown               Unknown  Unknown
KERNEL32.DLL       76F062C4  Unknown               Unknown  Unknown
ntdll.dll          77A50FD9  Unknown               Unknown  Unknown
ntdll.dll          77A50FA4  Unknown               Unknown  Unknown

 

Thanks for the code.

I inserted in Notepad the code, which you kindly provided, into the file u8x94c.f instead of the previous subroutine usplit_mesh, shown above.

After start on running of a demonstration example of e8x94c.dat with u8x94c.f, Marc with the Intel XE 2015 Fortran compiler displayed the following errors:

Default bin directory: C:\MSC.Software\Marc\2016.0.0\marc2016\bin\win64i8

Material database    : C:\MSC.Software\Marc\2016.0.0\marc2016\AF_flowmat\ 

ifort  /fpp /c /DWIN32_intel  -D_IMPLICITNONE /nologo /integer_size:64 -DI64 -DMKL -DOPENMP -DOMP_COMPAT -D_MSCMARC -DWIN64  /I"C:\MSC.Software\Marc\2016.0.0\marc2016\common" /I"C:\MSC.Software\Marc\2016.0.0\marc2016\bcsgpusolver\common" /I"C:\MSC.Software\Marc\2016.0.0\marc2016\mumpssolver\include" /I"C:\MSC.Software\Marc\2016.0.0\marc2016\intelmpi\win64\include" /O2 /Qip /Qvec- /Qsafe-cray-ptr /switch:fe_old_modvar /W0  /Qopenmp /Qopenmp-threadprivate:compat  -DCASI -DPARDISO -DMUMPS -DBCSGPU -DCUDA /MD -DDDM /object:"C:\Users\Valerij\u8x94c.obj"  "C:\temp\e8x94c_var26\u8x94c.f"

C:\temp\e8x94c_var26\u8x94c.f(14): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( % [ : . = =>

      C

---------^

C:\temp\e8x94c_var26\u8x94c.f(16): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( * <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> ...

            open( file='icall.log', newunit=lun, status='unknown',

--------------------------------------------------------------------^

C:\temp\e8x94c_var26\u8x94c.f(17): error #5276: Unbalanced parentheses

           +      access='append' )

------------------------------------^

C:\temp\e8x94c_var26\u8x94c.f(17): error #5082: Syntax error, found '+' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK PROGRAM BLOCKDATA MODULE INTEGER REAL COMPLEX ...

           +      access='append' )

-------------^

C:\temp\e8x94c_var26\u8x94c.f(22): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( * ) :: , <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> ...

               CALL TRACEBACKQQ("My application message string",

------------------------------------------------------------------^

C:\temp\e8x94c_var26\u8x94c.f(23): error #5276: Unbalanced parentheses

           +                     user_exit_code=-1)       

----------------------------------------------------^

C:\temp\e8x94c_var26\u8x94c.f(23): error #5082: Syntax error, found '+' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK PROGRAM BLOCKDATA MODULE INTEGER REAL COMPLEX ...

           +                     user_exit_code=-1)       

-------------^

C:\temp\e8x94c_var26\u8x94c.f(25): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( % [ : . = =>

      c     

---------------^

C:\temp\e8x94c_var26\u8x94c.f(28): error #5082: Syntax error, found IDENTIFIER 'SPECIFYASEQUENCEOFNODES' when expecting one of: BLOCK DO FORALL SELECT SELECTCASE SELECTTYPE WHERE ASSOCIATE CRITICAL IF

      c  alternative 1: specify a sequence of nodes

--------------------------^

C:\temp\e8x94c_var26\u8x94c.f(37): error #5082: Syntax error, found IDENTIFIER 'SPECIFYALISTOFEDGESINANYORDER' when expecting one of: BLOCK DO FORALL SELECT SELECTCASE SELECTTYPE WHERE ASSOCIATE CRITICAL IF

      c alternative 2: specify a list of edges in any order

-------------------------^

C:\temp\e8x94c_var26\u8x94c.f(52): error #5082: Syntax error, found IDENTIFIER 'GIVEALISTOFFACES' when expecting one of: BLOCK DO FORALL SELECT SELECTCASE SELECTTYPE WHERE ASSOCIATE CRITICAL IF

      c  3d: give a list of faces

---------------^

C:\temp\e8x94c_var26\u8x94c.f(69): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( * ) :: , . % + - [ : . ** / // .LT. < .LE. <= .EQ. == ...

              call usplit_mesh(icall,nodelist,nlist,iedgelist,nedgelist,iface

-------------------------------------------------------------------------------^

C:\temp\e8x94c_var26\u8x94c.f(69): error #6404: This name does not have a type, and must have an explicit type.   [IFACE]

              call usplit_mesh(icall,nodelist,nlist,iedgelist,nedgelist,iface

--------------------------------------------------------------------------^

compilation aborted for C:\temp\e8x94c_var26\u8x94c.f (code 1)

compile failed for C:\Users\Valerij\u8x94c.f

         Marc Exit number 3

 

I tried to correct independently errors, but I do not have enough knowledge of Fortran.

Help to correct errors, please. Thanks.

In an old style FIXED format source file columns 1-6 are usually are usually blank and the Fortran starts in col 7. In the #19 source the $ on line 2 and the + on line 17 and 23 is in col 6 indicating a continuation line. If it is not col 6 then errors will result...

i think your source file formatting is a bit screwed. If you hover your mouse over the source in #19 a menu appears at the top right and if you click the <> icon you get a plain text popup window that you can just select all then copy paste into a Fortran file....

I also suggest it would help you if you get a primer on Fortran and do a little reading to understand basics.

 

Thanks for answers.

In two code lines, brought above:

16

      open( file='icall.log', newunit=lun, status='unknown',

17

     +      access='append' )

my Intel Visual Fortran Compiler XE 15.0.3 for Windows 7 shows the following errors:

C:\temp\e8x94c_var27\u8x94c.f(16): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( * <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> ...

            open( file='icall.log', newunit=lun, status='unknown',

--------------------------------------------------------------------^

C:\temp\e8x94c_var27\u8x94c.f(17): error #5276: Unbalanced parentheses

           +      access='append' )

------------------------------------^

C:\temp\e8x94c_var27\u8x94c.f(17): error #5082: Syntax error, found '+' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK PROGRAM BLOCKDATA MODULE INTEGER REAL COMPLEX ...

           +      access='append' )

-------------^

I changed these two code lines in different variants, but errors do not disappear. Such impression, that we have different compilers of Intel, and if your compiler does not find an error, then my compiler finds errors.

Write, please, as to me to write these two code lines for my Intel Visual Fortran Compiler XE 15.0.3 for Windows 7, that there were no errors. Thanks.

The code should work in ANY version, attach your source file an we can see what is wrong.

Most probably, Valery has introduced blanks and tabs by copying the code and pasting in Notepad. If he does not follow the advice to learn the basic syntax rules of Fortran and the rules for fixed form Fortran (see #21), such hurdles will persist.

Thanks for answers.

Mr. Andrew_4619, I copied your advanced and already debugged (in what editor?) code, which you kindly provided above, inserted into Word, and then from Word, by 1st variant, inserted into Notepad, deleted row numbers, saved as the u8x94c.f file, added to Marc, at a solution of the example e8x94c.dat, Marc connected the Intel Visual Fortran Compiler XE 15.0.3 and in the *.log file Marc displayed those errors, which I showed in the previous post. By the 2nd variant, I inserted your code from Word not into Notepad, and into Visual Studio 2017 (File, New, File, Text File, Open) and further received the same errors, as VS 2017 does not give the chance to debug a code on Fortran.

As I understood Mr. Mecej4, for editing the advanced code of Mr. Andrew_4619, it is necessary to use not Notepad, and some other editor.

What editor and debugger of code on Fortran I should use instead of Notepad for editing the code of Mr. Andrew_4619, that after adding in Marc, I did not receive the error messages? Thanks.

go back to #21/Notepad words just fine. WORD is a disaster stay away!

Thanks for answers.

Mr. Andrew_4619, in #19 in your 1st program, I clicked the <> icon, inserted into Notepad, passing Word, saved as u8x94c.f, added to Marc, and Marc with the Intel Visual Fortran Compiler XE 15.0.3 solved the example e8x94c.dat without errors.

But when from #19, in Notepad, to your 1st program, I added from #19 your following 2nd program:

      program main

      implicit none

      integer :: nlist, nedgelist, nfacelist

      integer :: nodelist(7), iedgelist(2,6), ifacelist(4,6)

      integer :: icall, inc

      real(8) ::  time, timeinc 

      do ICALL = 1, 3

        call usplit_mesh(icall,nodelist,nlist,iedgelist,nedgelist,ifacelist,nfacelist,inc,time,timeinc)

      enddo

      end program main

 

that the following errors appeared:

ifort  /fpp /c /DWIN32_intel  -D_IMPLICITNONE /nologo /integer_size:64 -DI64 -DMKL -DOPENMP -DOMP_COMPAT -D_MSCMARC -DWIN64  /I"C:\MSC.Software\Marc\2016.0.0\marc2016\common" /I"C:\MSC.Software\Marc\2016.0.0\marc2016\bcsgpusolver\common" /I"C:\MSC.Software\Marc\2016.0.0\marc2016\mumpssolver\include" /I"C:\MSC.Software\Marc\2016.0.0\marc2016\intelmpi\win64\include" /O2 /Qip /Qvec- /Qsafe-cray-ptr /switch:fe_old_modvar /W0  /Qopenmp /Qopenmp-threadprivate:compat  -DCASI -DPARDISO -DMUMPS -DBCSGPU -DCUDA /MD -DDDM /object:"C:\Users\Valerij\u8x94c.obj"  "C:\temp\e8x94c_var29\u8x94c.f"

C:\temp\e8x94c_var29\u8x94c.f(69): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( * ) :: , . % + - [ : . ** / // .LT. < .LE. <= .EQ. == ...

        call usplit_mesh(icall,nodelist,nlist,iedgelist,nedgelist,ifacel

------------------------------------------------------------------------^

C:\temp\e8x94c_var29\u8x94c.f(69): error #6404: This name does not have a type, and must have an explicit type.   [IFACEL]

        call usplit_mesh(icall,nodelist,nlist,iedgelist,nedgelist,ifacel

------------------------------------------------------------------^

compilation aborted for C:\temp\e8x94c_var29\u8x94c.f (code 1)

compile failed for C:\Users\Valerij\u8x94c.f

         Marc Exit number 3

 

If to comment out a line “implicit none”, then the 2nd error disappears, but the 1st error remains.

Write, please, how to me to add your 2nd program, that at a solution of an example e8x94c.dat, Marc with the Intel Visual Fortran Compiler XE 15.0.3 did not give an error message? Thanks.

works for me, you did have Encoding ANSI set at the bottom of notepad?

Attach the file to a post.

Valery, Andrew's main program is for testing the subroutine usplit_mesh() outside Marc. Typically, you do so at the command line or in Visual Studio.

FEA packages such as Marc are set up to call a compiler such as Ifort to compile and link a DLL, which the package can then call. You cannot build a DLL out of a Fortran main program. Even if you fix the syntax errors in the source and compile the main program using Marc+IFort, the linking phase will fail, no DLL will be produced, and you will have wasted your time and efforts.

Quote:

mecej4 wrote:

Valery, Andrew's main program is for testing the subroutine usplit_mesh() outside Marc. Typically, you do so at the command line or in Visual Studio.

FEA packages such as Marc are set up to call a compiler such as Ifort to compile and link a DLL, which the package can then call. You cannot build a DLL out of a Fortran main program. Even if you fix the syntax errors in the source and compile the main program using Marc+IFort, the linking phase will fail, no DLL will be produced, and you will have wasted your time and efforts.

From the output shown the sub-program is being compiled by MARC and failing....

 

 

 

 

 

 

 

 

 

Mr. Andrew and Mr. Mecej, thanks for answers.

Yes, I did have Encoding ANSI set at the bottom of Notepad.

Mr. Andrew, in #19 in your 1st program, I clicked the <> icon, inserted into Notepad, passing Word, saved as u8x94c.f, added to Marc, and Marc with the Intel Visual Fortran Compiler XE 15.0.3 solved the example e8x94c.dat without errors. To two files e8x94c.dat and u8x94c.f, Marc creates the 6 more files: *.mud, *_job1.dat, *_job1.log, *_job1.out, *_job1.sts, *_job1.t16. Attach file *_job1.log or any other?

But when from #19, in Notepad, to your 1st program, I added from #19 your 2nd program, there were errors. Marc creates only one short file *_job1.log, which I wrote in the previous post in a short form.

I attach this file *_job1.log.

Write, please, how to me to add your 2nd program, that at a solution of an example e8x94c.dat, Marc with the Intel Visual Fortran Compiler XE 15.0.3 did not give an error message? Thanks.

Attachments: 

AttachmentSize
Downloadapplication/octet-stream model39_job1.log2.13 KB

Attach  u8x94c.f,

Mr. Andrew, I attach the u8x94c.f file, which gives the errors, given in the model39_job1.log file, which I attached in the previous post.

If in this u8x94c.f file to delete your 2nd program “program main” from #19, Marc with the Intel Visual Fortran Compiler XE 15.0.3 solved the example e8x94c.dat without errors and with the files, specified in the previous post.

Help to correct errors, please.

Attachments: 

AttachmentSize
Downloadapplication/octet-stream u8x94c.f2.23 KB

That is clear now. See #19 item 4] and #29

Delete lines 62 to 71  (program Main .... end  program main. This is NOT part of U8x94c.f

 

Thanks for answers.

Mr. Andrew, and why your 2nd program (program main .... end  program main) from #19 is necessary and how to use it? Thanks.

using the two Fortran files you can make a program in Visual Studio not using Marc at all. You can run this using the debugger and step through the program as it runs and examine values of variables etc. for me this achieves 2 things:

1] You can test that the Fortran is legal and compiles OK

2] you can do some simple checks that the logic in your user routine makes sense and works as you expect it to, Once you put it it Marc there is an extra level of complexity added  and in my experience of such things an FEA analysis may run for a long time before and error in a user routine might get exposed so it saves time. 

Thanks for answers.

After a solution in Marc with the Intel Visual Fortran Compiler XE 15.0.3 of this example e8x94c.dat with file u8x94c.f, which is loaded above (without “program main”), with the declared subroutine usplit_mesh:

      subroutine usplit_mesh(icall,nodelist,nlist,iedgelist,nedgelist,

     $     ifacelist,nfacelist,inc,time,timeinc)

with use of the block of code, which was kindly added Mr. Andrew and Mr. Mecej:

      lun = 0

      open( file='icall.log', newunit=lun, status='unknown',

     +      access='append' )

      if (lun /= 0) then

         write(lun,'(1x,I6,2x,A,2x,i12)') lun,'ICALL = ',icall

         close(lun)

         lret = setenvqq("FOR_DIAGNOSTIC_LOG_FILE=icall.log")

         CALL TRACEBACKQQ("My application message string",

     +                     user_exit_code=-1)       

      end if

 

in the folder C, Users, Valerij, in the file icall.log, the next 22 lines are written:

   -129  ICALL =              1

   -130  ICALL =              3

   -131  ICALL =              2

   -132  ICALL =              3

   -133  ICALL =              2

   -134  ICALL =              3

   -135  ICALL =              2

   -136  ICALL =              3

   -137  ICALL =              2

   -138  ICALL =              3

   -139  ICALL =              2

   -140  ICALL =              3

   -141  ICALL =              2

   -142  ICALL =              3

   -143  ICALL =              2

   -144  ICALL =              3

   -145  ICALL =              2

   -146  ICALL =              3

   -147  ICALL =              2

   -148  ICALL =              3

   -149  ICALL =              2

   -150  ICALL =              3

In this example e8x94c.dat it is set, that the plate is deformed for 10 increments. The subroutine usplit_mesh, declared in file u8x94c.f, is not run out until it is called. Therefore, on each “inc”, subroutine usplit_mesh is called 22 times with values for icall, equal 1, 3, 2, 3, 2, … And only at icall=1, are performed the operations, leading to the deformation of the plate for 1 increment.

After a solution of this example e8x94c.dat, Marc displays the following records:

Command > *import marc_read "..\..\temp\e8x94c_var31\e8x94c.dat"

INFO: File ..\..\temp\e8x94c_var31\e8x94c.dat has been imported.

It has been assumed that the data is defined

in the same length unit as the current model (millimeter).

Command > *edit_job job1

Enter edit job :

Command > *edit_job job1

Enter edit job : *update_job

Enter edit job : *job_usersub_file ..\..\temp\e8x94c_var31\u8x94c.f

Command > *submit_job 1 *monitor_job

INFO: Analysis dimension is derived from element class hex8.

INFO: Assuming 3-D analysis!

INFO: Found 0 errors and 0 warnings.

C:\MSC.Software\Marc\2016.0.0\mentat2016\bin\submit1.bat marc default 1 1 - - model41_job1 ..\..\temp\e8x94c_var31\u8x94c.f - - - - 0 n n - - 0 1 1 0 - -

Job job1 submitted!

 

How to define, where in Marc is called the subroutine usplit_mesh with specific values 1, 3, 2, 3, 2, … for icall? Thanks.

Quote:

valery z. wrote:
How to define, where in Marc is called the subroutine usplit_mesh with specific values 1, 3, 2, 3, 2, … for icall? Thanks.

Absolutely no idea, I am not expert in use of Marc, I have used it maybe 20 years ago. Those questions are better in a Marc user forum not a Fortran user forum.

 

Quote:

Valery Z wrote:
How to define, where in Marc is called the subroutine usplit_mesh with specific values 1, 3, 2, 3, 2, … for icall?

As stated in #11 and the preceding post by Andrew_4619, this is not a forum in which that question is likely to be answered. Furthermore, since Marc is proprietary software, the proprietor may regard the answer as privileged information.

 

Thanks for answers.

Many versions of Fortran are known. What Fortran version is applied in Marc with the Intel Visual Fortran Compiler XE 15.0.3, for example in file u8x94c.f, which is loaded above, and by what international standard this version of Fortran is protected? Thanks.

If your source file has USE statements, you are using a Fortran 90/95 feature. If you do not use modules, and your source code is in fixed form, Fortran 77 is probably sufficient.

Fortran 77 documentation is considerably shorter than Fortran 95 documentation.

Thanks for answers.

Mr. Andrew, explain, please, in #19 in what systems you received, and how it is necessary to understand the following data, obtained by you? Thanks.

04

libifcoremdd.dll   5C295B1B  Unknown               Unknown  Unknown

05

functest.exe       008C12AA  _USPLIT_MESH               22  Source2.for

06

functest.exe       008C1081  _MAIN__                     8  Source1.f90

07

functest.exe       008C18AF  Unknown               Unknown  Unknown

08

functest.exe       008C4209  Unknown               Unknown  Unknown

09

functest.exe       008C434D  Unknown               Unknown  Unknown

10

KERNEL32.DLL       76F062C4  Unknown               Unknown  Unknown

11

ntdll.dll          77A50FD9  Unknown               Unknown  Unknown

12

ntdll.dll          77A50FA4  Unknown               Unknown  Unknown

I somewhere read, that, about ten years ago, Visual Studio and Visual Studio Express supported an editing and a debugging of files on Fortran.

What the Visual Studio Express version can be loaded on the website Microsoft, which can edit and debug the files on Fortran, supported by Intel Visual Fortran Compiler XE? Thanks.

Best Reply

If you read that, it was incorrect. Visual Studio Express Edition has never supported anything other than Microsoft languages (and it came into existence long after Microsoft left the Fortran market.) (One could do command-line builds of Fortran, but not debugging, with Visual Studio Express Editions.) 

However, Microsoft now offers Visual Studio Community Edition for free, if you qualify, and it does support Intel Fortran. You will need the latest version of Intel Parallel Studio XE 2017 (Update 4) to support Visual Studio 2017 Community Edition.

Steve (aka "Doctor Fortran") - Retired from Intel

In reply to #42, the two sources in #19 I made a console application project in visual studio and compiled build and ran in debug there.

Thanks for answers.

Where it is better to edit the files on Fortran, which are compiled by Intel Fortran, in Notepad or in Notepad++, and why? Thanks.

It doesn't matter - edit them in whichever text editor you prefer.

Steve (aka "Doctor Fortran") - Retired from Intel

Thanks for answers.

Answer, please, 2 questions.

1. How at this forum is defined the number of a post #?

2. How into a post to load the multi-colored program in the form of the embedded block (it was made higher than 4 times at this forum)?

Thanks.

It says Quote and #xx at the top right of each post (only if logged in I think)

{code} icon on the toolbar 

Program Fortran

 

Thanks for answers.

And how to write (by email or somehow on another) directly to one of participants of forums on this website Intel, passing a forum?

Thanks.

Well, there USED to be a "Send author a message" link, and the ability to send messages directly to individual authors, but I see that has been disabled. Intel employees can send messages but users cannot. Hmm... So at this point, there is no way to send a direct message to another user unless you know their email address.

Steve (aka "Doctor Fortran") - Retired from Intel

Pages

Leave a Comment

Please sign in to add a comment. Not a member? Join today