- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
valery z. wrote:
In the previous post I wrote, that for some reason I have no opportunity to attach files. In attempt to attach the Split_v1_f.zip, I receive the message “You are not authorized to access this page”, that I allegedly use the outdated Internet Explorer 8 browser, though I use the Mozilla Firefox browser. Therefore I provided file Split_v1_f.f from Notepad.
I apologize for the inconvenience. This issue with attachments is under investigation. It will be fixed ASAP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for answers.
After copying of file Split_v1_f.f from the book and editing in Visual Studio of 2010 Shell, I forgot to check the coding of this file. In Notepad it became visible, that the coding of the working u8x94c.f file – ANSI, and the coding of file Split_v1_f.f – UTF-8. Therefore in Notepad I changed the coding of file Split_v1_f.f from UTF-8 in ANSI and added to Marc. Now the system “Marc 2016 + Intel XE 2015 Fortran compiler” in the *.log file gave the following errors:
C:\Temp2\Split_v5\Split_v1_f.f(1): error #5118: First statement in file must not be continued
#INCLUDE 'MarcTools.f'
-----^
C:\Temp2\Split_v5\Split_v1_f.f(1): error #5102: Cannot open include file 'MarcTools.f'
#INCLUDE 'MarcTools.f'
--------------^
C:\Temp2\Split_v5\Split_v1_f.f(18): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [COMMONDATA]
USE CommonData
----------^
C:\Temp2\Split_v5\Split_v1_f.f(19): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [MARCTOOLS]
USE MarcTools
----------^
Following the recommendation of Mr. Steve Lionel, in the first line I deleted the character #:
INCLUDE 'MarcTools.f'
Now the system “Marc 2016 + Intel XE 2015 Fortran compiler” in the *.log file gave the following errors:
C:\Temp2\Split_v5\Split_v1_f.f(1): error #5102: Cannot open include file 'MarcTools.f'
INCLUDE 'MarcTools.f'
--------------^
C:\Temp2\Split_v5\Split_v1_f.f(18): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [COMMONDATA]
USE CommonData
----------^
C:\Temp2\Split_v5\Split_v1_f.f(19): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [MARCTOOLS]
USE MarcTools
----------^
I attach file Split_v1_f.f in the coding ANSI and in a format *.zip.
Write, please, how to correct these errors?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You fixed the invalid characters problem, so I don't need to see the files anymore.
Now you have to find out where MarcTools.f lives and add that path to "Additional Include Directories" in your project properties. That is obviously a component of MSC MARC which I don't have, so search your computer for it.
The error 5118 you got at first was because you started the #include not in column 1 - all preprocessor directives must start in column 1. The other errors are a fallout from that. SImilarly, because MarcTools.f was not found in the second case, the compiles failed and caused the other errors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
valery z. #83 wrote:
2. As the MarcTools.f file, I did not find in the book, and Marc did not find in the software, where to look for this file?
That file appears necessary to build a module that is used in your code and probably provides some type definitions that your code uses. It is probably a component of MSC Marc or was written by someone else who supports Marc.
There are few to no Marc users in this forum, other than yourself. If you need that file and do not have it, asking here for a copy or a substitute is not going to solve your problem. Ask MSC or another Marc user, if you know any.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for answers.
Answer, please, a question.
I did not find file MarcTools.f neither in the book, nor in Marc. It turns out, that incomplete programs on Fortran are presented in this book. These programs cannot be checked, whether correctly they are written or not. It is impossible to repeat that example, which is solved by means of these programs on Fortran.
Besides, in the book there are no screenshots before a split of finite elements and after split. And it means, that there is no confirmation, that authors really debugged these programs and solved an objective on a split of finite elements.
I can be mistaken, but, in my opinion to opinion, in this book authors provided unreliable information about a task solution by means of programs on Fortran.
You agree?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, I do not have Marc or the book that you mention, so I cannot comment.
It is possible that the file Marctools.f was made available to purchasers of the book, on a disk or a CD, or online. Have you thought of contacting the authors? You can locate one of them at Griffith University (Australia):
https://www.griffith.edu.au/engineering-information-technology/griffith-school-engineering/staff/professor-andreas-Ochsner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mr. Mecej, thanks for answers.
On the page of this book on the website of publishing house it is impossible to load the files for Marc and Intel Fortran compiler.
If to write to authors of the book, then they, naturally, will answer, that all programs on Fortran are debugged and perfectly work. And if to ask them to provide the *.mud file for Marc and the *.f file for Intel Fortran compiler for an example 4.2.3 of the book, then, most likely, authors will refuse.
In my opinion, this book – a set of not debugged programs with a set of errors. In the book there is no screenshot, confirmatory, that programs on Fortran were debugged, and engineering examples in Marc are solved. For example, according to the program, provided above from the book, Mr. Mecej wrote in a post from 07/08/2017:
Regarding "in this program on Fortran there are errors or not?", you can obtain part of the answer by first running the compiler on the code. I see many errors, and the compiler can probably find more.
The developers of Marc in Documentation give the files *.dat for Marc and the files *.f for Intel Fortran compiler for a solution of several engineering tasks with a split of finite elements, but these tasks – "a black box": there is an input and there is an output, but the software is hidden in this “black box”.
So now I do not know, what to do, as to me to solve my engineering tasks with a split of finite elements.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Split_v1_f.f in #81 does not have errors as such it is just not complete. Some other files are needed for it to compile and you must also have the correct compiler options. If you don't have the missing files, can't find them anywhere and won't contact the original author then give up my friend.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error messages you have reported appear to be Fortran syntax errors and not Marc run errors. These can be corrected by compiling split_v1_f.f independent of Marc.
I looked at split_v1_f.f at #86 and modified it (see attached) to compile error-free with Fortran 95, independent of running Marc and not require the file MarcTools.f. However you will require the routine GetElmEdgeVal referenced from MacTools.f for Marc to run as coded, or omit this function reference to allow a run.
(ed: Note also routine ubginc references un-allocated arrays, which may require prior allocation or a valid interface that is provided via MarcTools.f)
It is unclear if MarcTools.f is simply a Fortran module of definitions for the MARC utility library or another external library of routines. There are numerous other routines referenced, which may be part of the MARC utility library or of MarcTools.f.
If MarcTools.f is simply a Fortran module of definitions, you may be able to proceed without it so with the Fortran syntax errors removed, I suggest you experiment and respond to the further error messages from Marc as you learn.
I presume you have the version of ifort that is required to build your Marc run ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mr. Andrew and Mr. John Campbell, thanks for answers.
In this book to Preface it is written:
The instructions provided in this book relate to the MSC Marc/Mentat 2014.2.0 (64 bit) version under Microsoft Windows OS and the Intel XE 2013 FORTRAN (update 5) compiler (also known as Intel FORTRAN version 13).
In my computer in the system “Marc 2016 + Intel XE 2015 Fortran compiler” I debugged the demonstration example e8x94c.dat for Marc and u8x94c.f for Intel.
After compilation of this example in Intel, Marc in the *.log file (which opens in Notepad) gives the following reports without errors:
Program name : marc
Job ID : C:\Temp2\Split_v7\model41_job1
Version type : i8
User subroutine name : u8x94c
…
ifort /fpp /c /DWIN32_intel -D_IMPLICITNONE /nologo /integer_size:64
…
LINK /nologo /out:"u8x94c.exe" "C:\MSC.Software\Marc\2016.0.0\marc2016\lib\win64i8\main.obj"
…
This is a successful completion to a Marc simulation, indicating that no additional incremental data was found and that the analysis is complete.
Marc 2016.0.0
Exit number 3004
If instead of the u8x94c.f file to add to Marc from the book the Split_v1_f.f file, which I loaded above, then in the *.log file there are error messages, which I stated above.
Following the file, which was loaded Mr. John Campbell, I commented out all lines with the word “MarcTools”.
As in subroutine
SUBROUTINE ubginc(ubInc,ubIncsub)
there is a subroutine call:
CALL ExtractSetItemLst(SETNAME, elLst , elNum)
that to the Split_v1_f.f file I added the subroutine ExtractSetItemLst from the book.
I loaded file Split_v1_f.f below.
But in line:
INTEGER : : tItemLst(MAX_SET_ITEM) , isFound , setType , i
Intel gives the following error message:
C:\Temp2\Split_v13\Split_v1_f.f(22): error #6219: This variable, used in a specification expression, must be a dummy argument, a COMMON block object, or an object accessible through host or use association. [MAX_SET_ITEM]
INTEGER : : tItemLst(MAX_SET_ITEM) , isFound , setType , i
How to correct this error?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please note that the variable MAX_SET_ITEM is never declared in your source file.
In this situation it needs to be a constant of some sort (there are places where it can be a common variable or a dummy argument, but not this case)
--Lorri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ms. Lorri Menard, thanks for answers, but how to correct this error, as where it is necessary to write?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If as you say the user routine compiles and runs from within MSC-Marc then any external subroutines used must be actually a part of the Marc system with a library or dll. You really need to read deeper into the marc documentation You will not find answers to that question in this forum .....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mr. Andrew, thanks for answers.
But how to correct the error, connected with the variable MAX_SET_ITEM and revealed by Intel compiler in file Split_v1_f.f (#94) irrespective of Marc?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to define an integer parameter with that name. You could add a line like this before the line with the error:
integer, parameter :: MAX_SET_ITEM = 100
(I have no idea how big the number needs to be).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mr. Gib, many thanks, with your help I corrected this error, when I wrote:
INTEGER , PARAMETER : : MAX_SET_ITEM = 1000
Further I added the function:
FUNCTION GetElmEdgeVal ( nodID1 , nodID2 , elmCode , calcMeth )
…
however in line:
edgeStress ( i ) =
& GetElmEdgeVal ( edgeList ( 1 , i ) , edgeList ( 2 , i ) , 17 , 2)
Intel compiler gives the following error message:
C:\Temp2\Split_v15\Split_v1_f.f(147): error #6404: This name does not have a type, and must have an explicit type. [GETELMEDGEVAL]
& GetElmEdgeVal ( edgeList ( 1 , i ) , edgeList ( 2 , i ) , 17 , 2)
-------^
compilation aborted for C:\Temp2\Split_v15\Split_v1_f.f (code 1)
compile failed for C:\Temp2\Split_v15\Split_v1_f.f
Marc Exit number 3
FUNCTION GetElmEdgeVal ( nodID1 , nodID2 , elmCode , calcMeth ) INTEGER , INTENT ( IN ) : : nodID1 , nodID2 , elmCode , calcMeth REAL*8 : : GetElmEdgeVal GetElmEdgeVal = & ( GetNodIPVal ( nodID1 , elmCode , calcMeth ) + & GetNodIPVal ( nodID2 , elmCode , calcMeth ) ) / 2.D0 END FUNCTION GetElmEdgeVal SUBROUTINE uedinc ( inc , incsub ) USE CommonData c USE MarcTools, ONLY: GetElmEdgeVal IMPLICIT NONE c ! ?? St a r t of generated type statements ?? INTEGER inc , incsub c ! ?? End of generated type statements ?? INTEGER : : i IF (inc.GT.0) THEN DO i = 1 , edgeCount edgeStress ( i ) = & GetElmEdgeVal ( edgeList ( 1 , i ) , edgeList ( 2 , i ) , 17 , 2) WRITE( 6 , * ) edgeList ( 1 , i ) , ' - ' , edgeList ( 2 , i ) WRITE ( 6 , * ) ' stress ' , edgeStress ( i ) END DO END IF RETURN END
I loaded file Split_v1_f.f below.
How to correct this error?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Presumably, one of your include files has IMPLICIT NONE, which is why you received the error message regarding GetElmEdgeVal not having a known type. Simply add the declaration
REAL
*8 : : GetElmEdgeVal
to the subprogram in which you invoke this function. You can learn about these topics by reading Fortran textbooks and manuals.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mr. Mecej, many thanks, with your help I corrected this error.
At compilation of part:
MODULE CommonData IMPLICIT NONE CHARACTER*32, PARAMETER : : SETNAME = 'ElementList' REAL*8, PARAMETER : : yStress = 210.D0 INTEGER, ALLOCATABLE : : edgeList( : , : ) INTEGER : : edgeCount REAL*8, ALLOCATABLE : : edgeStress( : ) LOGICAL , ALLOCATABLE : : yMask( : ) END MODULE CommonData
of file Split_v1_f.f (#94), Intel compiler in the same folder, where the *.f file is located, creates the file commomdata.mod.
Explain, please, why Intel creates the file commomdata.mod?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
valery z. wrote:
Explain, please, why Intel creates the file commomdata.mod?
When the compiler encounters a USE COMMONDATA statement, it needs to read the matching module information file. The encoded definitions of types, variables and interfaces that are present in the module are then used in compile the subprograms that contain the USE statement.
These .mod files vary in format from compiler to compiler and are almost never portable between compilers or compiler versions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for answers.
In system “Marc + Intel compiler” some variables in file Split_v1_f.f (#94) are global external for communication with Marc. For example, in the *.f file in line, written down in my previous post:
REAL*8, PARAMETER : : yStress = 210.D0
the variable “yStress” is used for comparison with stresses, which will be calculated by Marc in finite elements at deformation of a plate.
How to define, what variables in file Split_v1_f.f (#94) are external global for communication with Marc?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On my computer in the system “Marc 2016 + Intel XE 2015 Fortran compiler” I added all subroutines from the book and debugged them. Now Intel compiles file Split_v1_f.f without errors and gives reports in the file *.log of Marc, which are described above in a post #94 from 08/20/2017.
In Marc I designed an example 4.2.3 from the book in the form of the *.mud file on deformation of a plate with an hole. Without adding the file *.f, Marc carries out the *.mud file without errors, i.e. at inclusion of animation there is a deformation of a plate, but without split of finite elements.
That deformation of a plate was carried out with split of finite elements (as it is carried out in practice when testing a sample for tensile), to the file *.mud I added the file *.f. Intel compiles the *.f file without errors, however Marc gives an error message 7001.
Write, please, what code on Fortran needs to be written in the Split_v1_f.f file, loaded below, in each subroutine to define, in what subroutine on Fortran, Marc gives an error?
Thanks.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page