Warwick-Plasma/epoch

Trouble compiling with particle ID

Opened this issue · 5 comments

I get the following error:

mpif90 -c -O3 -g -stand f03 -I../SDF/FORTRAN/include -module obj -o obj/diagnostics.o -DPARTICLE_SHAPE_BSPLINE3 -DPARTICLE_ID -D_COMMIT='"v4.19.2-9-g724471f4-dirty"' -D_DATE=1691771105 -D_MACHINE='"quartz386"' -Isrc/include src/io/diagnostics.F90
src/io/diagnostics.F90(2677): error #6460: This is not a component name that is defined in the encompassing structure. [ID]
IF (current%id < sub%restriction(n)) &
------------------^
compilation aborted for src/io/diagnostics.F90 (code 1)

Hi @bzdjordje

I think you can fix this by running:

make clean
make COMPILER=gfortran

When you change the compiler flags, you need to re-make EPOCH from a clean directory. See the "Changing precompiler directives" section on this page of our documentation.

Cheers,
Stuart

Hi @Status-Mirror,
Thank you very much for the reply. Previously I did not need to clean it, but our system has being going through significant updates the past few months. Previously I compiled with the default csh but I needed to compile in bash now and have to clean it, but with that I was able to compile it with particle IDs turned on. I have been getting frequent forrtl: severe (174): SIGSEGV, segmentation fault errors when I use complicated pulse shapes. On the matter of compiling again I was now trying to compile with MODE=debug to help examine what might be going on, but now I get the following error:

mpif90 -c -O0 -fpe0 -nothreads -traceback -fltconsistency -C -g -heap-arrays 64 -warn all -warn errors -fpic -I../SDF/FORTRAN/include -module obj -o obj/diagnostics.o -DPARSER_CHECKING -DDECK_DEBUG -D_COMMIT='"unknown-unknown-unknown-unknown"' -D_DATE=1692254264 -D_MACHINE='"quartz770"' -Isrc/include src/io/diagnostics.F90
src/io/diagnostics.F90(457): error #8889: Explicit interface or EXTERNAL declaration is required. [MPI_GATHER]
CALL MPI_GATHER(random_state, 4, MPI_INTEGER, &
---------------^
src/io/diagnostics.F90(887): error #8889: Explicit interface or EXTERNAL declaration is required. [MPI_ALLREDUCE]
CALL MPI_ALLREDUCE(laser_absorb_local, laser_absorbed, 1, mpireal, &
-------------^
src/io/diagnostics.F90(889): error #8889: Explicit interface or EXTERNAL declaration is required. [MPI_ALLREDUCE]
CALL MPI_ALLREDUCE(laser_inject_local, laser_injected, 1, mpireal, &
-------------^
src/io/diagnostics.F90(1233): error #8889: Explicit interface or EXTERNAL declaration is required. [MPI_BCAST]
CALL MPI_BCAST(elapsed_time, 1, mpireal, 0, comm, errcode)
---------------^
src/io/diagnostics.F90(2639): error #8889: Explicit interface or EXTERNAL declaration is required. [MPI_ALLGATHER]
CALL MPI_ALLGATHER(spec%attached_list%count, 1, MPI_INTEGER8, &
-----------^
src/io/diagnostics.F90(2662): error #8889: Explicit interface or EXTERNAL declaration is required. [MPI_ALLGATHER]
CALL MPI_ALLGATHER(spec%attached_list%count, 1, MPI_INTEGER8, &
-------------^
src/io/diagnostics.F90(3212): error #8889: Explicit interface or EXTERNAL declaration is required. [MPI_BCAST]
CALL MPI_BCAST(buffer, 4, MPI_LOGICAL, 0, comm, errcode)
---------^
src/io/diagnostics.F90(3220): error #8889: Explicit interface or EXTERNAL declaration is required. [MPI_BCAST]
CALL MPI_BCAST(request_dump_name, string_length, MPI_CHARACTER, 0, &
-----------^
src/io/diagnostics.F90(3271): error #8889: Explicit interface or EXTERNAL declaration is required. [MPI_RECV]
CALL MPI_RECV(msg, 0, MPI_INTEGER, i, tag, comm, &
-------------------^
src/io/diagnostics.F90(3282): error #8889: Explicit interface or EXTERNAL declaration is required. [MPI_ISEND]
CALL MPI_ISEND(msg, 1, MPI_INTEGER, i, tag, comm, request, errcode)
-----------------^
src/io/diagnostics.F90(3294): error #8889: Explicit interface or EXTERNAL declaration is required. [MPI_ISEND]
CALL MPI_ISEND(msg, 1, MPI_INTEGER, i, tag, comm, request, &
-------------------^
src/io/diagnostics.F90(3306): error #8889: Explicit interface or EXTERNAL declaration is required. [MPI_ISEND]
CALL MPI_ISEND(0, 0, MPI_INTEGER, 0, tag, comm, request, errcode)
-----------^
src/io/diagnostics.F90(3310): error #8889: Explicit interface or EXTERNAL declaration is required. [MPI_RECV]
CALL MPI_RECV(msg, 1, MPI_INTEGER, 0, tag, comm, &
---------^
compilation aborted for src/io/diagnostics.F90 (code 1)
make[1]: *** [Makefile:383: diagnostics.o] Error 1

Also COMPILER=gfortran and gcc crash as well, will investigate

I personally don't use the DEBUG feature, so it hasn't had much maintance in recent years. I'm not surprised that it's running into problems.

You say you have issues with complicated pulse shapes. I've encountered issues like this before when I define pulse shapes which have maths errors - for example, I've had functions try to calculate the sqrt of negative numbers. Can you send me your input deck so I can see if I can explain why the pulses are breaking?

Cheers,
Stuart

Hi @Status-Mirror,
Thank you for your help, I have attached input decks and slurm logs for two examples. In one case it crashes immediately and then in the other case it crashes once particle motion unfreezes @1.3 ps. I have run simpler simulations with just gaussian pulses and they run fine. Previously, prior to our cluster's OS update I could routinely run input decks like this, but now they crash most of the time. It could be an issue with our cluster yet again, but I was hoping to debug it more precisely. Also, to run these large pulse shapes I increased the string_length in constants.F90 to ~1000+, not sure if that could cause issues but it did not in the past.

Thanks,
Blagoje

crash_decks.zip