Commit d0c12ff4 authored by vijaysm's avatar vijaysm
Browse files

Updating the iMOAB test so that it works with all compilers cleanly

parent 55f6a3d0
......@@ -17,7 +17,7 @@
integer ierr, num_procs, my_id
integer pid
character*10 appname
character*132 filename, tmpfile
character*200 filename
character*150 readopts
integer ngv, nge, ndim, nparts
integer nghlay
......@@ -84,12 +84,10 @@ c find out MY process ID, and how many processes were started.
call errorout(ierr, 'fail to register application')
tmpfile = MESHDIR2
filename = trim(tmpfile)//'/io/p8ex1.h5m'//char(0)
filename = MESHDIR2 // '/io/p8ex1.h5m' // CHAR(0)
ierr = iMOAB_ReadHeaderInfo ( filename, ngv, nge, ndim, nparts)
call errorout(ierr, 'fail to read header info')
if (0.eq.my_id) then
print *, filename, ' has ', nparts, ' parts in partition',
& ngv, ' vertices ', nge, ' elements of dimension ', ndim
......@@ -103,10 +101,12 @@ C
C number of ghost layers needed by application
nghlay = 1
C now let us load the mesh in parallel
ierr = iMOAB_LoadMesh(pid, filename, readopts, nghlay)
call errorout(ierr, 'fail to read file in parallel')
C number of
C number of vertices/elements/blocks/sidesets in the mesh
ierr = iMOAB_GetMeshInfo(pid, nverts, nelem, nblocks, nsbc, ndbc)
call errorout(ierr, 'fail to get mesh info')
......@@ -136,10 +136,10 @@ C double * coords = (double*) malloc(3*nverts[2]*sizeof(double));
C the 2 tags used in this example exist in the file, already
C first tag, INTFIELD is on vertices, integer
C second tag DFIELD is on elements, double
tagtype(1)=0 !dense, int
tagtype(2)=1 !dense, double
enttype(1)=0 ! on verts
enttype(2)=1 ! on elem
tagtype(1)=0 !dense, int
tagtype(2)=1 !dense, double
enttype(1)=0 ! on verts
enttype(2)=1 ! on elem
num_co = 1
tagname1 ='INTFIELD'//CHAR(0)
ierr = iMOAB_DefineTagStorage(pid, tagname1, tagtype(1), num_co,
......@@ -151,7 +151,6 @@ C second tag DFIELD is on elements, double
& tagindex(2) )
call errorout(ierr, 'failed to get tag DFIELD')
C synchronize one of the tags only, just to see what happens
C put in the sync array just first tag index (INTFIELD)
ntsync =1
......@@ -229,7 +228,6 @@ C printf some of the block info */
C query int tag values on vertices
iTAG= ifree
......@@ -252,7 +250,6 @@ C query double tag values on elements
write (*, 104) (DWORK(dTAG+k-1), k=1,nelem(3) )
104 FORMAT ( 10F7.2 )
C query surface BCs
isBC = ifree
irBC = isBC + nsbc(3)
......@@ -268,7 +265,6 @@ C query surface BCs
105 FORMAT (' elem localID: ', I3, ' side:', I1, ' val:', I4)
C query vertex BCs
iveBC = ifree
ivaBC = iveBC + ndbc(3)
......@@ -290,17 +286,17 @@ C query vertex BCs
outfile = 'fnew.h5m'//CHAR(0)
C write out the mesh file to disk
ierr = iMOAB_WriteMesh(pid, outfile, wopts)
call errorout(ierr, 'fail to write the mesh file')
C all done. de-register and finalize
ierr = iMOAB_DeregisterApplication(pid)
call errorout(ierr, 'fail to deregister application')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment