Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

NVHPC 21.9 produces "Internal compiler error. Unhandled builtin function." when sin() is used in the mod file #677

Closed

Description

@pramodk

Describe the issue

If mod uses math intrinsic function sin() then NVHPC v21.9 produces following error:

Translating x86_64/corenrn/mod2c/kcaPR.mod into x86_64/corenrn/mod2c//kcaPR.cpp
cvode_emit=0 cvode_not_allowed=0
Thread Safe
Unhandled builtin: 47 (sin)
NVC++-F-0000-Internal compiler error. Unhandled builtin function.       0  (x86_64/corenrn/mod2c/kcaPR.cpp: 489)
NVC++/x86-64 Linux 21.9-0: compilation aborted
make: *** [x86_64/corenrn/build/kcaPR.o] Error 2

Previous version installed on BB5 works fine.

To Reproduce

Install latest master of coreneuron+mod2c with NVHPC 21.9 and compile mod file containing call to sin():

mkdir -p test && cd test
wget https://raw.githubusercontent.com/soltesz-lab/dentate/92e8d95b9b200669804dda05dfdc49696943f369/mechanisms/PinskyRinzel/kcaPR.mod

$ nrnivmodl-core .
[INFO] Running: make -j4 -f /gpfs/bbp.cscs.ch/data/project/proj16/kumbhar/pramod_scratch/nrn_1472/nrn/build_gpu/install/share/coreneuron/nrnivmodl_core_makefile ROOT=/gpfs/bbp.cscs.ch/data/project/proj16/kumbhar/pramod_scratch/nrn_1472/nrn/build_gpu/install MODS_PATH=x86_64/corenrn/mod2c BUILD_TYPE=STATIC NRN_PRCELLSTATE=0
Default NMODL flags:
Translating x86_64/corenrn/mod2c/kcaPR.mod into x86_64/corenrn/mod2c//kcaPR.cpp
cvode_emit=0 cvode_not_allowed=0
Thread Safe
Unhandled builtin: 47 (sin)
NVC++-F-0000-Internal compiler error. Unhandled builtin function.       0  (x86_64/corenrn/mod2c/kcaPR.cpp: 489)
NVC++/x86-64 Linux 21.9-0: compilation aborted
make: *** [x86_64/corenrn/build/kcaPR.o] Error 2

Now just switch compiler version and try again:

$ module switch nvhpc/21.9 nvhpc/21.2
$ nrnivmodl-core .
[INFO] Running: make -j4 -f /gpfs/bbp.cscs.ch/data/project/proj16/kumbhar/pramod_scratch/nrn_1472/nrn/build_gpu/install/share/coreneuron/nrnivmodl_core_makefile ROOT=/gpfs/bbp.cscs.ch/data/project/proj16/kumbhar/pramod_scratch/nrn_1472/nrn/build_gpu/install MODS_PATH=x86_64/corenrn/mod2c BUILD_TYPE=STATIC NRN_PRCELLSTATE=0
Default NMODL flags:
/gpfs/bbp.cscs.ch/home/kumbhar/mod_test
 => Binary creating x86_64/special-core

Expected behavior

MOD files should be built fine and executable should be created

System (please complete the following information)

  • System: BB5
  • Compiler: NVHPC 21.9
  • Version: master
  • Backend: GPU backend with GPU

Additional context

Didn't look into details but if I avoid accelmath.h include then it builds fine:

#if defined(__PGI)
#include "accelmath.h"
#endif

Activity

  1. olupton commented on Oct 25, 2021

    @olupton
    Contributor

    Also, I only reproduced the error with MOD2C (not NMODL).

  2. olupton commented on Oct 25, 2021

    @olupton
    Contributor

    Reproduced in CI: #679 (comment)

  3. olupton commented on Oct 27, 2021

    @olupton
    Contributor

    Fixed by #679.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions