diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d3a7193..b651cbf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,9 +3,6 @@ on: push: branches: - main - pull_request: - branches: - - main # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -19,26 +16,16 @@ jobs: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v4 - - name: Build openmpi + - name: Install openmpi run: | - wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.4.tar.gz - tar -xf openmpi-4.1.4.tar.gz - cd openmpi-4.1.4/ && mkdir installed - ./configure --prefix=$(pwd)/installed - make all install + sudo apt-get install -y openmpi-bin libopenmpi-dev - - name: Build HDF5 + - name: Install HDF5 run: | - wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.0/src/hdf5-1.12.0.tar.bz2 - tar -xf hdf5-1.12.0.tar.bz2 - cd hdf5-1.12.0/ && mkdir installed - ./configure --prefix=$(pwd)/installed --enable-fortran --disable-shared --enable-parallel CC=mpicc FC=mpif90 - make all install + sudo apt-get install -y openmpi-bin libopenmpi-dev - name: Build ASTR run: | - export PATH=$(pwd)/hdf5-1.12.0/installed/bin/:$PATH - export FC=h5pfc cmake -S . -B build cmake --build build -j 2 cmake --install build diff --git a/src/readwrite.F90 b/src/readwrite.F90 index dbd3b6e..6ef2d58 100644 --- a/src/readwrite.F90 +++ b/src/readwrite.F90 @@ -1019,10 +1019,10 @@ end subroutine readmonc subroutine writemon ! use commvar, only: nmonitor,imon,nstep,time,pinf,deltat - use commarray, only : x,rho,vel,prs,tmp,dvel + use commarray, only : x,rho,vel,prs,tmp,dvel,dtmp ! ! local data - integer :: n,i,j,k,ios,ns + integer :: n,i,j,k,ios,ns,recl_size integer,allocatable,save :: fh(:),record(:) logical,save :: firstcall = .true. logical :: lexist @@ -1051,7 +1051,8 @@ subroutine writemon fh(n)=get_unit() ! inquire(file=trim(filename), exist=lexist) - open(fh(n),file=trim(filename),access='direct',recl=8*4) + recl_size=8*8 + open(fh(n),file=trim(filename),access='direct',recl=recl_size) ! if(nstep==0 .or. (.not.lexist)) then ! create new monitor files @@ -1107,7 +1108,8 @@ subroutine writemon ! vel(i,j,k,1:3),rho(i,j,k),prs(i,j,k)/pinf,tmp(i,j,k), & ! dvel(i,j,k,1,:),dvel(i,j,k,2,:),dvel(i,j,k,3,:) record(n)=record(n)+1 - write(fh(n),rec=record(n))nstep,time,prs(i,j,k),dvel(i,j,k,1,2) + write(fh(n),rec=record(n))nstep,time,prs(i,j,k),tmp(i,j,k),dvel(i,j,k,1,2), & + dvel(i,j,k,2,1),dtmp(i,j,k,1),dtmp(i,j,k,2) ! write(fh(n),rec=record(n))nstep,time,vel(i,j,k,:),rho(i,j,k),prs(i,j,k), & ! tmp(i,j,k),dvel(i,j,k,:,:) ! write(*,*)nstep,time,vel(i,j,k,:),rho(i,j,k),prs(i,j,k), & diff --git a/src/utility.F90 b/src/utility.F90 index cd7bdea..59827c5 100644 --- a/src/utility.F90 +++ b/src/utility.F90 @@ -416,8 +416,6 @@ subroutine listinit(filename,handle,firstline) ! write(txtformat,'(A,I0,A)')'(',nargs,'(1X,A20))' ! - print*,nargs,txtformat - ! write(handle,txtformat)(trim(args(n)),n=1,nargs) ! endif