spack/var/spack/repos/spack_repo/builtin/packages/atompaw/atompaw-4.1.1.0-fix-fujitsu.patch
Harmen Stoppels b932c14008
builtin: use api v2.0 and update dir structure (#49275)
* Bump the package API of the `builtin` repo to `v2.0`
* Move `var/spack/repos/builtin` -> `var/spack/repos/spack_repo/builtin`
* Move test repos `var/spack/repos/{builtin.mock,tutorial,...}` -> `var/spack/test_repos/`
* Update package dir names to v2 format (`-` -> `_` etc)
* Change absolute imports `from spack.pkg.builtin.my_pkg ...` to relative imports `from ..my_pkg.package ...`

Users who have a repo on top of builtin should change imports from

```python
from spack.pkg.builtin.my_pkg import MyPkg
```

to

```python
from spack_repo.builtin.packages.my_pkg.package import MyPkg
```

and can configure their editors with

```
PYTHONPATH=$spack/lib/spack:$spack/var/spack/repos
```

[skip-verify-checksums]
2025-05-06 12:05:44 +02:00

41 lines
1.2 KiB
Diff

--- spack-src/src/io_tools.F90 2021-10-08 13:30:58.000000000 +0900
+++ spack-src/src/io_tools.F90.new 2021-10-08 13:30:30.000000000 +0900
@@ -12,6 +12,9 @@
#if defined (__INTEL_COMPILER)
USE IFPORT
#endif
+#if defined(__FUJITSU)
+use service_routines
+#endif
IMPLICIT NONE
PRIVATE
--- spack-src/src/excor.F90 2021-10-08 16:04:49.000000000 +0900
+++ spack-src/src/excor.F90.new 2021-10-08 16:12:28.000000000 +0900
@@ -11,6 +11,9 @@
MODULE excor
+#if defined(__FUJITSU)
+ USE, intrinsic :: ieee_arithmetic
+#endif
USE io_tools
USE Tools
USE globalmath
@@ -589,8 +592,15 @@
deallocate(grad,gradmag,gxc,dgxcdr,dfxcdgbg)
! not sure why/if this is needed
do i=1,n
+#if defined(__FUJITSU)
+ if (ieee_support_nan(tmpv(i))) then
+ if (ieee_is_nan(tmpv(i))) tmpv(i)=0.d0
+ if (ieee_is_nan(exci(i))) exci(i)=0.d0
+ endif
+#else
if (isnan(tmpv(i))) tmpv(i)=0.d0
if (isnan(exci(i))) exci(i)=0.d0
+#endif
enddo
elseif (libxc_ismgga()) then
write(std_out,*) ' atompaw not yet available for mgga -- stop '