Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault w/ gfnff calc on larger files #391

Open
tmachonkin opened this issue Jan 17, 2025 · 1 comment
Open

Segmentation fault w/ gfnff calc on larger files #391

tmachonkin opened this issue Jan 17, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@tmachonkin
Copy link

Hi,
I've been trying to run geometry-optimization at the gfnff level on proteins using CREST. Above a certain size, I get a segmentation fault:

forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
crest 000000000272F520 Unknown Unknown Unknown
crest 0000000000C7F96A gfnff_fraghess_mp 120 gfnff_fraghess.f90
crest 0000000000C765B3 gfnff_ini_mod_mp_ 1931 gfnff_ini.f90
crest 0000000000C492E4 gfnff_setup_mod_m 96 gfnff_setup.f90
crest 0000000000C1A3BE gfnff_interface_m 241 gfnff_interface.f90
crest 00000000007C3FBE gfnff_api_mp_gfnf 79 gfnff_api.F90
crest 000000000049D631 api_engrad_mp_gfn 257 api_engrad.f90
crest 0000000000462976 crest_calculator_ 352 calculator.F90
crest 00000000004618F7 crest_calculator_ 180 calculator.F90
crest 00000000007E8CEF optimize_module_m 76 optimize_module.f90
crest 00000000004DBBC4 crest_optimizatio 75 optimization.f90
crest 0000000000403C9C MAIN__ 267 crest_main.f90
crest 0000000000402F9D Unknown Unknown Unknown
crest 0000000002725FCA Unknown Unknown Unknown
crest 0000000002727867 Unknown Unknown Unknown
crest 0000000000402E75 Unknown Unknown Unknown

If I truncate the protein down to 69 aa (998 atoms), it works just fine. Command used:
crest Plasto_trunc3.xyz --input Plasto_trunc3.toml > Plasto_trunc_3.out

And here are the coord, input, and output files:

Plasto_trunc3.zip

If I truncate less, to 70 aa (1020 atoms), I get the segmentation fault. (Same command, only now trunc4). Here are the coord, input, and output files:

Plasto_trunc4.zip

It seems meaningful that the break-point between success and failure is right about ~1000 atoms...

I'm running this on my desktop. But I have reproduced this error on an hpc, specifying a memory allocation of 64G (--mem=64G), which is the max physical memory.

Thanks!

@tmachonkin tmachonkin added the bug Something isn't working label Jan 17, 2025
@pprcht
Copy link
Contributor

pprcht commented Jan 17, 2025

Hi, the error points to a line that's simply allocating a matrix within the calculation which tells me this is not an issue with the internal setup but rather with the RAM available, the way it is made available, or the molecular system it is needed for. I rule out the last point. In fact, both your Plasto_trunc3.zip and Plasto_trunc4.zip examples run fine on my laptop, which has far less the 64G of RAM... On other HPC machines we also processed systems larger than 1000 atoms, and I wouldn't attribute much significance to that number.

So, the issue most likely is because of memory, there is nothing really that can be changed in the code at the place the segfault occurs. I don't know what --mem=64G does on your hpc system, I'm assuming it's slurm? In either case (your desktop machine, or the hpc job script), try releasing more memory by setting (e.g. in the .bashrc) something like

ulimit -s unlimited
export OMP_STACKSIZE=5G

before running the job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants