| Issue |
108065
|
| Summary |
[flang][I/O] SNbone outputs data to stderr instead to a file
|
| Labels |
flang
|
| Assignees |
|
| Reporter |
pawosm-arm
|
I was trying to observe how SNbone behaves when compiled with flang-new, and sadly, it exposed a seriously weird behavior. What I'm seeing is that this code https://github.com/ANL-CESAR/SNbone/blob/dc2c25d51af12933070fd559d933431dd146a035/src_makemesh/Export_Mesh.F90#L32
```
200 FORMAT(10I8)
210 FORMAT(1P,6(E13.6,1X))
OPEN(UNIT=File_Unit,IOSTAT=IOS,FILE='grid_tet_mesh.ascii')
WRITE(File_Unit,'("# Version 1.0 file format for CFE SN miniapp")') ! Generic junk about the file type
WRITE(File_Unit,200) NumVertices,NumElements,NumVacuum
DO Vertex = 1,NumVertices
WRITE(File_Unit,210) GlobalXYZ(Vertex,1),GlobalXYZ(Vertex,2),GlobalXYZ(Vertex,3)
END DO
DO Element = 1,NumElements
WRITE(File_Unit,200) Conn(1,Element),Conn(2,Element),Conn(3,Element),Conn(4,Element)
END DO
DO Element = 1,NumVacuum
WRITE(File_Unit,200) ElementsWithVacuumBCs(Element),LocalSurfaceIndex(Element)
END DO
CLOSE(File_Unit)
```
...does not result in data outputed into the `grid_tet_mesh.ascii` file, everything is dumped to `stderr` (and there is a lot of it!).
To reproduce:
```
$ ./src_makemesh/makemesh.x 30 30 30 0
```
A workaround to have actual data file:
```
$ ./src_makemesh/makemesh.x 30 30 30 0 2>grid_tet_mesh.ascii
```
To make use of the outputed file:
```
$ ln -s grid_tet_mesh.ascii inputmesh.ascii
$ ./src_processmesh/processmesh.x 1 1
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs