dr-bill-c / mystran Goto Github PK
View Code? Open in Web Editor NEWMYSTRAN is a general purpose finite element analysis solver
License: MIT License
MYSTRAN is a general purpose finite element analysis solver
License: MIT License
Build fails on my system using gfortran 12.1 and cmake 3.23. The error is the following:
[ 39%] Building Fortran object CMakeFiles/LK1.dir/Source/LK1/L1B/CORD_PROC.f90.o
/usr/bin/f95 -DINTEGER_STAR_8 -I/home/miguel/src/MYSTRAN/Source/INCLUDE -I/home/miguel/src/MYSTRAN/superlu-5.2.2/SRC -I/home/miguel/src/MYSTRAN/f2c/include -g -JBinaries/mod -c /home/miguel/src/MYSTRAN/Source/LK1/L1B/CORD_PROC.f90 -o CMakeFiles/LK1.dir/Source/LK1/L1B/CORD_PROC.f90.o
/home/miguel/src/MYSTRAN/Source/LK1/L1B/CORD_PROC.f90:1447:59:
408 | IF (PRTCORD == 2) CALL PARAM_PRTCORD_OUTPUT ( '33' )
| 2
......
1447 | WRITE(F06,7302) CID, GA(J), CIDA, (RGA(J,K),K=1,3)
| 1
Error: Index variable ‘k’ redefined at (1) in procedure ‘param_prtcord_output’ called from within DO loop at (2)
/home/miguel/src/MYSTRAN/Source/LK1/L1B/CORD_PROC.f90:1448:59:
408 | IF (PRTCORD == 2) CALL PARAM_PRTCORD_OUTPUT ( '33' )
| 2
......
1448 | WRITE(F06,7302) CID, GB(J), CIDB, (RGB(J,K),K=1,3)
| 1
Error: Index variable ‘k’ redefined at (1) in procedure ‘param_prtcord_output’ called from within DO loop at (2)
/home/miguel/src/MYSTRAN/Source/LK1/L1B/CORD_PROC.f90:1449:59:
408 | IF (PRTCORD == 2) CALL PARAM_PRTCORD_OUTPUT ( '33' )
| 2
......
1449 | WRITE(F06,7302) CID, GC(J), CIDC, (RGC(J,K),K=1,3)
| 1
Error: Index variable ‘k’ redefined at (1) in procedure ‘param_prtcord_output’ called from within DO loop at (2)
make[2]: *** [CMakeFiles/LK1.dir/build.make:1999: CMakeFiles/LK1.dir/Source/LK1/L1B/CORD_PROC.f90.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:360: CMakeFiles/LK1.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Apparently in fortran index variables cannot be redefined inside the loop, so this code wont compile. I dont know if there are any options available in the compiler to allow this. Maybe the loops should be rewritten as explained here? https://stackoverflow.com/a/64838060
I was comparing some results (CBAR and CBUSH only) against NX-NASTRAN and found issues with non-null length CBUSH. Checking `EMG/EMG3/BUSH.f90 (is it the good file?) we can indeed see that CBUSH stiffness matrix is not appropriate for length > 0.
I can provide test-cases and matrix formulation if required.
Thanks
In the attached archive, you will find:
Issues are found in both F06 and NEU outputs for CBUSH internal forces.
Displacements and boundary reactions are OK.
Internal forces for BARs are OK.
I suspect that the X and Y blocked DOF on the upper node of CBUSHes are interfering with element internal forces calculations.
I am following the instructions in the pdf to build on a CentOS 7 system. The compilation gets to 100% but then errors out with this message:
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libf2c.so: undefined reference to `MAIN__'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/mystran.dir/build.make:21936: Binaries/mystran] Error 1
make[1]: *** [CMakeFiles/Makefile2:421: CMakeFiles/mystran.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
I have installed f2c and f2c-libs via yum. I downloaded the installation files via:
wget https://github.com/dr-bill-c/MYSTRAN/archive/refs/heads/master.zip
This is a re-open of #12
The issue seems to be platform dependent and confirmed under Linux:
Besides wrong results shown, it misses the whole "O U T P U T F R O M T H E G R I D P O I N T W E I G H T G E N E R A T O R F O R O V E R A L L M O D E" section.
Mystran should add op2 support
test_case_02.zip
In the attached archive are found:
failures are found in SPC forces (reactions) and CBAR Engr Forces
The red values in the XLSX files do not match between "Actual" (MSYTRAN) and "Expected" (NX).
[edit] when offset is the same at both extremities, results are OK
[edit] In the current version, with the lack of K6ROT parameter, this is the intended behavior. I turn the bug report to feature request to keep track of it. @dr-bill-c, feel free to close it if you want.
[/edit]
The attached simply-supported 4x4 CQUAD4 plate is constrained on its boundaries (SPC=123).
MYSTRAN (Version 13.2a - Oct 05 2021) fails to run it when AUTOSPC is deactivated with the following message:
*ERROR 9903: SUPERLU SPARSE SOLVER HAS FAILED WITH INFO = 78 IN SUBR SYM_MAT_DECOMP_SUPRLU CALLED BY SUBR LINK3
When AUTOSPC is activated, F06 reports that MYSTRAN is constraining Axis #6 for all the 25 nodes:
*INFORMATION: AUTOSPC Summary, Stage 1 after identification of AUTOSPC's at the grid level
AUTOSPC_RAT = 1.000000E-08
Number of DOF's identified for AUTOSPC in component 1 = 0
Number of DOF's identified for AUTOSPC in component 2 = 0
Number of DOF's identified for AUTOSPC in component 3 = 0
Number of DOF's identified for AUTOSPC in component 4 = 0
Number of DOF's identified for AUTOSPC in component 5 = 0
Number of DOF's identified for AUTOSPC in component 6 = 25
------------
Total number of DOF's identified in this stage = 25
Is really cmake 3.18 needed for Mystran? On Debian buster only 3.13.4 is installed?
cheers bernd
In subroutine RESTART_DATA_FOR_L3 the following CALL OUTA_HERE gives a compile error in debug configuration with the intel compiler. To enhance the portability, it is suggested to edit the line to CALL OUTA_HERE ( 'N' ) or in any case passing the intended actual parameter
We are using mystran as part of a larger framework where we invoke mystran via a system call. To ensure we catch bugs in our code we run our framework through valgrind on a regular basis. However, because mystran does not free all allocated memory before exiting, we are getting false positives of memory leaks that cannot be suppressed. Would it be possible to free all allocated memory at the end of the main routine in mystran? Here is a list of leaks reported by valgrind, which may not be complete:
==1083443== by 0x1A8C61: allocate_dof_tables_ (ALLOCATE_DOF_TABLES.f90:169)
==1083443== by 0x38B0FE: link0_ (LINK0.f90:817)
==1083443== by 0x10B31B: MAIN__ (MYSTRAN.f90:219)
==1083443== by 0x10CF88: main (MYSTRAN.f90:70)
==1083443== by 0x1A815B: allocate_dof_tables_ (ALLOCATE_DOF_TABLES.f90:115)
==1083443== by 0x38B0E1: link0_ (LINK0.f90:816)
==1083443== by 0x10B31B: MAIN__ (MYSTRAN.f90:219)
==1083443== by 0x10CF88: main (MYSTRAN.f90:70)
==1083443== by 0x19A8FC: allocate_col_vec_ (ALLOCATE_COL_VEC.f90:89)
==1083443== by 0x53DE45: link9_ (LINK9.f90:772)
==1083443== by 0x10C01C: MAIN__ (MYSTRAN.f90:322)
==1083443== by 0x10CF88: main (MYSTRAN.f90:70)
==1083443== by 0x1E5A4F: allocate_model_stuf_ (ALLOCATE_MODEL_STUF.f90:2560)
==1083443== by 0x38F219: link1_ (LINK1.f90:146)
==1083443== by 0x10B8C8: MAIN__ (MYSTRAN.f90:256)
==1083443== by 0x10CF88: main (MYSTRAN.f90:70)
==1083443== by 0x1C1EDC: allocate_misc_mat_ (ALLOCATE_MISC_MAT.f90:88)
==1083443== by 0x5235F4: link5_ (LINK5.f90:534)
==1083443== by 0x10BA24: MAIN__ (MYSTRAN.f90:284)
==1083443== by 0x10CF88: main (MYSTRAN.f90:70)
==1083443== by 0x1A86DF: allocate_dof_tables_ (ALLOCATE_DOF_TABLES.f90:143)
==1083443== by 0x38B11B: link0_ (LINK0.f90:818)
==1083443== by 0x10B31B: MAIN__ (MYSTRAN.f90:219)
==1083443== by 0x10CF88: main (MYSTRAN.f90:70)
==1083443== by 0x1DE46A: allocate_model_stuf_ (ALLOCATE_MODEL_STUF.f90:2039)
==1083443== by 0x387AB9: link0_ (LINK0.f90:341)
==1083443== by 0x10B31B: MAIN__ (MYSTRAN.f90:219)
==1083443== by 0x10CF88: main (MYSTRAN.f90:70)
==1083443== by 0x1DDE1F: allocate_model_stuf_ (ALLOCATE_MODEL_STUF.f90:2012)
==1083443== by 0x387AB9: link0_ (LINK0.f90:341)
==1083443== by 0x10B31B: MAIN__ (MYSTRAN.f90:219)
==1083443== by 0x10CF88: main (MYSTRAN.f90:70)
==1083443== by 0x1A7B80: allocate_dof_tables_ (ALLOCATE_DOF_TABLES.f90:87)
==1083443== by 0x38B0C4: link0_ (LINK0.f90:815)
==1083443== by 0x10B31B: MAIN__ (MYSTRAN.f90:219)
==1083443== by 0x10CF88: main (MYSTRAN.f90:70)
==1083443== by 0x1E2E7E: allocate_model_stuf_ (ALLOCATE_MODEL_STUF.f90:2369)
==1083443== by 0x38903A: link0_ (LINK0.f90:561)
==1083443== by 0x10B31B: MAIN__ (MYSTRAN.f90:219)
==1083443== by 0x10CF88: main (MYSTRAN.f90:70)
==1083443== by 0x1E28C3: allocate_model_stuf_ (ALLOCATE_MODEL_STUF.f90:2344)
==1083443== by 0x38903A: link0_ (LINK0.f90:561)
==1083443== by 0x10B31B: MAIN__ (MYSTRAN.f90:219)
==1083443== by 0x10CF88: main (MYSTRAN.f90:70)
==1083443== by 0x1E22DE: allocate_model_stuf_ (ALLOCATE_MODEL_STUF.f90:2317)
==1083443== by 0x38901D: link0_ (LINK0.f90:560)
==1083443== by 0x10B31B: MAIN__ (MYSTRAN.f90:219)
==1083443== by 0x10CF88: main (MYSTRAN.f90:70)
In addition, valgrind reports some use of uninitialized data:
==1083443== Conditional jump or move depends on uninitialised value(s)
==1083443== at 0x53FB5B: link9_ (LINK9.f90:981)
==1083443== by 0x10C01C: MAIN__ (MYSTRAN.f90:322)
==1083443== by 0x10CF88: main (MYSTRAN.f90:70)
I'm happy to help test out updated code designed to free this memory.
Hi there,
I just tried to compile MYSTRAN on Linux with Cmake / make, and got this error:
$ cmake .
$ make -j 4
Consolidate compiler generated dependencies of target arithchk
[ 0%] Building C object CMakeFiles/arithchk.dir/f2c/arithchk.c.o
/tmp/mystran/f2c/arithchk.c: In function ‘ccheck’:
/tmp/mystran/f2c/arithchk.c:127:9: warning: format not a string literal and no format arguments [-Wformat-security]
127 | Cray1 = printf(emptyfmt) < 0 ? 0 : 4617762;
| ^~~~~
[ 0%] Linking C executable f2c/arithchk
[ 0%] Built target arithchk
[ 0%] Generating f2c/include/arith.h
Consolidate compiler generated dependencies of target f2c
[ 0%] Building C object CMakeFiles/f2c.dir/f2c/abort_.c.o
[ 0%] Building C object CMakeFiles/f2c.dir/f2c/arithchk.c.o
/tmp/mystran/f2c/arithchk.c: In function ‘ccheck’:
/tmp/mystran/f2c/arithchk.c:127:9: warning: format not a string literal and no format arguments [-Wformat-security]
127 | Cray1 = printf(emptyfmt) < 0 ? 0 : 4617762;
| ^~~~~
[ 0%] Building C object CMakeFiles/f2c.dir/f2c/backspac.c.o
[ 0%] Building C object CMakeFiles/f2c.dir/f2c/c_abs.c.o
[ 0%] Building C object CMakeFiles/f2c.dir/f2c/c_cos.c.o
[ 0%] Building C object CMakeFiles/f2c.dir/f2c/c_div.c.o
[ 0%] Building C object CMakeFiles/f2c.dir/f2c/c_exp.c.o
[ 0%] Building C object CMakeFiles/f2c.dir/f2c/c_log.c.o
[ 0%] Building C object CMakeFiles/f2c.dir/f2c/c_sin.c.o
[ 0%] Building C object CMakeFiles/f2c.dir/f2c/c_sqrt.c.o
[ 0%] Building C object CMakeFiles/f2c.dir/f2c/cabs.c.o
[ 0%] Building C object CMakeFiles/f2c.dir/f2c/close.c.o
[ 0%] Building C object CMakeFiles/f2c.dir/f2c/ctype.c.o
[ 1%] Building C object CMakeFiles/f2c.dir/f2c/d_abs.c.o
[ 1%] Building C object CMakeFiles/f2c.dir/f2c/d_acos.c.o
[ 1%] Building C object CMakeFiles/f2c.dir/f2c/d_asin.c.o
[ 1%] Building C object CMakeFiles/f2c.dir/f2c/d_atan.c.o
[ 1%] Building C object CMakeFiles/f2c.dir/f2c/d_atn2.c.o
[ 1%] Building C object CMakeFiles/f2c.dir/f2c/d_cnjg.c.o
[ 1%] Building C object CMakeFiles/f2c.dir/f2c/d_cos.c.o
[ 1%] Building C object CMakeFiles/f2c.dir/f2c/d_cosh.c.o
[ 1%] Building C object CMakeFiles/f2c.dir/f2c/d_dim.c.o
[ 1%] Building C object CMakeFiles/f2c.dir/f2c/d_exp.c.o
[ 1%] Building C object CMakeFiles/f2c.dir/f2c/d_imag.c.o
[ 1%] Building C object CMakeFiles/f2c.dir/f2c/d_int.c.o
[ 1%] Building C object CMakeFiles/f2c.dir/f2c/d_lg10.c.o
.
.
.
[ 43%] Building Fortran object CMakeFiles/LK1.dir/Source/LK1/L1B/CORD_PROC.f90.o
/tmp/mystran/Source/LK1/L1B/CORD_PROC.f90:1447:59:
408 | IF (PRTCORD == 2) CALL PARAM_PRTCORD_OUTPUT ( '33' )
| 2
......
1447 | WRITE(F06,7302) CID, GA(J), CIDA, (RGA(J,K),K=1,3)
| 1
Error: Index variable ‘k’ redefined at (1) in procedure ‘param_prtcord_output’ called from within DO loop at (2)
/tmp/mystran/Source/LK1/L1B/CORD_PROC.f90:1448:59:
408 | IF (PRTCORD == 2) CALL PARAM_PRTCORD_OUTPUT ( '33' )
| 2
......
1448 | WRITE(F06,7302) CID, GB(J), CIDB, (RGB(J,K),K=1,3)
| 1
Error: Index variable ‘k’ redefined at (1) in procedure ‘param_prtcord_output’ called from within DO loop at (2)
/tmp/mystran/Source/LK1/L1B/CORD_PROC.f90:1449:59:
408 | IF (PRTCORD == 2) CALL PARAM_PRTCORD_OUTPUT ( '33' )
| 2
......
1449 | WRITE(F06,7302) CID, GC(J), CIDC, (RGC(J,K),K=1,3)
| 1
Error: Index variable ‘k’ redefined at (1) in procedure ‘param_prtcord_output’ called from within DO loop at (2)
make[2]: *** [CMakeFiles/LK1.dir/build.make:1999: CMakeFiles/LK1.dir/Source/LK1/L1B/CORD_PROC.f90.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:360: CMakeFiles/LK1.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Info:
$ gcc --version
gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
$ cmake --version
cmake version 3.22.1
$ make --version
GNU Make 4.3
$ f2c --version
f2c (Fortran to C Translator) version 20200916.
$ lsb_release -a
Distributor ID: Linuxmint
Description: Linux Mint 21
Release: 21
Codename: vanessa
Thanks!
The attached test-case was running fine on V12.1 but fails with V12.2 with the error:
*ERROR 1959: PROGRAMMING ERROR IN SUBROUTINE ELMGM1 BUSH 7 HAS LENGTH (INCL EFFECTS OF OFFSETS) = 9.87E+00. SHOULD BE ZERO
The bulk runs smoothly on NX-NASTRAN
I found some weired issues on CBUSH. Cf. attached test-case with one single cbush loaded under transversal loads :
Internal calculations are correct since on more complex models, displacements and reactions are still OK, whereas outpus keep wrong.
One can expect FZ (element)=1000lbf, MY (element)=-5000 lbf.in
F06 Engineering forces renders NULL values:
E L E M E N T E N G I N E E R I N G F O R C E S
F O R E L E M E N T T Y P E B U S H
Element Force Force Force Moment Moment Moment
ID XE YE ZE XE YE ZE
1 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00
------------- ------------- ------------- ------------- ------------- -------------
MAX* : 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00
MIN* : 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00
ABS* : 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00
*for output set
NEU outputs strange results :
BUSH Force ZE
-1.056389E+03, -1.056389E+03, 1.056389E+03,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 3, 8,
0, 0, 1,
1, -1.056389E+03,
-1, 0. ,
1, 51204, 1,
[...]
BUSH Moment YE
2.500000E+03, 2.500000E+03, 2.500000E+03,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 3, 8,
0, 0, 1,
1, 2.500000E+03,
-1, 0. ,
1, 51206, 1,
When running the attached bulk file (36 load cases, 1365 nodes, CBARs +CBUSHs) , MYSTRAN terminates with this message:
*ERROR 9200: PROGRAMMING ERROR IN SUBROUTINE ONE_D_STRESS_OUTPUTS
ARRAY OGEL WAS ALLOCATED TO HAVE 424 ROWS. ATTEMPT TO WRITE TO OGEL BEYOND THIS
The error occurs when dumping Load Case 2. However, when running individual load case 1, 2 or 3, no errors happened.
NX-NASTRAN ha no issue with the same file
[EDIT] add model size data + NX feedback
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.