Open danesnick opened 2 months ago
It turns out Fortran has a line length limit. Everything above that limit will be ignored.
Try adding -ffixed-line-length-none -ffree-line-length-0
to your mpif90 flags.
In my case I was using gfortran and I had to edit make.inc to have this:
# gfortran defs
#--------------------------------------------------------------------------
CPP = /usr/bin/cpp
COMPILER = -DGFORTRAN
FC = gfortran
DEBFLGS = -O3
OPT = -ffixed-line-length-none -ffree-line-length-0
CLIB =
The lines were no longer being truncated and that solved the issue.
Hope it helps.
Hey! Thanks I totally got tunnel vision on the error message here. I'll give the flag a try and report back.
New error:
/usr/bin/cpp -P -traditional -DGFORTRAN -P -traditional -DWET_DRY -DMULTIPROCESSOR -DDATA_ASSIM -DLIMITED_NO -DSEMI_IMPLICIT -DGCN -DRIVER_FLOAT -DMPDATA -DAIR_PRESSURE -DPETSC_C -DTVD -DMETIS_5 -I/u/pa/sh/ndanes/scratch/FVCOM-release-v4.4.7/src/libs/petsc-3.18.5/include -I/u/pa/sh/ndanes/scratch/FVCOM-release-v4.4.7/src/libs/petsc-3.18.5/gcc/include -I /u/pa/sh/ndanes/scratch/FVCOM-release-v4.4.7/src/libs/netcdf/f90 -I/u/pa/sh/ndanes/scratch/FVCOM-release-v4.4.7/src/libs/julian -I/u/pa/sh/ndanes/scratch/FVCOM-release-v4.4.7/src/libs/petsc-3.18.5/gcc/include -I/u/pa/sh/ndanes/scratch/FVCOM-release-v4.4.7/src/libs/petsc-3.18.5/include -I/u/pa/sh/ndanes/scratch/FVCOM-release-v4.4.7/src/libs/petsc-3.18.5/gcc/include mod_station_timeseries.F > mod_station_timeseries.f90
mpif90 -c -O3 -ffixed-line-length-none -ffree-line-length-0 -I /u/pa/sh/ndanes/scratch/FVCOM-release-v4.4.7/src/libs/netcdf/f90 -I/u/pa/sh/ndanes/scratch/FVCOM-release-v4.4.7/src/libs/julian -I/u/pa/sh/ndanes/scratch/FVCOM-release-v4.4.7/src/libs/petsc-3.18.5/gcc/include -I/u/pa/sh/ndanes/scratch/FVCOM-release-v4.4.7/src/libs/petsc-3.18.5/include -I/u/pa/sh/ndanes/scratch/FVCOM-release-v4.4.7/src/libs/petsc-3.18.5/gcc/include mod_station_timeseries.f90
mod_station_timeseries.f90:1130:25:
1130 | WRITE(10,'(2I10,<MX_NBR_ELEM_GL+1>I10)') I,NTVEGL(I),(NBVEGL(I,J),J=1,NTVEGL(I))
| 1
Error: Unexpected element ‘<’ in format string at (1)
A quick google search seems to suggest that this line was written with the intent of a Intel Fortran compiler-only feature:
https://stackoverflow.com/questions/10509734/gfortran-error-unexpected-element-in-format-string
Oh I had to solve that problem with "unexpected element '<' just yesterday ... Try modifying:
<MX_NBR_ELEM_GL+1>I10
With
*(I10)
In mod_station_timeseries.f90
You might (like me) get a new error at the end of the compilation about libjulian not supporting PIE when the makefile tries to make the fvcom executable. To solve this you need to remake libjulian using the cflag -no-pie (add it in JOPTS).
I got it to compile like that ... Although now the executable fails because it cannot find libifports... That's tomorrows battle :)
Thanks for the update! I'll see if I can get further in the build with this info.
After adding -fallow-argument-mismatch to address some rank mismatching, and modifying '==' signs in with .eq. and .eqv. (depending on the line) in ocpcre.F, and adding hypre + fblaslapack to PETSC, I got libfvcom.a to build! I need to test still but I'll update you.
Hi Danesnick, Marcos, We have also upgraded our HPC and are trying to compile FVCOM with a newer PETSC and not having a lot of joy!. I installed the latest 3.21.5 and Danesnick versions 3.18.5. We have mpiifx version ifx (IFX) 2024.1.0 20240308. I am compiling FVCOM with swave and semi-implicit. My first errors related to definition of variables. the fortran include files for variable definitions are in a different location so I ammended the include statements in the top of mod_petsc.F and had to add USE statements
USE petscmat USE petscksp USE petscpc IMPLICIT NONE
However the arguments have changed or the compiler checks are more stringent... before i try to figure out how to update the code I was wondering if you had to do anything similar. I don't see any changes in mot_petsc.F from version 4.4.7 to v5.0 or 4.3 which is the one I am using.
Example of the errors I get: mpiifx -c -O3 -qno-openmp-simd -Ofast -march=core-avx2 -mtune=core-avx2 -I/scyllapfs/hpe/fthomas/css/.local/netcdf-4.9.0/oneapi/include -I/users/modellers/rito/Code/lakeerie/code/FVCOM_source/code/FVCOM_source/libs/install/include -I/users/modellers/rito/Code/lakeerie/code/FVCOM_source/install/fabm/include -I//users/modellers/rito/Code/lakeerie/code/FVCOM_source/install/fabm/include/yaml -I/work/rito/apps/petsc/intelmpi/3.18.5/include mod_petsc.f90 mod_petsc.f90(888): error #6633: The type of the actual argument differs from the type of the dummy argument. [ISL2G_EL] CALL ISLocalToGlobalMappingCreate(MPI_COMM_SELF,PSIZE_EL_HALO,PTMP,ISL2G_EL,IERR);if (IERR .ne. 0) then;call PetscErrorF(IERR,568,"mod_petsc.F");return;endif ---------------------------------------------------------------------^ mod_petsc.f90(888): error #6631: A non-optional actual argument must be present when invoking a procedure with an explicit interface. [F] CALL ISLocalToGlobalMappingCreate(MPI_COMM_SELF,PSIZE_EL_HALO,PTMP,ISL2G_EL,IERR);if (IERR .ne. 0) then;call PetscErrorF(IERR,568,"mod_petsc.F");return;endif -------^ mod_petsc.f90(888): error #6631: A non-optional actual argument must be present when invoking a procedure with an explicit interface. [Z] CALL ISLocalToGlobalMappingCreate(MPI_COMM_SELF,PSIZE_EL_HALO,PTMP,ISL2G_EL,IERR);if (IERR .ne. 0) then;call PetscErrorF(IERR,568,"mod_petsc.F");return;endif -------^ mod_petsc.f90(888): error #6634: The shape matching rules of actual arguments and dummy arguments have been violated. [PTMP] CALL ISLocalToGlobalMappingCreate(MPI_COMM_SELF,PSIZE_EL_HALO,PTMP,ISL2G_EL,IERR);if (IERR .ne. 0) then;call PetscErrorF(IERR,568,"mod_petsc.F");return;endif ----------------------------------------------------------------^ mod_petsc.f90(888): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is an element of an array that is not assumed shape, pointer, or polymorphic. [D] CALL ISLocalToGlobalMappingCreate(MPI_COMM_SELF,PSIZE_EL_HALO,PTMP,ISL2G_EL,IERR);if (IERR .ne. 0) then;call PetscErrorF(IERR,568,"mod_petsc.F");return;endif -------^ mod_petsc.f90(896): error #6633: The type of the actual argument differs from the type of the dummy argument. [ISL2G_WAVE] CALL ISLocalToGlobalMappingCreate(MPI_COMM_SELF,PSIZE_WAVE_HALO,PTMP,ISL2G_WAVE,IERR);if (IERR .ne. 0) then;call PetscErrorF(IERR,578,"mod_petsc.F");return;endif -----------------------------------------------------------------------^ mod_petsc.f90(896): error #6631: A non-optional actual argument must be present when invoking a procedure with an explicit interface. [F] CALL ISLocalToGlobalMappingCreate(MPI_COMM_SELF,PSIZE_WAVE_HALO,PTMP,ISL2G_WAVE,IERR);if (IERR .ne. 0) then;call PetscErrorF(IERR,578,"mod_petsc.F");return;endif -------^ mod_petsc.f90(896): error #6631: A non-optional actual argument must be present when invoking a procedure with an explicit interface. [Z] CALL ISLocalToGlobalMappingCreate(MPI_COMM_SELF,PSIZE_WAVE_HALO,PTMP,ISL2G_WAVE,IERR);if (IERR .ne. 0) then;call PetscErrorF(IERR,578,"mod_petsc.F");return;endif -------^ mod_petsc.f90(896): error #6634: The shape matching rules of actual arguments and dummy arguments have been violated. [PTMP] CALL ISLocalToGlobalMappingCreate(MPI_COMM_SELF,PSIZE_WAVE_HALO,PTMP,ISL2G_WAVE,IERR);if (IERR .ne. 0) then;call PetscErrorF(IERR,578,"mod_petsc.F");return;endif ------------------------------------------------------------------^ mod_petsc.f90(896): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is an element of an array that is not assumed shape, pointer, or polymorphic. [D] CALL ISLocalToGlobalMappingCreate(MPI_COMM_SELF,PSIZE_WAVE_HALO,PTMP,ISL2G_WAVE,IERR);if (IERR .ne. 0) then;call PetscErrorF(IERR,578,"mod_petsc.F");return;endif -------^ mod_petsc.f90(910): warning #6075: The data type of the actual argument does not match the definition. [IERR] CALL MatSetLocalToGlobalMapping(A_EL,ISL2G_EL,IERR);if (IERR .ne. 0) then;call PetscErrorF(IERR,604,"mod_petsc.F");return;endif ------------------------------------------------^ mod_petsc.f90(910): error #6631: A non-optional actual argument must be present when invoking a procedure with an explicit interface. [Z] CALL MatSetLocalToGlobalMapping(A_EL,ISL2G_EL,IERR);if (IERR .ne. 0) then;call PetscErrorF(IERR,604,"mod_petsc.F");return;endif -------^ mod_petsc.f90(912): warning #6075: The data type of the actual argument does not match the definition. [IERR] CALL MatSetLocalToGlobalMapping(A_WAVE,ISL2G_WAVE,IERR);if (IERR .ne. 0) then;call PetscErrorF(IERR,608,"mod_petsc.F");return;endif ----------------------------------------------------^ mod_petsc.f90(912): error #6631: A non-optional actual argument must be present when invoking a procedure with an explicit interface. [Z] CALL MatSetLocalToGlobalMapping(A_WAVE,ISL2G_WAVE,IERR);if (IERR .ne. 0) then;call PetscErrorF(IERR,608,"mod_petsc.F");return;endif -------^ mod_petsc.f90(988): error #6784: The number of actual arguments cannot be greater than the number of dummy arguments. [KSPSETOPERATORS] CALL KSPSetOperators(Ksp_EL,A_EL,A_EL,SAME_NONZERO_PATTERN,IERR);if (IERR .ne. 0) then;call PetscErrorF(IERR,746,"mod_petsc.F");return;endif -------^ mod_petsc.f90(994): error #6404: This name does not have a type, and must have an explicit type. [PETSC_DEFAULT_DOUBLE_PRECISION] CALL KSPSetTolerances(Ksp_EL,RTOL,PETSC_DEFAULT_DOUBLE_PRECISION, & ------------------------------------^ mod_petsc.f90(1000): error #6784: The number of actual arguments cannot be greater than the number of dummy arguments. [KSPSETOPERATORS] CALL KSPSetOperators(Ksp_WAVE,A_WAVE,A_WAVE,DIFFERENT_NONZERO_PATTERN,IERR);if (IERR .ne. 0) then;call PetscErrorF(IERR,760,"mod_petsc.F");return;endif -------^
Did you change your make.inc file to use the newer version of petsc?
# FOR VERSION 2.0 TO 2.3.2
# FLAG_41 = -DPETSC_A
# include ${PETSC_DIR}/bmake/common/variables
#
# FOR VERSION 2.3.3
# FLAG_41 = -DPETSC_B
# include ${PETSC_DIR}/bmake/common/variables
#
# FOR VERSION 3.18.5
FLAG_41 = -DPETSC_C
include ${PETSC_DIR}/lib/petsc/conf/variables
I did change the include path but not the Flag... I can see now that the mod_petsc was changed in version 5.1. I had only downloaded up to 5.0 and didn't see those changes in my local repository. Thank you for the quick response! Having changed mod_petsc to the latest version it seems that the combination of semi-implicit and wave-current-interaction is not contemplated in the update... I will try to mimic the changes and hope for the best
After including the equivalent semi_implicit PETSC_C for the wave_current_interaction the last error I got was in the linker,
.....-Wl,-rpath,/work/rito/apps/petsc/intelmpi/3.18.5/lib -lpetsc -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lX11 -lstdc++ -ldl -lifport -lifcoremt -limf -lsvml -lm -lipgo -lirc -lpthread -lgcc_s -lirc_s -lstdc++ -ldl -o fvcom
ld: mod_petsc.o: in function mod_petsc_mp_petsc_set_': mod_petsc.f90:(.text+0x44b1): undefined reference to
pchypresettype_'
pchypresettype is included in petscpc mod which is correctly invoked at the begining of mod_petsc.F
When I comment the culprit line
CALL PCHYPRESetType(Pc,"boomeramg",IERR);CHKERRQ(IERR)
the compilation proceeds to completion.
That same line is commented in the wave_current section (with a couple more lines) but not in the NH or semi-implicit sections.
I haven't tried to use the binary yet. If anyone can shed any light on this I would be greatful!
Regards
Ricardo
Hi Ricardo,
Did you compile PETSC including hypre? This error seems to be pointing more to hypre than to petsc imho.
Best, Marcos
Best
tor. 19. sep. 2024, 14:50 skrev Ricardo Torres @.***>:
After including the equivalent semi_implicit PETSC_C for the wave_current_interaction the last error I got was in the linker,
.....-Wl,-rpath,/work/rito/apps/petsc/intelmpi/3.18.5/lib -lpetsc -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lX11 -lstdc++ -ldl -lifport -lifcoremt -limf -lsvml -lm -lipgo -lirc -lpthread -lgcc_s -lirc_s -lstdc++ -ldl -o fvcom ld: mod_petsc.o: in function mod_petsc_mp_petscset': modpetsc.f90:(.text+0x44b1): undefined reference to pchypresettype' pchypresettype is included in petscpc mod which is correctly invoked at the begining of mod_petsc.F When I comment the culprit line CALL PCHYPRESetType(Pc,"boomeramg",IERR);CHKERRQ(IERR) the compilation proceeds to completion. That same line is commented in the wave_current section (with a couple more lines) but not in the NH or semi-implicit sections. I haven't tried to use the binary yet. If anyone can shed any light on this I would be greatful! Regards Ricardo
— Reply to this email directly, view it on GitHub https://github.com/FVCOM-GitHub/FVCOM/issues/26#issuecomment-2360901888, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD4T34GKSZUZQFRDLPZDXY3ZXLCCLAVCNFSM6AAAAABMQPU2RKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRQHEYDCOBYHA . You are receiving this because you commented.Message ID: @.***>
that could very well be the case. I didn't add any options to the configuration and installation of PETSC. Will re-install with the option. Thank you! Ricardo
From: Marcos Antonio Carvajalino Fernández @.> Sent: Thursday, September 19, 2024 14:12 To: FVCOM-GitHub/FVCOM @.> Cc: Ricardo Torres @.>; Comment @.> Subject: Re: [FVCOM-GitHub/FVCOM] FVCOM 4.4.7 with PETSc 3.18.5 build syntax errors (f951: Error: Unexpected end of file in ‘mod_petsc.f90’) on Rocky Linux 9 (Issue #26)
Caution:This is an external email. Please take care when clicking links or opening attachments. When in doubt, contact your IT Department
Hi Ricardo,
Did you compile PETSC including hypre? This error seems to be pointing more to hypre than to petsc imho.
Best, Marcos
Best
tor. 19. sep. 2024, 14:50 skrev Ricardo Torres @.***>:
After including the equivalent semi_implicit PETSC_C for the wave_current_interaction the last error I got was in the linker,
.....-Wl,-rpath,/work/rito/apps/petsc/intelmpi/3.18.5/lib -lpetsc -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lX11 -lstdc++ -ldl -lifport -lifcoremt -limf -lsvml -lm -lipgo -lirc -lpthread -lgcc_s -lirc_s -lstdc++ -ldl -o fvcom ld: mod_petsc.o: in function mod_petsc_mp_petscset': modpetsc.f90:(.text+0x44b1): undefined reference to pchypresettype' pchypresettype is included in petscpc mod which is correctly invoked at the begining of mod_petsc.F When I comment the culprit line CALL PCHYPRESetType(Pc,"boomeramg",IERR);CHKERRQ(IERR) the compilation proceeds to completion. That same line is commented in the wave_current section (with a couple more lines) but not in the NH or semi-implicit sections. I haven't tried to use the binary yet. If anyone can shed any light on this I would be greatful! Regards Ricardo
— Reply to this email directly, view it on GitHub https://github.com/FVCOM-GitHub/FVCOM/issues/26#issuecomment-2360901888, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD4T34GKSZUZQFRDLPZDXY3ZXLCCLAVCNFSM6AAAAABMQPU2RKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRQHEYDCOBYHA . You are receiving this because you commented.Message ID: @.***>
— Reply to this email directly, view it on GitHubhttps://github.com/FVCOM-GitHub/FVCOM/issues/26#issuecomment-2360951389, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABGHWP4CF2MZEYTEF6JK5FTZXLEVHAVCNFSM6AAAAABMQPU2RKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRQHE2TCMZYHE. You are receiving this because you commented.Message ID: @.***>
Visit our website www.pml.ac.uk | Subscribe to our newsletter https://www.pml.ac.uk/newsletter | Follow us on social media: LinkedInhttps://www.linkedin.com/company/plymouth-marine-laboratory-&-pml-applications-ltd, X / Twitterhttps://twitter.com/PlymouthMarine, Instagramhttps://www.instagram.com/plymouthmarinelab, Facebookhttps://www.facebook.com/PlymouthMarineLaboratory, YouTubehttps://www.youtube.com/channel/UCfsYrcvGOp-JJm5owSJN8OA
This message is private and confidential. If you have received this message in error, please notify the sender and remove it from your system. You are reminded that e-mail communications are not secure and may contain viruses; PML accepts no liability for any loss or damage which may be caused by viruses. Our Privacy Notice is available at http://www.pml.ac.uk/System-pages/Privacy_Notice .
Plymouth Marine Laboratory (PML) is a company limited by guarantee registered in England & Wales, company number 4178503. Registered Charity No. 1091222. Registered Office: Prospect Place, The Hoe, Plymouth PL1 3DH, UK. PML Applications Ltd, www.pml-applications.co.uk , is the wholly owned subsidiary of PML, registered as a company in England & Wales, company number 4232750.
Just as an FYI @riquitorres , here's what I used to build PETSC 3.18 (GCC+MPICH)
./configure --download-metis --download-parametis --with-fc=mpif90 --with-cc=mpicc --with-cxx=mpicxx --download-hypre --download-fblaslapack
make PETSC_DIR=$TOPDIR/libs/petsc-3.18.5 PETSC_ARCH=gcc all
make PETSC_DIR=$TOPDIR/libs/petsc-3.18.5 PETSC_ARCH=gcc check
-no-pie
Hi, im having this error when compiling Julian:
mpif90 -O3 -no-pie -o tconvert tconvert.for libjulian.a
/usr/bin/ld: /tmp/cc1aLpZm.o: en la función MAIN__': tconvert.for:(.text+0x208): referencia a
fjulparsedt' sin definir
/usr/bin/ld: tconvert.for:(.text+0x294): referencia a fjul_formatpds_' sin definir /usr/bin/ld: tconvert.for:(.text+0x33e): referencia a
fjulformatsql' sin definir
/usr/bin/ld: tconvert.for:(.text+0x425): referencia a fjul_taiofdutc_' sin definir /usr/bin/ld: tconvert.for:(.text+0x443): referencia a
fjuletoftai' sin definir
/usr/bin/ld: tconvert.for:(.text+0x694): referencia a fjul_jdoftai_' sin definir /usr/bin/ld: tconvert.for:(.text+0x710): referencia a
fjuljdoftai' sin definir
/usr/bin/ld: tconvert.for:(.text+0x788): referencia a fjul_jdoftai_' sin definir /usr/bin/ld: tconvert.for:(.text+0x804): referencia a
fjulmjdoftai' sin definir
/usr/bin/ld: tconvert.for:(.text+0x880): referencia a fjul_mjdoftai_' sin definir /usr/bin/ld: tconvert.for:(.text+0x8f8): referencia a
fjulmjdoftai' sin definir
Did you know what's happening? thanks
-no-pie
Hi, im having this error when compiling Julian:
mpif90 -O3 -no-pie -o tconvert tconvert.for libjulian.a /usr/bin/ld: /tmp/cc1aLpZm.o: en la función
MAIN__': tconvert.for:(.text+0x208): referencia a
fjulparsedt' sin definir /usr/bin/ld: tconvert.for:(.text+0x294): referencia afjul_formatpds_' sin definir /usr/bin/ld: tconvert.for:(.text+0x33e): referencia a
fjulformatsql' sin definir /usr/bin/ld: tconvert.for:(.text+0x425): referencia afjul_taiofdutc_' sin definir /usr/bin/ld: tconvert.for:(.text+0x443): referencia a
fjuletoftai' sin definir /usr/bin/ld: tconvert.for:(.text+0x694): referencia afjul_jdoftai_' sin definir /usr/bin/ld: tconvert.for:(.text+0x710): referencia a
fjuljdoftai' sin definir /usr/bin/ld: tconvert.for:(.text+0x788): referencia afjul_jdoftai_' sin definir /usr/bin/ld: tconvert.for:(.text+0x804): referencia a
fjulmjdoftai' sin definir /usr/bin/ld: tconvert.for:(.text+0x880): referencia afjul_mjdoftai_' sin definir /usr/bin/ld: tconvert.for:(.text+0x8f8): referencia a
fjulmjdoftai' sin definirDid you know what's happening? thanks
Hi,
This looks like a julian problem to me. Did you compile julian? You have julian (and other libraries inside /src/libs). You can do make inside the libs folder to build all libraries needed (check the Makefile to see if you dont have some code commented).
After that:
libs/isntall/include
in your INCLUDEPATH
export INCLUDEPATH=/usr/lib/x86_64-linux-gnu/fortran/gfortran-mod-15/openmpi:/FVCOM/src/libs/install/include/:/usr/include/
make.inc
edit the DTLIBS
to point to the libs install folder DTLIBS = -L/FVCOM/src/libs/install/lib -ljulian
PACKAGES = proj fproj julian metis netcdf
cd fproj && ./configure CPPFLAGS='$(COMPILER)' CC=$(CC) CFLAGS="-O3 -Df2cFortran" CXX=$(CXX) CXXFLAGS=-O3 FC=$(FC) FFLAGS=-O3 --with-proj4=$(MYINSTALLDIR) --prefix=$(MYINSTALLDIR)
Hi liesvy
It seems to me your compilation is not finding some functions (te dice "sin definir"). Are you compiling using the makefile in the Julian folder? That works ok for me
Best Marcos
søn. 22. sep. 2024, 05:10 skrev Liesvy Valladares @.***
:
-no-pie
Hi, im having this error when compiling Julian:
mpif90 -O3 -no-pie -o tconvert tconvert.for libjulian.a /usr/bin/ld: /tmp/cc1aLpZm.o: en la función MAIN__': tconvert.for:(.text+0x208): referencia a fjulparsedt' sin definir /usr/bin/ld: tconvert.for:(.text+0x294): referencia a fjulformatpds' sin definir /usr/bin/ld: tconvert.for:(.text+0x33e): referencia a fjulformatsql' sin definir /usr/bin/ld: tconvert.for:(.text+0x425): referencia a fjultaiofdutc' sin definir /usr/bin/ld: tconvert.for:(.text+0x443): referencia a fjuletoftai' sin definir /usr/bin/ld: tconvert.for:(.text+0x694): referencia a fjuljdoftai' sin definir /usr/bin/ld: tconvert.for:(.text+0x710): referencia a fjuljdoftai' sin definir /usr/bin/ld: tconvert.for:(.text+0x788): referencia a fjuljdoftai' sin definir /usr/bin/ld: tconvert.for:(.text+0x804): referencia a fjulmjdoftai' sin definir /usr/bin/ld: tconvert.for:(.text+0x880): referencia a fjulmjdoftai' sin definir /usr/bin/ld: tconvert.for:(.text+0x8f8): referencia a fjulmjdoftai' sin definir
Did you know what's happening? thanks
— Reply to this email directly, view it on GitHub https://github.com/FVCOM-GitHub/FVCOM/issues/26#issuecomment-2365436933, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD4T34EEGRSM24NCSBTM4P3ZXYYI3AVCNFSM6AAAAABMQPU2RKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRVGQZTMOJTGM . You are receiving this because you commented.Message ID: @.***>
Thanks,
it seems that something I had changed in the code inside the libs. I copied it again, changed the line in fproj to: cd fproj && ./configure `CPPFLAGS='$(COMPILER)' CC=$(CC) CFLAGS="-O3 -Df2cFortran" CXX=$(CXX) CXXFLAGS=-O3 FC=$(FC) FFLAGS=-O3 --with-proj4=$(MYINSTALLDIR) --prefix=$(MYINSTALLDIR)and it compiled correctly. FVCOM compiles fine, but if I add the
flag 30 = -DNH` (I need the non-hydrostatic option), it gives the following errors:
_mod_petsc.f90:1002:63:
1002 | CALL KSPSetTolerances(Ksp,RTOL,PETSC_DEFAULT_DOUBLE_PRECISION, &_
| 1
Error: Symbol ‘petsc_default_double_precision’ at (1) has no IMPLICIT type
mod_petsc.f90:892:64:
892 | CALL ISLocalToGlobalMappingCreate(PETSC_COMM_SELF,PSIZE_WHALO,PTMP,ISL2G,IERR); if (IERR .ne. 0) then; call PetscErrorF(IERR,576,"mod_petsc.F"); return; endif
| 1
Error: Rank mismatch in argument ‘c’ at (1) (scalar and rank-1)
mod_petsc.f90:916:48:
916 | CALL MatSetLocalToGlobalMapping(A,ISL2G,IERR); if (IERR .ne. 0) then; call PetscErrorF(IERR,624,"mod_petsc.F"); return; endif
| 1
Error: Type mismatch in argument ‘c’ at (1); passed INTEGER(4) to INTEGER(8)
mod_petsc.f90:996:58:
996 | CALL KSPSetOperators(Ksp,A,A,SAME_NONZERO_PATTERN,IERR); if (IERR .ne. 0) then; call PetscErrorF(IERR,761,"mod_petsc.F"); return; endif
| 1
Error: More actual than formal arguments in procedure call at (1)
I have been looking inside mod_petsc.F, and in the call to CALL KSPSetTolerances
, if it is being compiled with NH, it uses the default variables PETSC_DEFAULT_DOUBLE_PRECISION; if not, it uses PETSC_DEFAULT_REAL.
How can I compile pets with double precision? or do I need to load them from mod_pestc? Thanks
PETSC_DEFAULT_REAL
seems like I need to add --with-precision=double when compiling petsc
Short update on Semi-implicit + waves PETSC 3.18.5 doesn't compile with HYPRE and mpiifx. I downloaded the latest PETSC (3.21.5) and found no problems compiling as suggested by @danesnick once I changed mpif90 for mpiifx.
IMPLICIT NONE
include "petsc/finclude/petsc.h"
include "petsc/finclude/petscvec.h"
include "petsc/finclude/petscdmda.h"
include "petsc/finclude/petscmat.h"
include "petsc/finclude/petscksp.h"
include "petsc/finclude/petscpc.h"
include "petsc/finclude/petscis.h"
include "petsc/finclude/petscao.h"
include "petsc/finclude/petscvec.h"
include "petsc/finclude/petscviewer.h"
Hi Ricardo i am compiling fvcom with non_hydrostatic: can you share what do you used in this lines of code for the Wave_current_interaction?
# if defined (NH)
CALL MatCreateMPIAIJ(MPI_FVCOM_GROUP,PSIZE,PSIZE,PsizeGL,PsizeGL,0,DNNZ,0,ONNZ,A,IERR);CHKERRQ(IERR)
# endif
# if defined (SEMI_IMPLICIT) || (NH)
# if defined (PETSC_A) || (PETSC_B) /* Siqi Li, PETSC@20230227 */
CALL MatCreateMPIAIJ(MPI_FVCOM_GROUP,N_VERTS,N_VERTS,MGL,MGL,0,DNNZ2,0,ONNZ2,A_EL,IERR);CHKERRQ(IERR)
# else
CALL MatCreateAIJ(MPI_FVCOM_GROUP,N_VERTS,N_VERTS,MGL,MGL,0,DNNZ2,0,ONNZ2,A_EL,IERR);CHKERRQ(IERR)
CALL MatSetOption(A_EL, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE, IERR);CHKERRQ(IERR)
# endif
# endif
# if defined (WAVE_CURRENT_INTERACTION) && !defined (EXPLICIT)
CALL MatCreateMPIAIJ(MPI_FVCOM_GROUP,N_VERTS,N_VERTS,MGL,MGL,0,DNNZ2,0,ONNZ2,A_WAVE,IERR);CHKERRQ(IERR)
# endif
I have tried with MatCreateMPIAIJ(MPI_FVCOM_GROUP,N_VERTS,N_VERTS,MGL,MGL,0,DNNZ2,0,ONNZ2,A_EL,IERR);CHKERRQ(IERR)
but in this case compilation gives me this error:
ld: mod_petsc.o: en la función `mod_petsc_mp_petsc_alloca_.V':
mod_petsc.f90:(.text+0xd4c6): referencia a `matcreatempiaij_' sin definir
ld: mod_petsc.f90:(.text+0xd524): referencia a `matcreatempiaij_' sin definir
ld: mod_petsc.o: en la función `mod_petsc_mp_petsc_alloca_.A':
mod_petsc.f90:(.text+0xf3dc): referencia a `matcreatempiaij_' sin definir
ld: mod_petsc.f90:(.text+0xf43a): referencia a `matcreatempiaij_' sin definir
make: *** [makefile:135: fvcom] Error 1
And if I Use
CALL MatSetOption(A_EL, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE, IERR);CHKERRQ(IERR)
Then when running the model I got this errors:
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[1]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: General MPI error
[0]PETSC ERROR: MPI error 135870213 Invalid communicator, error stack:
PMPI_Comm_get_attr(350): MPI_Comm_get_attr(comm=0xfffffc19, comm_keyval=-1539309568, attribute_val=0x7fffffff9748, flag=0x7fffffff9438) failed
MPII_Comm_get_attr(259): MPIR_Comm_get_attr(comm=0xfffffc19, comm_keyval=-1539309568, attribute_val=0x7fffffff9748, flag=0x7fffffff9438) failed
MPII_Comm_get_attr(55).: Invalid communicator
[0]PETSC ERROR: WARNING! There are unused option(s) set! Could be the program crashed before usage or a spelling mistake, etc!
[0]PETSC ERROR: [1]PETSC ERROR: General MPI error
[1]PETSC ERROR: MPI error 135870213 Invalid communicator, error stack:
PMPI_Comm_get_attr(350): MPI_Comm_get_attr(comm=0xfffffc19, comm_keyval=-1539309568, attribute_val=0x7fffffff9748, flag=0x7fffffff9438) failed
MPII_Comm_get_attr(259): MPIR_Comm_get_attr(comm=0xfffffc19, comm_keyval=-1539309568, attribute_val=0x7fffffff9748, flag=0x7fffffff9438) failed
MPII_Comm_get_attr(55).: Invalid communicator
[1]PETSC ERROR: #1 PetscCommDuplicate()
[0]PETSC ERROR: #2 PetscHeaderCreate_Private()
[1]PETSC ERROR: #3 PetscHeaderCreate_Function()
[1]PETSC ERROR: #4 MatCreate()
[0]PETSC ERROR: [1]PETSC ERROR: #5 MatCreateAIJ()
I am using: petsc-3.21.5, FVCOM4.4.7, with
CPP = /usr/bin/cpp
COMPILER = -DIFORT
CC = mpiicc
CXX = mpicxx
CFLAGS = -O3
FC = mpiifort
Hi Liesvy, There are a few instances in which the code needs amending. I have uploaded the file with the modifications here. If you do a meld with your version, you will see where I added the changes. I did managed to compile without problems but I haven't managed an error free simulation yet. So I can't guarantee the changes are correct! Regards Ricardo mod_petsc.txt
Hi Liesvy, There are a few instances in which the code needs amending. I have uploaded the file with the modifications here. If you do a meld with your version, you will see where I added the changes. I did managed to compile without problems but I haven't managed an error free simulation yet. So I can't guarantee the changes are correct! Regards Ricardo mod_petsc.txt
Thanks, same here, I modified mod_petsc.F and mod_non_hydro.F, I am using petsc-2.3.3-p16 because other versions doesn't compile. Now I am compiling without error, but got some errors when running, I put off the data_assimilation flag cause it gives me more errors in compilation. When running with NH flag gives me this
DEPTH IN NODE: 1387 ; IS LESS THAN MIN_DEPTH
ADJUST BATHYMETRY AT THIS (THESE) LOCATION(S) OR
RECOMPILE FVCOM WITH FLOODING/DRYING FORMULATION
STOPPING....
I have run this same input files without NH flag, when I try to compile with wet_dry gives more errors in mod_petsc.F. I have modified the depth_check.F to eliminate this error. Now I got this PETSc SOLVER HAS DIVERGED: STOPPING...
I have uploaded the files with modifications too. Thanks
Hi,
I'm attempting to build FVCOM 4.4.7 on our local HPC cluster using GCC 11.3 and MPICH 4.2 running Rocky Linux 9, I had to make some config changes to get the libraries built, and then run into a final snag at the end of the build process.
First, here's the build environment:
Here are the relevant bits of my $TOPDIR/make.inc file:
Then, I had to make a small modification with
$TOPDIR/src/libs/makefile
to getfproj
to build by adding the-Df2cFortran
in myCFLAGS
:Now when I go back to
$TOPDIR/src
to build the main program, most stuff completes until I hit the end: